[llvm-bugs] [Bug 52280] New: Incrementation of bool values is erroneously permitted in not-evaluated contexts
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Oct 24 06:36:22 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52280
Bug ID: 52280
Summary: Incrementation of bool values is erroneously permitted
in not-evaluated contexts
Product: clang
Version: 12.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2b
Assignee: unassignedclangbugs at nondot.org
Reporter: fchelnokov at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
This program is valid:
```
template<class T>
concept is_incrementable = requires(T t) {
{ ++t };
};
int main() {
static_assert( is_incrementable<int> );
static_assert( !is_incrementable<bool> );
}
```
but rejected in Clang because it permits the incrementation of bool values in
not-evaluated contexts.
Related discussion: https://stackoverflow.com/q/51011835/7325599
--
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/20211024/ecd7d1c9/attachment.html>
More information about the llvm-bugs
mailing list