@@ -1296,13 +1296,13 @@ inline StringType fromUtf8(const std::string& utf8String, const typename StringT
1296
1296
return result;
1297
1297
}
1298
1298
1299
- template <typename charT, typename traits, typename Alloc, typename std::enable_if<(sizeof (charT) == 1)>::type* = nullptr >
1299
+ template <typename charT, typename traits, typename Alloc, typename std::enable_if<(sizeof (charT) == 1), int >::type size = 1 >
1300
1300
inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicodeString)
1301
1301
{
1302
1302
return std::string (unicodeString.begin (), unicodeString.end ());
1303
1303
}
1304
1304
1305
- template <typename charT, typename traits, typename Alloc, typename std::enable_if<(sizeof (charT) == 2)>::type* = nullptr >
1305
+ template <typename charT, typename traits, typename Alloc, typename std::enable_if<(sizeof (charT) == 2), int >::type size = 2 >
1306
1306
inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicodeString)
1307
1307
{
1308
1308
std::string result;
@@ -1324,7 +1324,7 @@ inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicode
1324
1324
return result;
1325
1325
}
1326
1326
1327
- template <typename charT, typename traits, typename Alloc, typename std::enable_if<(sizeof (charT) == 4)>::type* = nullptr >
1327
+ template <typename charT, typename traits, typename Alloc, typename std::enable_if<(sizeof (charT) == 4), int >::type size = 4 >
1328
1328
inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicodeString)
1329
1329
{
1330
1330
std::string result;
@@ -1334,10 +1334,10 @@ inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicode
1334
1334
return result;
1335
1335
}
1336
1336
1337
- template <typename SourceType >
1338
- inline std::string toUtf8 (const SourceType * unicodeString)
1337
+ template <typename charT >
1338
+ inline std::string toUtf8 (const charT * unicodeString)
1339
1339
{
1340
- return toUtf8 (std::basic_string<SourceType , std::char_traits<SourceType >>(unicodeString));
1340
+ return toUtf8 (std::basic_string<charT , std::char_traits<charT >>(unicodeString));
1341
1341
}
1342
1342
1343
1343
} // namespace detail
0 commit comments