added missing traits template arg to a lexical_stream instantiation

[SVN r41394]
This commit is contained in:
Joaquín M López Muñoz
2007-11-26 11:52:03 +00:00
parent 05036d3ae1
commit ec8665d114

View File

@@ -1180,7 +1180,13 @@ namespace boost
template<typename Target, typename Source>
Target lexical_cast(Source arg)
{
detail::lexical_stream<Target, Source> interpreter;
typedef typename detail::widest_char<
BOOST_DEDUCED_TYPENAME detail::stream_char<Target>::type
, BOOST_DEDUCED_TYPENAME detail::stream_char<Source>::type
>::type char_type;
typedef std::char_traits<char_type> traits;
detail::lexical_stream<Target, Source, traits> interpreter;
Target result;
if(!(interpreter << arg && interpreter >> result))