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++/61987] Name Resolution within a Template


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987

--- Comment #6 from Yuanming Gao <gaoyuanming at hotmail dot com> ---
Visual C++ can select the  int foo(int) correctly. I don't know whether it is
an implementation issue, or it is by design.

Best regards,
Yuanming

> From: gcc-bugzilla@gcc.gnu.org
> To: gaoyuanming@hotmail.com
> Subject: [Bug c++/61987] Name Resolution within a Template
> Date: Fri, 1 Aug 2014 10:06:00 +0000
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987
> 
> --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> (In reply to Yuanming Gao from comment #3)
> > Please read the book: <<Inside the Cpp Object Mode>>. The code comes from
> > <<7.1 Templates>>. The author thought the function int foo(int) must be
> > selected.
> 
> Well I disagree with that book based on what the c++ standard says about
> foundmental types and how argument dependent lookup works.
> 
> 
> >  
> >  
> > Best regards,
> > Yuanming Gao
> >  
> > > From: gcc-bugzilla@gcc.gnu.org
> > > To: gaoyuanming@hotmail.com
> > > Subject: [Bug c++/61987] Name Resolution within a Template
> > > Date: Fri, 1 Aug 2014 09:46:21 +0000
> > > 
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987
> > > 
> > > --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> > > I don't think this is a bug as foundmental types does not have an associated
> > > namespace associated with it. So the overload set is only what is declared
> > > before the template.
> > > 
> > > -- 
> > > You are receiving this mail because:
> > > You reported the bug.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.


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