--- Additional Comments From igodard at pacbell dot net 2005-09-20 20:38
---
Many thanks for taking the time for the lengthy explanation. It is deeply
appreciated.
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23977
--- Additional Comments From bangerth at dealii dot org 2005-09-20 20:07
---
A constructor is a special function the name of which is that of the type
to which it belongs. The type's name is that that includes template arguments.
You could also say that the constructor is a function
--- Additional Comments From igodard at pacbell dot net 2005-09-20 18:36
---
So a constructor counts as a type for deduction purposes? I'd always thought of
it as a function, albeit a peculiar kind of one. It's the parentheses I suppose
:-)
Ivan
--
http://gcc.gnu.org/bugzilla/show_
--- Additional Comments From bangerth at dealii dot org 2005-09-20 18:28
---
In particular, template arguments are _never_ deduced for types, only for
functions.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23977
--- Additional Comments From igodard at pacbell dot net 2005-09-20 12:43
---
Bummer. I wonder why? I suppose the workaround is an inline helper function
wrapping the constructor, plus a couple of calls on the copy constructor...
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23
--- Additional Comments From giovannibajo at libero dot it 2005-09-20
12:34 ---
Yes, this is how C++ works. There is no template argument deduction from
constructors.
--
What|Removed |Added