Boost logo

Boost :

Subject: Re: [boost] [phoenix] conflicts between result_of namespace and result_of class.
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-05-25 13:51:58

Thomas Heller-7 wrote:
> On Wed, May 25, 2011 at 5:04 PM, Vicente Botet
> <vicente.botet_at_[hidden]> wrote:
>> Hi,
>> I have found an error when we define new phoenix expression inside boost
>> namespace.
>> The following
> <snip>
>>    (boost)(convert_to)
>>  , (proto::terminal&lt;boost::phoenix::detail::target&lt;proto::_&gt; >)
>>    (boost::phoenix::meta_grammar)
>> )
> <snip>
>> It seems that the Phoenix result_of protocol and the utility result_of
>> conflicts.
>> Is this a real issue?
> No I don't think so. Why does this need to in the boost namespace in
> the first place?
> make it:
> (boost)(convert)(convert_to)
> , (proto::terminal&lt;boost::phoenix::detail::target&lt;proto::_&gt; >)
> (boost::phoenix::meta_grammar)
> )

This is what I have done to make it working. In addition others were already
reclaiming a specific namespace for Boost.Conversion.

> namespace boost
> {
> using convert::convert_to;
> }
> I don't know what currently is considered best practice, but isn't it
> considered bad to put
> stuff directly in the boost namespace?

The problem would be the same if Boost.Conversion had a class result_of
inside boost::conversion.
I don't know id the Boost.Phoenix documentation state explicitly that these
macros introduce a namespace result_of, but it would be great if it does. I
see that the documentation that the macro introduce the namespaces tag,
expression and rule, but result_of is missing.

> If it isn't, what are the general rules of when something is
> considered for being resident in the boost
> namespace?

I don't think that Boost must forbids the direct used of the boost
namespace. I recognize that in general using a specific namespace is a good
guideline, but I'm sure we want to use boost:: directly for the libraries
that are accepted or candidate to the standard, but maybe others think


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at