https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100078

            Bug ID: 100078
           Summary: [11 Regression] Rejected code since
                    r11-8137-g84081e2c6bd43a67
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

The following is reduced from webkit2gtk3 package:

$ cat 2to3.ii
template <bool> struct enable_if;
template <typename Data> struct HashMapBucket {
  template <typename T = Data>
  static typename enable_if<T ::value>::type selectStructure() {
    selectStructure();
  }
};

$ g++ 2to3.ii -c
2to3.ii: In static member function ‘static typename enable_if<T::value>::type
HashMapBucket<Data>::selectStructure()’:
2to3.ii:5:20: error: no matching function for call to
‘HashMapBucket<Data>::selectStructure()’
    5 |     selectStructure();
      |     ~~~~~~~~~~~~~~~^~
2to3.ii:4:46: note: candidate: ‘template<class Data> template<class T> static
typename enable_if<T::value>::type HashMapBucket<Data>::selectStructure()’
    4 |   static typename enable_if<T ::value>::type selectStructure() {
      |                                              ^~~~~~~~~~~~~~~
2to3.ii:4:46: note:   template argument deduction/substitution failed:

Reply via email to