Re: [Boost-bugs] [Boost C++ Libraries] #8465: ptree get_child should not throw an exception on empty sets

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8465: ptree get_child should not throw an exception on empty sets
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-23 11:03:43


#8465: ptree get_child should not throw an exception on empty sets
-----------------------------------------------+---------------------------
  Reporter: Dale Stansberry <stansberrydv@…> | Owner: cornedbee
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: property_tree
   Version: Boost 1.53.0 | Severity: Problem
Resolution: invalid | Keywords:
-----------------------------------------------+---------------------------
Changes (by cornedbee):

 * status: new => closed
 * resolution: => invalid

Comment:

 Can you explain what your typical get_child loop looks like?

 If it is

     for (const auto& c : tree.get_child("path.to.child"))

 then I recommend you use tree.get_child("path.to.child", ptree()) instead
 to avoid the exception and simply get no loop iterations.

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