
Thomas Heller-7 wrote:
On Wed, May 25, 2011 at 5:04 PM, Vicente Botet <vicente.botet@wanadoo.fr> wrote:
Hi,
I have found an error when we define new phoenix expression inside boost namespace.
The following
<snip>
BOOST_PHOENIX_DEFINE_EXPRESSION( // line 19 (boost)(convert_to) , (proto::terminal<boost::phoenix::detail::target<proto::_> >) (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_PHOENIX_DEFINE_EXPRESSION( // line 19 (boost)(convert)(convert_to) , (proto::terminal<boost::phoenix::detail::target<proto::_> >) (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 differently. Best, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/phoenix-conflicts-between-result-of-names... Sent from the Boost - Dev mailing list archive at Nabble.com.