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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to