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


The following should compile.  fu::bar<axe::handle>::baz is not a template-id, 
and therefore axe:: should not be considered to be an associated namespace in 
the call to f.
-------

namespace fu
{
  template <class T>
  struct bar
  {
      struct baz {};
  };
}

namespace axe
{
  struct handle {};
  
  template <class T>
  char* f(T&);
};

namespace test
{
  template <class T>
  int f(T const&);
  
  template <class T>
  int g(T x) { return f(x); }
  
  int x = g(fu::bar<axe::handle>::baz());
};

-- 
           Summary: Overeager ADL
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dave at boost-consulting dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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