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 11:47:18


#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 JM Volle):

 In case it helps, what I did (warning seen with VS2015) to suppress the
 warning is simply add:
 {{{
 diff --git
 a/LIB/CPP_3rdParty/boost/1_60/boost/property_tree/detail/json_parser/standard_callbacks.hpp
 b/LIB/CPP_3rdParty/boost/1_60/boost/property_tree/detail/json_parser/standard_callbacks.hpp
 index 56c378e..bfa5374 100644
 ---
 a/LIB/CPP_3rdParty/boost/1_60/boost/property_tree/detail/json_parser/standard_callbacks.hpp
 +++
 b/LIB/CPP_3rdParty/boost/1_60/boost/property_tree/detail/json_parser/standard_callbacks.hpp
 @@ -129,6 +129,8 @@ namespace boost { namespace property_tree {
                  return new_tree();
              }
              assert(false);
 + throw(std::logic_error("reached passed assert!"));
 +
          }
          string& new_value() {
              if (stack.empty()) return new_tree().data();
 --
 }}}

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