@@ -1569,14 +1569,14 @@ inline StringType fromUtf8(const std::string& utf8String, const typename StringT
1569
1569
return result;
1570
1570
}
1571
1571
1572
- template <typename charT , typename traits, typename Alloc, typename std::enable_if<(sizeof (charT ) == 1), int>::type size = 1>
1573
- inline std::string toUtf8(const std::basic_string<charT, traits, Alloc> & unicodeString)
1572
+ template <typename strT , typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof (typename strT::value_type ) == 1), int>::type size = 1>
1573
+ inline std::string toUtf8(const strT & unicodeString)
1574
1574
{
1575
1575
return std::string (unicodeString.begin (), unicodeString.end ());
1576
1576
}
1577
1577
1578
- template <typename charT , typename traits, typename Alloc, typename std::enable_if<(sizeof (charT ) == 2), int>::type size = 2>
1579
- inline std::string toUtf8(const std::basic_string<charT, traits, Alloc> & unicodeString)
1578
+ template <typename strT , typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof (typename strT::value_type ) == 2), int>::type size = 2>
1579
+ inline std::string toUtf8(const strT & unicodeString)
1580
1580
{
1581
1581
std::string result;
1582
1582
for (auto iter = unicodeString.begin (); iter != unicodeString.end (); ++iter) {
@@ -1604,8 +1604,8 @@ inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicode
1604
1604
return result;
1605
1605
}
1606
1606
1607
- template <typename charT , typename traits, typename Alloc, typename std::enable_if<(sizeof (charT ) == 4), int>::type size = 4>
1608
- inline std::string toUtf8(const std::basic_string<charT, traits, Alloc> & unicodeString)
1607
+ template <typename strT , typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof (typename strT::value_type ) == 4), int>::type size = 4>
1608
+ inline std::string toUtf8(const strT & unicodeString)
1609
1609
{
1610
1610
std::string result;
1611
1611
for (auto c : unicodeString) {
0 commit comments