Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-04-11 14:06:41


Dear John,

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. Could somebody make
lexical_cast in boost 1.30.0 consistent with the main branch of the CVS?

Here is the diff:

cvs diff -r 1.12 lexical_cast.hpp
Index: lexical_cast.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/lexical_cast.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -r1.12 -r1.13
20a21
> #include <boost/throw_exception.hpp>
189c190
< throw bad_lexical_cast(typeid(Target), typeid(Source));

---
 >             throw_exception(detail::no_lexical_conversion<Target, 
Source>());
203a205
 >
Thanks in advance,
Matthias
On Friday, April 11, 2003, at 10:47 AM, Synge Todo wrote:
> Dear Boosters,
>
> I'm sending a tiny patch to boost/lexical_cast.hpp, which is required
> to compile with -DBOOST_NO_EXCEPTIONS.  Could someone apply this patch?
>
> Best regards,
>
> Synge Todo
> wistaria_at_[hidden]
> diff -crN boost_1_30_0.orig/boost/lexical_cast.hpp 
> boost_1_30_0/boost/lexical_cast.hpp
> *** boost_1_30_0.orig/boost/lexical_cast.hpp	Wed Mar 19 21:14:32 2003
> --- boost_1_30_0/boost/lexical_cast.hpp	Wed Apr  9 19:23:05 2003
> ***************
> *** 17,22 ****
> --- 17,23 ----
>   #include <string>
>   #include <typeinfo>
>   #include <boost/config.hpp>
> + #include <boost/throw_exception.hpp>
>   #include <boost/limits.hpp>
>   #include <boost/type_traits/is_pointer.hpp>
>
> ***************
> *** 190,196 ****
>           Target result;
>
>           if(!(interpreter << arg && interpreter >> result))
> !             throw detail::no_lexical_conversion<Target, Source>();
>           return result;
>       }
>   }
> --- 191,197 ----
>           Target result;
>
>           if(!(interpreter << arg && interpreter >> result))
> !             throw_exception(detail::no_lexical_conversion<Target, 
> Source>());
>           return result;
>       }
>   }
> _______________________________________________
> Unsubscribe & other changes: 
> http://lists.boost.org/mailman/listinfo.cgi/boost
On Friday, April 11, 2003, at 12:50 PM, John Maddock wrote:
>> I'm sending a tiny patch to boost/lexical_cast.hpp, which is required
>> to compile with -DBOOST_NO_EXCEPTIONS.  Could someone apply this 
>> patch?
>
> Done,
>
> John.

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