| 28 | typename alloc |
| 29 | > |
| 30 | inline const typename disable_if<is_same_type<charT,char>,std::string>::type narrow ( |
| 31 | const std::basic_string<charT,traits,alloc>& str |
| 32 | ) |
| 33 | { |
| 34 | std::string temp; |
| 35 | temp.reserve(str.size()); |
| 36 | std::string::size_type i; |
| 37 | for (i = 0; i < str.size(); ++i) |
| 38 | { |
| 39 | if (zero_extend_cast<unsigned long>(str[i]) > 255) |
| 40 | temp += ' '; |
| 41 | else |
| 42 | temp += zero_extend_cast<char>(str[i]); |
| 43 | } |
| 44 | return temp; |
| 45 | } |
| 46 | |
| 47 | template < |
| 48 | typename charT, |