g++: change in behaviour since gcc-2.95.2

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Dec 31 23:54:00 GMT 1999


> Is this new behaviour according to the standard? If so, could you
> please point me to some information why pointers to functions cannot
> be used as template parameter types?

I'm not entirely sure, but I believe this is due to 14.8.2/2

# Type deduction may fail for the following reasons:
# ...
#  - Attempting to create a cv­qualified function type.

Of course, this is not exactly the right place, since we have no
explicit template arguments, but deduction. The apparent intent is
that it applies to the deduced arguments as well, since there are no
cv-qualified function types in C++.

Hope this helps,
Martin



More information about the Gcc mailing list