https://bugs.llvm.org/show_bug.cgi?id=47250
Bug ID: 47250
Summary: clang does not expect requires expression
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Compiling the following code with -std=c++2a, GCC accepts, while clang rejects.
Clang also rejects with -std=c++11/17.
$ cat s.C
template<class T>
bool f(T t) {
return requires(T t) {
++t;
};
}
int main() {
f(0);
return 0;
}
$ g++ -std=c++2a -c s.C
no errors.
$ clang++ std=c++2a -c s.C
s.C:3:19: error: 'T' does not refer to a value
return requires(T x) {
^
s.C:1:16: note: declared here
template<class T>
^
1 error generated.
--
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