Bug ID: 41829
           Summary: Non-type template parameter with const-qualification
                    is no longer matched by specialization
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++'17

The following MWE works in GCC C++17 but not Clang C++17 (see

-- 8< --
template<typename T, T v>
struct X {

template<typename T>
struct Y {
  static constexpr int a = 1;

template<typename T, T v>
struct Y<X<T, v>> {
  static constexpr int a = 2;

static_assert(Y<X<const int, 10>>::a == 2, "1");

int main() {
-- 8< --

The MWE should work in Clang C++17 because it works in Clang C++14.  The
following bug report may be related:

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to