Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2007-07-02 17:13:44


Hi Eric

Thanks for all the help so far. I'm now filling out my prototype if/else implementation, mainly following your excellent recipe, and I've encountered a little annoyance.

If I write an expression like:

_1 + _2

ADL finds all the necessary operators etc in boost::proto (_1 and _2 are my placeholders in the phoenix namespace, using your extends mechanism), so it can built the right expression tree. All good so far.

If I now write:

if_(_1 == _2)[stuff...] // stuff... is unimportant

Unfortunately proto::if_ is pulled in. This means I have to qualify phoenix::if_, which looks a bit too verbose for a lambda library. I think this could be addressed by moving the stuff that does not pertain to expression tree generation out of the boost::proto namespace, and into another boost::proto::other_stuff namespace, so the chances of it being pulled during tree construction are reduced, and I can have my unqualified syntax back. Is this possible? Or have I missed something on my side that could prevent this happening?

Cheers

Dan

      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/


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