Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-04-12 00:46:53


Thanks Terje,

In this case Synge's patch which was for release 1.30.0 needs to be
modified to use bad_lexical_cast. Could someone apply the following
patch to make lexical_cast work again?

diff -u -r1.13 lexical_cast.hpp
--- lexical_cast.hpp 11 Apr 2003 10:49:52 -0000 1.13
+++ lexical_cast.hpp 12 Apr 2003 05:45:30 -0000
@@ -187,7 +187,7 @@
          Target result;

          if(!(interpreter << arg && interpreter >> result))
- throw_exception(detail::no_lexical_conversion<Target,
Source>());
+ throw_exception(bad_lexical_cast(typeid(Target),
typeid(Source)));
          return result;
      }
  }

On Saturday, April 12, 2003, at 12:20 AM, Terje Slettebø wrote:

>> From: "Matthias Troyer" <troyer_at_[hidden]>
>
>> There is a problem with this patch, since it was a patch for the
>> 1.30.0
>> release version of the boost sources, which is not the same code as
>> the
>> main branch of the CVS to which you now applied it. The 1.30.0 release
>> uses detail::no_lexical_conversion<Target, Source>, while the main
>> branch as far as I see still used bad_lexical_cast.
>
> The trunk was changed back to using bad_lexical_cast (after having used
> detail::no_lexical_conversion, with the types given in the what()
> string),
> with the type_info of the types used given with the source()/target()
> member
> functions, according to Kevlin Henney's suggestion.
>
> I only applied this change to the trunk, at the time, but I've now
> merged it
> (including the recent exception-patch) to 1.30.0, as well.
>
>
> Regards,
>
> Terje
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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