[llvm-bugs] [Bug 41829] New: Non-type template parameter with const-qualification is no longer matched by specialization
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 10 05:52:48 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: tadeus.prastowo at unitn.it
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190510/217478ca/attachment.html>
More information about the llvm-bugs
mailing list