Escaped N macro from detail/constructor.hpp breaks Boost.Proto

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Escaped N macro from detail/constructor.hpp breaks Boost.Proto

Lars Viklund
Hi list.

In the 0.9 source release (and as far as I can see on github)
detail/constructor.hpp defines a macro N as part of PP iteration, but
never undefines it.

This results in fine libraries like Boost.Proto or anything else using
the N identifier to blow up nicely.

Adding an #undef N near the end of constructor.hpp seems to make my code
compile, but I'm unsure whether anything in luabind depends on this.

--
Lars Viklund | [hidden email]

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Escaped N macro from detail/constructor.hpp breaks Boost.Proto

Daniel Wallin
On Sat, Apr 17, 2010 at 02:37:15AM +0200, Lars Viklund wrote:

> Hi list.
>
> In the 0.9 source release (and as far as I can see on github)
> detail/constructor.hpp defines a macro N as part of PP iteration, but
> never undefines it.
>
> This results in fine libraries like Boost.Proto or anything else using
> the N identifier to blow up nicely.
>
> Adding an #undef N near the end of constructor.hpp seems to make my code
> compile, but I'm unsure whether anything in luabind depends on this.

Good catch! I've pushed the change to the 0.9 branch:

  http://github.com/luabind/luabind/commit/1bb54a3

Thanks,
--
Daniel Wallin
BoostPro Computing
http://www.boostpro.com

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user