refactor: remove detail::(local|gm)time_s from fwd

This commit is contained in:
ToruNiina 2024-06-23 23:25:57 +09:00
parent 7af0e66c25
commit 3c09d3046c
3 changed files with 18 additions and 11 deletions

View File

@ -12,17 +12,6 @@
namespace toml
{
// To avoid non-threadsafe std::localtime. In C11 (not C++11!), localtime_s is
// provided in the absolutely same purpose, but C++11 is actually not compatible
// with C11. We need to dispatch the function depending on the OS.
namespace detail
{
std::tm localtime_s(const std::time_t* src);
std::tm gmtime_s(const std::time_t* src);
} // detail
// ----------------------------------------------------------------------------
enum class month_t : std::uint8_t
{
Jan = 0,

View File

@ -17,6 +17,15 @@
#include <string_view>
#endif
namespace toml
{
namespace detail
{
std::tm localtime_s(const std::time_t* src);
std::tm gmtime_s(const std::time_t* src);
} // detail
} // toml
TEST_CASE("testing toml::find with toml type")
{
using value_type = toml::value;

View File

@ -17,6 +17,15 @@
#include <string_view>
#endif
namespace toml
{
namespace detail
{
std::tm localtime_s(const std::time_t* src);
std::tm gmtime_s(const std::time_t* src);
} // detail
} // toml
TEST_CASE("testing toml::get with toml types")
{
using value_type = toml::value;