This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/26448] unnecessary namespace-alias ambiguity



------- Comment #2 from emilp at mac dot com  2006-03-08 08:45 -------
But isn't this problem already solved for the "using" directive. The code below
compiles fine and works as expected. In fact, in the days of gcc 3, "using"
could be used for namespaces and behaved exactly the way I would prefer.

namespace lib1
{
    typedef int integer;
}

namespace lib2
{
    using lib1::integer;
}

using namespace lib1;
using namespace lib2;

int main()
{
    integer val = 0;
    return val;
}

It seems limiting to introduce new (and often obscure) ambiguities when using
namespace aliases, the very problem namespaces are meant to alleviate...

E.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26448


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