| 287 | { |
| 288 | template < typename charT, typename traits, typename alloc > |
| 289 | static const T cast ( |
| 290 | const std::basic_string<charT,traits,alloc>& str |
| 291 | ) |
| 292 | { |
| 293 | using namespace std; |
| 294 | basic_istringstream<charT,traits,alloc> sin(str); |
| 295 | T temp; |
| 296 | sin >> temp; |
| 297 | if (!sin) throw string_cast_error(narrow(str)); |
| 298 | if (sin.get() != std::char_traits<charT>::eof()) throw string_cast_error(narrow(str)); |
| 299 | return temp; |
| 300 | } |
| 301 | }; |
| 302 | |
| 303 | template <typename C, typename T, typename A> |
nothing calls this directly
no test coverage detected