https://bugs.llvm.org/show_bug.cgi?id=46960
Bug ID: 46960
Summary: Templated "constexpr auto" variable cannot be used for
SFINAE
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Not sure if they're the same, but it looks like that this one is related to Bug
43459 .
The following snippet compiles on Clang 8, but fails on Clang 9+ (up to trunk),
complaining "value of type 'const auto' is not implicitly convertible to
'bool'":
```cpp
#include <type_traits>
template <class T> struct C {
template <class U>
static constexpr auto constant_bool_v = sizeof(U) <= 4;
template <class U, class = std::enable_if_t<constant_bool_v<T>>>
C(U) {}
};
C<int> vvv('c');
```
Live demo: https://wandbox.org/permlink/b3r89SL8wZ8xyrzc
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs