Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1791: fix warning on MSVC warning level 4
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-22 13:21:38
#1791: fix warning on MSVC warning level 4
-------------------------------+--------------------------------------------
Reporter: Stephan | Owner: nasonov
Type: Patches | Status: new
Milestone: To Be Determined | Component: lexical_cast
Version: Boost 1.35.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by nasonov):
As you may guess, the return statement was added to supress a warning.
Can you please discusss possible workarounds on boost-devel? I don't have
time, sorry.
Off the top of my head:
template<class R, class E> R throw_exception_impl(E const & e)
{
throw_exception(e);
// I expect a lot of workarounds around this place
return R();
}
and then
throw_exception_impl<Target>(bad_lexical_cast(typeid(Source),
typeid(Target)));
--
Alex
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1791#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC