Extracting bool from istream in a templated function
- by Thomas Matthews
I'm converting my fields class read functions into one template function. I have field classes for int, unsigned int, long, and unsigned long. These all use the same method for extracting a value from an istringstream (only the types change):
template <typename Value_Type>
Value_Type Extract_Value(const std::string& input_string)
{
…