[Proto][MPL]Missing ADL barrier in MPL

I've just hit a spurrious ADL resolution using MPL and Proto. I made a new function called size that took a proto expression and I get the compiler to complain about ambiguity between mpl::size<T> and my own size() function. I tried to add ADL Barrier to size by looking at how it was used in other MPL components but it still fail to resolve the proper symbol under gcc 4.3. Any idea on what to do to fix that ?

Joel Falcou wrote:
I've just hit a spurrious ADL resolution using MPL and Proto. I made a new function called size that took a proto expression and I get the compiler to complain about ambiguity between mpl::size<T> and my own size() function.
I tried to add ADL Barrier to size by looking at how it was used in other MPL components but it still fail to resolve the proper symbol under gcc 4.3.
Any idea on what to do to fix that ?
Could you send a repro? -- Eric Niebler BoostPro Computing http://www.boostpro.com

Could you send a repro? I'm trying but it seems I can't. Well, I think that in fact I must have a MPL type somewhere as a tempalte argument or base type I forgot to remove/wrap. THe question is, shouldn't *all* MPL component be ADL
Eric Niebler wrote: protected ? -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35

joel wrote:
Eric Niebler wrote:
Could you send a repro? Still no repro ... but I foudnout tha the error goes away if I don't inherit from extend but use PROTO_BASIC_EXTEND ... Problem is that those expression can't be POD :/
I'll try to find a decent use case that exhibit the error but I think the problem is on my side. What can trigger such ADL problem so I know what to seek out?

Joel Falcou wrote:
joel wrote:
Eric Niebler wrote:
Could you send a repro?
OK, sorry for the noise. The error came from the fact I used boost::mpl::_ in a lambda function in the expression grammar. The domain uses the grammar as tempalte parameters and the expression inherits from the domain, leading to the ADL error. So this means I think that's MPl that require fixing.

on Tue Oct 13 2009, Joel Falcou <joel.falcou-AT-lri.fr> wrote:
Joel Falcou wrote:
joel wrote:
Eric Niebler wrote:
Could you send a repro?
OK, sorry for the noise. The error came from the fact I used boost::mpl::_ in a lambda function in the expression grammar. The domain uses the grammar as tempalte parameters and the expression inherits from the domain, leading to the ADL error.
So this means I think that's MPl that require fixing.
Please add a ticket and assign it to Aleksey Thanks, -- Dave Abrahams Meet me at BoostCon: http://www.boostcon.com BoostPro Computing http://www.boostpro.com

David Abrahams wrote:
Please add a ticket and assign it to Alekse Added https://svn.boost.org/trac/boost/ticket/3530 I'll edit it with a comprehensive list of unprotected struct so the fix can be done on all in one shot.
I tried myself to use the MPL_ADL_BARRIER features on my local trunk but it failed due, I think, to the fact I used it too naively. If I get it working, I'll uplaod a patch durin g the week. -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
participants (4)
-
David Abrahams
-
Eric Niebler
-
joel
-
Joel Falcou