This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16468] [DR460] using-declaration of namespace name
- From: "boris at kolpackov dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2004 21:25:38 -0000
- Subject: [Bug c++/16468] [DR460] using-declaration of namespace name
- References: <20040710210406.16468.boris@kolpackov.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From boris at kolpackov dot net 2004-07-12 21:25 -------
> Obviously, allowing a namespace name in a using-declaration inside a class
> declaration does not make much sense.
This is a bogus argument! Only names from base are allowed in using-declaration
inside a class. Following your logic we should also ban somethin like
namespace n
{
class foo {};
};
using n::foo;
Just because you cannot write
class bar
{
using n::foo;
};
> I think I'm just confused what effect you try to achieve by allowing namespace
> names in using-declarations that can't be achieved by other means as well?
Sure it can be achived by other means. I just don't see a reason why should it
be achived by other means? Here is the whole story: I have some amount of code
which works fine with gcc 3.x.y. Now I try to compile it with gcc 3.4.x and it
gives me an error about using-declaring namespace. Ok, I am thinking to myself,
it is probably either illegal or bug in gcc. So I am searching throug the
standard for any restrictions on the type of name that can be used in
using-declaration. The standard say none. Ok, I am thinking to myself, there
doesn't seem to be any good reason why one shouldn't using-declare a namespace
so it must be a bug in gcc. I am posting a bug report which is closed due to a
defect report (which, btw, hasn't been even voted upon) that says "we believe it
should be an error". Don't take it personaly, but if there is a defect report
that says everybody should start jumping off the roof, would you?
I posted a question to std.c++. I will follow up if anything comes out.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16468