[Bug c++/6424] [DR 339] sizeof() with overload resolution
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 9 11:50:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-08-09 11:50 -------
Actually, icc doesn't handle this at all: it rejects the code
with the error message
g/x> icc -c x.cc
x.cc(10): error: no instance of function template "f" matches the argument
list
argument types are: (int)
f(1);
^
The same happens if I explicitly say f<int>(1) in the call in main().
I never quite understood why we have to mangle the return expression
for examples like this, i.e. mangle A<sizeof(xxx((T)0))> instead of
A<1>. I know that the ABI says so, but can someone point me to a
simple explanation _why_ it says so?
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6424
More information about the Gcc-bugs
mailing list