Support Class Library
A set of tools providing classes and utility
defines_std_to_string.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <type_traits>
4 #include <string>
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(){
31  }
32  }
33  }
34 }
void void_t
The must have.
Definition: void_t.h:10
Global namespace of the SCL.
Definition: alias.hpp:3
STL namespace.
constexpr bool defines_std_to_string()
Determines whether or not std::to_string(const T&) is defined.