This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-05
9.3.4.6 [dcl.fct] paragraph 5 specifies that cv-qualifiers are deleted from parameter types. However, it's not clear what this should mean for function templates. For example,
template<class T> struct A {
typedef A arr[3];
};
template<class T> void f(const typename A<T>::arr) { }
template void f<int>(const A<int>::arr); // #1
template <class T> struct B {
void g(T);
};
template <class T> void B<T>::g(const T) { } // #2
If cv-qualifiers are dropped, then the explicit instantiation in #1 will fail to match; if cv-qualifiers are retained, then the definition in #2 does not match the declaration.
Rationale (August, 2010):
This is a duplicate of issue 1001.