Boost logo

Boost :

Subject: Re: [boost] [boost/foreach] What is wrong with BOOST_FOREACH(const std::string &name, m_modules)?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-09-09 14:00:11


AMDG

On 09/09/2011 10:40 AM, Eric Niebler wrote:
> On 9/9/2011 1:31 PM, Steven Watanabe wrote:
>> On 09/09/2011 09:51 AM, Demetrio Car wrote:
>>> I am trying to compile this example
>>> http://www.boost.org/doc/libs/1_42_0/doc/html/boost_propertytree/tutorial.html
>>> and I am getting the error
>>> "/usr/local/boost_1_47_0/boost/property_tree/detail/ptree_implementation.hpp:795:54:
>>> error: request for member ‘put_value’ in ‘tr’, which is of non-class type
>>> ‘bool’" in this line:
>>> BOOST_FOREACH(const std::string &name, m_modules){
>>> pt.put("debug.modules.module", name, true);
>>> }
>>>
>>> My full error message is:
>>>
>>> <snip>
>>>
>>
>> I'd guess that this is a breaking change between
>> 1.42 and 1.47. I checked the documentation
>> for 1.47 and the example has definitely changed.
>
> Steven, a breaking change in what? Which example has changed? Where? Is
> this a problem in BOOST_FOREACH or in property_tree?
>

It has to be in property_tree. The error
is inside property_tree, and m_modules is
just a std::set<std::string>.

In Christ,
Steven Watanabe




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk