Skip to content

Commit

Permalink
Merge pull request #114 from ashtum/update-snippet-in-documentation
Browse files Browse the repository at this point in the history
Update snippet in documentation
  • Loading branch information
pdimov authored Nov 17, 2023
2 parents 2f40efb + 8d60172 commit 211c638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/accessing.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Property tree resembles (almost is) a standard container with value type of `pai

To find the value of `pi` we might do the following:

__ptree__::__ptree_const_iterator__ it = pt.__ptree_find__("pi");
__ptree__::__ptree_const_assoc_iterator__ it = pt.__ptree_find__("pi");
double pi = boost::lexical_cast<double>(it->second.__ptree_data__());

This looks quite cumbersome, and would be even more so if `pi` value was not stored so near the top of the tree, and we cared just a little bit more about errors. Fortunately, there is another, correct way of doing it:
Expand Down

0 comments on commit 211c638

Please sign in to comment.