Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-11-26 05:40:09


Alexander Nasonov ha escrito:

> Alexander Nasonov <alnsn <at> yandex.ru> writes:
> > template<typename Target, typename Source>
> > Target lexical_cast(Source arg)
> > {
> > typedef typename detail::widest_char<
> > typename detail::stream_char<Target>::type
> > , typename detail::stream_char<src>::type
> ^^^
> Oops, copy/paste error. Please 's/src/Source/'.
> --

The attached patch makes lexical_cast work again for MSVC++ 6.0.
I can do the commit myself if you want.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Index: lexical_cast.hpp
===================================================================
--- lexical_cast.hpp (revision 41392)
+++ lexical_cast.hpp (working copy)
@@ -1180,7 +1180,13 @@
     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))


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk