This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


2054. Missing description of class SFINAE

Section: 13.10.3  [temp.deduct]     Status: ready     Submitter: Ville Voutilainen     Date: 2014-12-07

Presumably something like the following should be well-formed, where a deduction failure in a partial specialization is handled as a SFINAE case as it is with function templates and not a hard error:

  template <class T, class U> struct X   {
    typedef char member;

  template<class T> struct X<T,
   typename enable_if<(sizeof(T)>sizeof(
     float)), float>::type>
    typedef long long member;

  int main() {
    cout << sizeof(X<double, float>::member);

However, this does not appear to be described anywhere in the Standard.

Additional notes (January, 2023)

The section on SFINAE ( [temp.deduct.general] paragraph 8) is not specific to function templates, and [temp.spec.partial.match] paragraph 2 hands off the "matching" determination for partial specializations to 13.10.3 [temp.deduct] in general. However, the definition of deduction substitution loci in [temp.deduct.general] paragraph 7 does not account for the template argument list of a partial specialization.

Proposed resolution (approved by CWG 2023-11-08):

Change in [temp.deduct.general] paragraph 7 as follows:

The deduction substitution loci are The substitution occurs in all types and expressions that are used in the deduction substitution loci. ...