This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16156] Fails to identify default pointer-to-member-function arg in template function
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2004 13:31:24 -0000
- Subject: [Bug c++/16156] Fails to identify default pointer-to-member-function arg in template function
- References: <20040623093736.16156.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-06-23 13:31 -------
Default arguments may not be used to deduce template arguments. Thus,
in
Bar(a)
you only specify T=A in
template<typename T, typename U>
void Bar(T& t, U(T::*f)() = &T::Foo) {}
but U can't be deduced from the call and must not be deduced from the
default argument.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16156