
28 May
2011
28 May
'11
3:03 p.m.
On Sat, May 28, 2011 at 10:49 AM, Christopher Jefferson < chris@bubblescope.net> wrote:
I think we should go macro.
Agreed.
I wonder if the macro should take a parameter, just to give some way of getting a unique name. We could of course use some random integer / line number / file name, but such things are likely to be fragile and code could easily end up breaking the "one definition rule".
We shouldn't need to do this or use any kind of unique ID. ODR isn't a problem here, just have the macro create a nested type behind the scenes with a complicated name and use the pointer-to-member trick with that. -- -Matt Calabrese