This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH (libstdc++-v3): Fix libstdc++/7680 (and a reference fix for the dynamic visibility of C99 features in system headers)
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: ncm at cantrip dot org
- Date: Wed, 16 Apr 2003 03:13:00 -0500 (CDT)
- Subject: Re: PATCH (libstdc++-v3): Fix libstdc++/7680 (and a reference fix for the dynamic visibility of C99 features in system headers)
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
- References: <200304160031.h3G0VpBt043952@latour.rsch.comm.mot.com>
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