PATCH (libstdc++-v3): Fix libstdc++/7680 (and a reference fix for the dynamic visibility of C99 features in system headers)
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Wed Apr 16 08:14:00 GMT 2003
In article <20030416025821.GC31329@tofu.dreamhost.com> Nathan writes:
>> > | > I need to define something like this to tighten it:
>> > | >
>> > | > #define _GLIBCXX_C99_BIND(a,b) \
>> > | > #if (a) \
>> > | > using ::b; \
>> > | > #endif \
>> > | This, I'm afraid, is completely impossible.
>
>It seems to me you can say
>
> #define _USING_0(b)
> #define _USING_1(b) using ::b;
> #define _USING(a,b) _USING_##a(b)
> #define _GLIBCXX_C99_BIND(a,b) _USING(a, b)
>
> #define _USE_FOO 1 // yes
> #define _USE_BAR 0 // no
> #define _USE_BAZ 1 // yes
>
> _GLIBCXX_C99_BIND(_USE_FOO, foo) // yes
> _GLIBCXX_C99_BIND(_USE_BAR, bar) // no
> _GLIBCXX_C99_BIND(_USE_BAZ, baz) // yes
>
> but maybe I don't understand the problem well enough.
Nathan, I do believe that you have proposed the valid way to tighten
this up. Yes, I will convert the messy style I used to your clean
proposal.
Regards,
Loren
More information about the Libstdc++
mailing list