Created on 2004-02-12.00:00:00 last changed 197 months ago
[Voted into WP at April 2005 meeting.]
Proposed resolution (October, 2004):
Add the following as a new paragraph after 9.9 [namespace.udecl] paragraph 5:
A using-declaration shall not name a namespace;
Notes from the March 2004 meeting:
We agree that it should be an error.
Can a using-declaration be used to import a namespace?
namespace my_namespace{ namespace my_namespace2 { int function_of_my_name_space(){ return 2;} } } int main (){ using ::my_namespace::my_namespace2; return my_namespace2::function_of_my_name_space(); }
Several popular compilers give an error on this, but there doesn't seem to be anything in 9.9 [namespace.udecl] that prohibits it. It should be noted that the user can get the same effect by using a namespace alias:
namespace my_namespace2 = ::my_namespace::my_namespace2;
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2005-10-22 00:00:00 | admin | set | status: dr -> wp |
2005-05-01 00:00:00 | admin | set | messages: + msg1190 |
2005-05-01 00:00:00 | admin | set | status: ready -> dr |
2004-11-07 00:00:00 | admin | set | messages: + msg1047 |
2004-11-07 00:00:00 | admin | set | status: drafting -> ready |
2004-04-09 00:00:00 | admin | set | messages: + msg977 |
2004-04-09 00:00:00 | admin | set | status: open -> drafting |
2004-02-12 00:00:00 | admin | create |