Modify

Opened 6 years ago

Closed 6 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.

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Sebastian Redl

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Sebastian Redl.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.