Modify

Ticket #5757 (closed Bugs: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: charlie@… Owned by: cornedbee
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

Change History

comment:1 Changed 2 years ago by cornedbee

  • Status changed from new to closed
  • Resolution set to fixed

(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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.