Support Class Library
A set of tools providing classes and utility
include
scl
tools
meta
defines_std_to_string.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <type_traits>
4
#include <string>
5
#include <
scl/tools/meta/exists.h
>
6
#include <
scl/tools/meta/enable_if.h
>
7
#include <
scl/tools/meta/void_t.h
>
8
#include <
scl/tools/meta/type_mod.h
>
9
10
namespace
scl
{
11
namespace
tools{
12
namespace
meta{
13
namespace
details{
14
template
<
class
T,
class
=
void
>
15
struct
__to_string_defined
: std::false_type{};
16
17
template
<
class
T>
18
struct
__to_string_defined
<T,
/*enable_if_t*/
void_t
<
19
/*exists<*/
decltype(
std
::to_string(std::declval<const T&>()))
/*>()*/
20
>> : std::true_type{};
21
}
22
28
template
<
class
T>
29
inline
constexpr
bool
defines_std_to_string
(){
30
return
details::__to_string_defined<decay_t<T>
>::value;
31
}
32
}
33
}
34
}
scl::tools::meta::void_t
void void_t
The must have.
Definition:
void_t.h:10
scl
Global namespace of the SCL.
Definition:
alias.hpp:3
std
STL namespace.
scl::tools::meta::details::__to_string_defined
Definition:
defines_std_to_string.h:15
exists.h
type_mod.h
scl::tools::meta::defines_std_to_string
constexpr bool defines_std_to_string()
Determines whether or not std::to_string(const T&) is defined.
Definition:
defines_std_to_string.h:29
enable_if.h
void_t.h
Generated by
1.8.13