8 #ifndef _SIG_UTIL_TYPE_CONVERT_HPP
9 #define _SIG_UTIL_TYPE_CONVERT_HPP
21 using type =
typename std::remove_const<typename std::remove_reference<T>::type>
::type;
24 template <
size_t N1,
size_t N2>
27 static const size_t value = N1 + N2;
32 template <
class FILE_STRING>
78 long long operator()(std::string s){
return std::stoll(s); }
81 unsigned int operator()(std::string s){
return std::stoul(s); }
84 unsigned long operator()(std::string s){
return std::stoul(s); }
87 unsigned long long operator()(std::string s){
return std::stoull(s); }
102 struct StringId<char*>{
using type = std::string;
static const bool value =
true; };
104 struct StringId<char const*>{
using type = std::string;
static const bool value =
true; };
108 struct StringId<wchar_t*>{
using type = std::wstring;
static const bool value =
true; };
110 struct StringId<wchar_t const*>{
using type = std::wstring;
static const bool value =
true; };
116 typename std::decay<T>::type
125 typename std::decay<T>::type
131 template <
class T1,
class T2,
class TrueT,
class FalseT>
133 using type =
typename std::conditional<std::is_same<T1, T2>::value, TrueT, FalseT>
::type;
std::istringstream istringstream
typename std::remove_const< typename std::remove_reference< T >::type >::type type
static const size_t value
std::ostreambuf_iterator< char > ostreambuf_iterator
double operator()(std::string s)
long long operator()(std::string s)
unsigned long long operator()(std::string s)
std::wostringstream ostringstream
std::istreambuf_iterator< wchar_t > istreambuf_iterator
float operator()(std::string s)
std::ostreambuf_iterator< wchar_t > ostreambuf_iterator
std::ostreambuf_iterator< wchar_t > ostreambuf_iterator
typename std::conditional< std::is_same< T1, T2 >::value, TrueT, FalseT >::type type
unsigned long operator()(std::string s)
std::ostringstream ostringstream
unsigned int operator()(std::string s)
std::wostringstream ostringstream
std::wistringstream istringstream
std::wistringstream istringstream
long operator()(std::string s)
std::istreambuf_iterator< wchar_t > istreambuf_iterator
int operator()(std::string s)
std::istreambuf_iterator< char > istreambuf_iterator
typename StringId< typename remove_const_reference< typename std::decay< T >::type >::type >::type string_t