This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61987] Name Resolution within a Template
- From: "gaoyuanming at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Aug 2014 11:25:14 +0000
- Subject: [Bug c++/61987] Name Resolution within a Template
- Auto-submitted: auto-generated
- References: <bug-61987-4 at http dot gcc dot gnu dot org/bugzilla/>
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.