Re: [Boost-bugs] [Boost C++ Libraries] #11599: VS2015 warns that in new_tree, not all control paths return a value

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11599: VS2015 warns that in new_tree, not all control paths return a value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-11 18:33:56


#11599: VS2015 warns that in new_tree, not all control paths return a value
------------------------------------------+---------------------------
  Reporter: Edward Brey <edward.brey@…> | Owner: cornedbee
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: property_tree
   Version: Boost 1.59.0 | Severity: Problem
Resolution: fixed | Keywords: warnings
------------------------------------------+---------------------------

Comment (by Edward Brey <edward@…>):

 Adding a throw with a custom string runs mildly contrary to the C++
 tradition of "don't pay for what you don't use". In this case, everyone
 knows that the code will never be called - but not the compiler, which
 will do its duty to use the necessary code space, with its accompanying
 penalties for load time and cache hit rate. Any thought of my original
 suggestion of just making the one of the cases be the default?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11599#comment:8>
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:20 UTC