
Tobias Schwinger wrote:
Paul Mensonides wrote:
----- 8.3.5/4
A cv-qualifier-seq shall only be part of the function type for a nonstatic member function, the function type to which a pointer to member refers, or the top-level function type of a function typedef declaration. The effect of a cv-qualifier-seq in a function declarator is not the same as adding cv-qualification on top of the function type, i.e., it does not create a cv-qualified function type. In fact, if at any time in the determination of a type a cv-qualified function type is formed, the program is ill-formed. -----
It is not too clear whether it applies to partial template specialization, since we don't really "form" a type - we just consider a possibitity:
typedef int my_const_function() const;
template<typename T> struct remove_const { typedef T type; }; template<typename T> struct remove_const< T const > { typedef T type; };
// somwhere else remove_const<my_const_function>::type // ill-formed?
http://tinyurl.com/52g6s (item 295) is still too thin for this case, isn't it?