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

            Bug ID: 86920
           Summary: A matching template specialization is not selected
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: v.reshetnikov at gmail dot com
  Target Milestone: ---

/****************** BEGIN SOURCE ******************/
template<class>
struct S {
    template<bool...>
    struct X { 
        static constexpr bool value = false;
    };
};

template<>
template<bool v>
struct S<int>::X<v> { 
    static constexpr bool value = true;
};

static_assert(S<int>::X<true>::value);
/******************* END SOURCE *******************/

EXPECTED: no errors

ACTUAL:

<source>:15:15: error: static assertion failed
15 | static_assert(S<int>::X<true>::value);
   |               ^~~~~~

Reply via email to