ss<<_in;// ss is an instance of std::stringstreamif(ss.fail())throwstd::logic_error(descr);ss>>_out;if(ss.fail())throwstd::logic_error(descr);/* reseting std::stringstream to use it again */ss.str(std::string());ss.clear();