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)


Zack Weinberg <zack at codesourcery dot com> writes:

[...]

| > | 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)

I'm afraid it would be three extensions because the conditional "if(a)"
creates an (invisible) scope and the using-declaration is local to
that scope: You would need another extension to zap that scope
(I think that won't play nicely).  David has the notion of code injection

  if(a)
     metacode -> {
       using ::b;
     }

| By the way, why isn't
| 
| using ::a, ::b;
| 
| allowed?

Because "using" is not a types-specifier? (I don't known the exact reason,
but I believe that it is in the tradition of C++ of encouraging
one-declaration per "line").

| > 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.

I'm curious ;-)

| > 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?

I think he does not put the slides on his website yet

  http://www.vandevoorde.com/

However, if you already have an EDG-based front-end you might want to
send him a mail at daveed at vandevoorde dot com since he has
implemented a preliminary version in an EGD front-end.
Alternatively, for the slides, you might want to ask your co-worker
who gave an excellent talk on GCC ABI at the ACCU conference.

-- Gaby


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