mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-09 22:30:07 +00:00
move is_chrono_duration from types to traits
This commit is contained in:
parent
4e57c5f5df
commit
0759e757ae
@ -2,6 +2,7 @@
|
||||
#define TOML11_TRAITS
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <chrono>
|
||||
#include <tuple>
|
||||
|
||||
namespace toml
|
||||
@ -85,6 +86,10 @@ template<typename T> struct is_std_tuple : std::false_type{};
|
||||
template<typename ... Ts>
|
||||
struct is_std_tuple<std::tuple<Ts...>> : std::true_type{};
|
||||
|
||||
template<typename T> struct is_chrono_duration: std::false_type{};
|
||||
template<typename Rep, typename Period>
|
||||
struct is_chrono_duration<std::chrono::duration<Rep, Period>>: std::true_type{};
|
||||
|
||||
// to use toml::get<std::tuple<T1, T2, ...>> in C++11
|
||||
template<std::size_t ... Ns> struct index_sequence{};
|
||||
|
||||
|
@ -82,9 +82,6 @@ inline std::basic_string<charT, traits, alloc> stringize(value_t t)
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template<typename T> struct is_chrono_duration: std::false_type{};
|
||||
template<typename Rep, typename Period>
|
||||
struct is_chrono_duration<std::chrono::duration<Rep, Period>>: std::true_type{};
|
||||
|
||||
template<typename T>
|
||||
constexpr inline value_t check_type()
|
||||
|
Loading…
Reference in New Issue
Block a user