https://bugs.llvm.org/show_bug.cgi?id=41829
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
Assignee: unassignedclangb...@nondot.org
Reporter: tadeus.prast...@unitn.it
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
The following MWE works in GCC C++17 but not Clang C++17 (see
https://www.godbolt.org/z/ME1Xoa):
-- 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:
https://bugs.llvm.org/show_bug.cgi?id=40983
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs