| 3976 | |
| 3977 | template<typename T> |
| 3978 | void convertInto( std::string const& _source, T& _dest ) { |
| 3979 | std::stringstream ss; |
| 3980 | ss << _source; |
| 3981 | ss >> _dest; |
| 3982 | if( ss.fail() ) |
| 3983 | throw std::runtime_error( "Unable to convert " + _source + " to destination type" ); |
| 3984 | } |
| 3985 | inline void convertInto( std::string const& _source, std::string& _dest ) { |
| 3986 | _dest = _source; |
| 3987 | } |