[llvm-bugs] [Bug 42555] New: Template static constexpr bool class variable inside static_assert always pass
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 9 09:21:17 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42555
Bug ID: 42555
Summary: Template static constexpr bool class variable inside
static_assert always pass
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: brickmen75 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
There is a minimal example of code, that compiles on clang, but should not:
--------------------
template <class...>
struct foo {
template <class...>
static constexpr bool boo = false;
void goo() {
static_assert(boo<>, "");
}
};
int main() {
foo<> f;
f.goo();
}
----------
Msvc and gcc deny to compile such a code with 'static assertion failed' error,
as it should be.
Also godbolt example: https://godbolt.org/z/IaYnX5
--
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/20190709/a9814d4d/attachment.html>
More information about the llvm-bugs
mailing list