This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH (libstdc++-v3): Fix libstdc++/7680 (and a reference fix for the dynamic visibility of C99 features in system headers)


In article <20030416025821 dot GC31329 at tofu dot dreamhost dot 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]