mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
refactor: remove detail::(local|gm)time_s from fwd
This commit is contained in:
@@ -12,17 +12,6 @@
|
|||||||
namespace toml
|
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
|
enum class month_t : std::uint8_t
|
||||||
{
|
{
|
||||||
Jan = 0,
|
Jan = 0,
|
||||||
|
|||||||
@@ -17,6 +17,15 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#endif
|
#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")
|
TEST_CASE("testing toml::find with toml type")
|
||||||
{
|
{
|
||||||
using value_type = toml::value;
|
using value_type = toml::value;
|
||||||
|
|||||||
@@ -17,6 +17,15 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#endif
|
#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")
|
TEST_CASE("testing toml::get with toml types")
|
||||||
{
|
{
|
||||||
using value_type = toml::value;
|
using value_type = toml::value;
|
||||||
|
|||||||
Reference in New Issue
Block a user