![]()  | 
Home | Libraries | People | FAQ | More | 
boost::convert — Boost.Convert main deployment interface.
// In header: <boost/convert.hpp> template<typename TypeOut, typename TypeIn, typename Converter> boost::optional< TypeOut > convert(TypeIn const & value_in, Converter const & converter);
For example,
boost::cnv::cstream cnv; boost::optional<int> i = boost::convert<int>("12", cnv); boost::optional<string> s = boost::convert<string>(123.456, cnv);
Parameters:  | 
  | 
||||
Returns:  | 
boost::optional<TypeOut> result of conversion together with the indication of success or failure of the conversion request.  |