g++ (GCC) 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)

g++ fails to compile the attached program with the following error

$ g++ bug.cpp
bug.cpp: In member function 'void B::foo(N::C)':
bug.cpp:12: error: cannot convert 'N::C' to 'long int' for argument '1' to
'void foo(long int)'

Note that removing namespace enclosure make the program compile fine.


-- 
           Summary: g++ is confused when function is defined inside and
                    outside some namespace and called with '::' prefix
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: relf at os2 dot ru


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

Reply via email to