-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Closed
Copy link
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsregression
Description
The following valid translation unit
template<bool b>
concept bool_ = b;
template<typename... Ts>
concept unary = bool_<sizeof...(Ts) == 1>;
static_assert(!unary<>);
static_assert(unary<void>);
causes clang to fail with
<source>:8:15: error: static assertion failed
8 | static_assert(unary<void>);
| ^~~~~~~~~~~
<source>:8:15: note: because 'void' does not satisfy 'unary'
<source>:5:17: note: because 'sizeof...(Ts) == 1' does not satisfy 'bool_'
5 | concept unary = bool_<sizeof...(Ts) == 1>;
| ^
<source>:2:17: note: because 'false' evaluated to false
2 | concept bool_ = b;
| ^
1 error generated.
Compiler returned: 1
Commenting out either static assert causes the failure to go away. This was introduced by 9583b39 @cor3ntin @zyn0217
See it live: https://godbolt.org/z/r5nPr5TKe
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsregression