Title
Missing description of class SFINAE
Status
open
Section
17.9.2 [temp.deduct]
Submitter
Ville Voutilainen

Created on 2014-12-07.00:00:00, last changed 2014-12-07.00:00:00.

Messages

Date: 2017-02-06.00:00:00

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.

History
Date User Action Args
2014-12-07 00:00:00admincreate