Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7679: unhex level 4 compile warning in visual studio
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-02 17:44:55
#7679: unhex level 4 compile warning in visual studio
-----------------------------------------------+----------------------------
Reporter: Gary Sanders <lex21@â¦> | Owner: marshall
Type: Bugs | Status: new
Milestone: To Be Determined | Component: algorithm
Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords: unhex
-----------------------------------------------+----------------------------
Comment (by Gary Sanders <lex21@â¦>):
The structure of the proposed patch is as follows:
{{{
template <typename T> T hex_char_to_int ( T c ) {
T r;
if (...) r = ...;
else if (...) r = ...;
else if (...) r = ...;
else BOOST_THROW_EXCEPTION (...);
return r;
}
}}}
There is one and only one return point. Therefore, the return cannot be
un-reachable.
The proposed patch, verified on GCC 4.6.3, Visual Studio 2010 and Visual
Studio 2012, does not emit warnings. Furthermore, it removes the need for
hex_char_to_int reside an anonymous namespace, which could cause link
errors if used within multiple translation units.
The reality is that even if Microsoft agreed to change their compiler, it
will not be done for Visual Studio 2010 or 2012. In the spirit of the last
comment in hex_char_to_in, ('keep dump compilers happy') it would be very
much appreciated if you would endeavour to keep Visual Studio happy, too.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7679#comment:4> 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:50:11 UTC