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++/36883] New: Overeager ADL again


If I understand correctly, the following should not compile, because normal
lookup is supposed to look backwards from the calling template's
point-of-definition.  There's nothing to make foo an associated namespace of
boo::X.

namespace boo
{
  struct X {};
}

namespace foo
{
  template <class T>
  void bar( T x )
  {
      baz(x); // <== should fail here
  }

  void baz(boo::X) {}
}

int main()
{
    foo::bar( boo::X() );
}


-- 
           Summary: Overeager ADL again
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dave at boost-consulting dot com


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


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