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

Zack Weinberg zack@codesourcery.com
Wed Apr 16 01:50:00 GMT 2003


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> Zack Weinberg <zack@codesourcery.com> writes:
>
> | Loren James Rittle <rittle@latour.rsch.comm.mot.com> writes:
> | 
> | >>I'm wondering how much typing you would save with CPP...
> | >
> | > I wondered the same thing.  How do I put a #if region inside a macro
> | > defined with #define?
> | >
> | > 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.
> | 
> | If you want to talk about extensions to allow it, I would suggest that
> | you instead allow
> | 
> |   if (a) using ::b;
>
> This, unfortunately won't solve the original concern since in that
> specific case the using-declaration ought to appear at a
> namespace-scope -- where one can't use if(). 

So all that means is it's two extensions - one to allow conditional
using, and another to allow if at namespace scope (possibly only
"if (expr) using ..." at namespace scope)

By the way, why isn't

using ::a, ::b;

allowed?



> I believe you're going far beyond where most of us, zealous C++
> programmers wanting to get rid of CPP, didn't even go -- we just
> dreamt it ;-)

Heh.  You think *that*'s ambitious, you should see what I want to
replace preprocessor macros with.

> At any rate, it is interesting to note that it is somehow part of
> Daveed Vandevoorde meta-programming extension to C++ (except that you
> need to prefix it with "metacode") he talked about both at the ACCU
> conference and the ISO C++ committee meeting.

URL?

zw



More information about the Libstdc++ mailing list