https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5458
Jason Merrill changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
--- Comment #17 from jason at gcc dot gnu dot org 2010-01-21 19:09 ---
We describe a template as overloading itself since it represents any number of
actual functions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5458
--- Comment #16 from jwakely dot gcc at gmail dot com 2010-01-21 19:00
---
Shouldn't it get the same error as for this case?
template
T foo() { return T(); }
int main()
{
&foo;
}
That example can be made valid like so:
int (*pf)() = &foo;
Which demonstrates that the
--- Comment #15 from joseph dot h dot garvin at gmail dot com 2010-01-21
18:38 ---
I'm not sure what the standard says, but conceptually, if you only provide a
template generic template foo, with no non-templated foo defined, then
instantiations of foo are *never* 'overloaded.' If I hav
--- Comment #14 from jason at gcc dot gnu dot org 2009-11-25 02:55 ---
I'm not sure the standard actually says that this is well-formed, though it
seems reasonable to me.
13.4/2: If the name is a function template, template argument deduction is done
(14.9.2.2), and if the argument dedu
--- Comment #13 from v dot haisman at sh dot cvut dot cz 2008-01-07 20:47
---
This still fails in 4.3.0. Know to fail sorted and without duplicates should
read: 2.95.3 3.0.4 3.2.3 3.3.3 4.0.0 4.1.0 4.2.0 4.3.0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5458
--- Comment #12 from rodolfo at rodsoft dot org 2007-08-06 14:18 ---
This is an yet simpler case where this bug shows up:
template void foo(T);
void foo(int);
void bar()
{
&foo;
}
i686-pc-linux-gnu-g++-4.2.1 fails with:
teste.cpp: In function void bar():
teste.cpp:6: error: st
--- Comment #11 from pinskia at gcc dot gnu dot org 2007-08-06 13:58
---
*** Bug 33004 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
-
--- Comment #10 from v dot haisman at sh dot cvut dot cz 2006-10-09 14:16
---
Shouldn't the "Known to fail" field get all the versions from its duplicates
copied? Maybe that is why this rejects-valid bug is still not fixed even though
most other rejects-valid bugs get a lot of attention
--- Comment #9 from pinskia at gcc dot gnu dot org 2006-08-21 17:13 ---
*** Bug 28793 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
---
10 matches
Mail list logo