From 8d60172329c77a1ed1118eaf27da877a215fdeac Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Fri, 17 Nov 2023 14:01:26 +0000 Subject: [PATCH] Update snippet in documentation Resolves #95 --- doc/accessing.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/accessing.qbk b/doc/accessing.qbk index 20f0bc4a52..6e38d1d6a8 100644 --- a/doc/accessing.qbk +++ b/doc/accessing.qbk @@ -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(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: