ossrv_pub/boost_apis/boost/lexical_cast.hpp
branchRCL_3
changeset 57 2efc27d87e1c
parent 56 acd3cd4aaceb
equal deleted inserted replaced
56:acd3cd4aaceb 57:2efc27d87e1c
   215     Target lexical_cast(const Source &arg)
   215     Target lexical_cast(const Source &arg)
   216     {
   216     {
   217         typedef typename detail::array_to_pointer_decay<Source>::type NewSource;
   217         typedef typename detail::array_to_pointer_decay<Source>::type NewSource;
   218 
   218 
   219         detail::lexical_stream<Target, NewSource> interpreter;
   219         detail::lexical_stream<Target, NewSource> interpreter;
   220         Target result ;
   220         Target result;
   221 
   221 
   222         if(!(interpreter << arg && interpreter >> result))
   222         if(!(interpreter << arg && interpreter >> result))
   223             throw_exception(bad_lexical_cast(typeid(NewSource), typeid(Target)));
   223             throw_exception(bad_lexical_cast(typeid(NewSource), typeid(Target)));
   224         return result;
   224         return result;
   225     }
   225     }