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

            Bug ID: 59815
           Summary: Apparently bogus error: 'Outer' is already declared in
                    this scope
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/12471255

/// --- cut ---
namespace foo
{
  template < typename > class A
  {
    template < typename > friend class Outer;
  };
  class B:foo::A < int >
  {
  };
  template < typename > class Outer;
}

using foo::Outer;
/// --- cut ---

Using g++ (GCC) 4.9.0 20140110 (experimental):

g++ -c tt.cc

tt.cc:13:12: error: 'Outer' is already declared in this scope
 using foo::Outer;
            ^

Source is accepted by Clang and is believed to be valid.

Reply via email to