Opened 11 years ago

Closed 11 years ago

#5757 closed Bugs (fixed)

boost::property_tree::ptree_bad_data::data<T>() should be const

Reported by: charlie@… Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

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.

Change History (1)

comment:1 by Sebastian Redl, 11 years ago

Resolution: fixed
Status: newclosed

(In [76447]) Merge [72000],[72001],[72003], [74691], [75587], [75589], [75590], and [75593] from trunk. Fixes bug 4840. Fixes bug 5259. Fixes bug 5281, I think. Fixes bug 5944. Fixes bug 5757. Fixes bug 5710. Fixes bug 5307, I think.

Note: See TracTickets for help on using tickets.