[Boost-bugs] [Boost C++ Libraries] #5757: boost::property_tree::ptree_bad_data::data<T>() should be const

Subject: [Boost-bugs] [Boost C++ Libraries] #5757: boost::property_tree::ptree_bad_data::data<T>() should be const
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-05 18:30:43


#5757: boost::property_tree::ptree_bad_data::data<T>() should be const
--------------------------------------+-------------------------------------
 Reporter: charlie@… | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
--------------------------------------+-------------------------------------
 The following won't compile
  try { /*...*/ }

  catch( const boost::property_tree::ptree_bad_data &e )

  { std::cout << e.data<std::string>(); }

 as the relevant member function template is not const. Additionally, I
 think the documentation should give a reminder or a hint that a template
 parameter is necessary, and why this is the case.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5757>
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:07 UTC