https://llvm.org/bugs/show_bug.cgi?id=23824
Bug ID: 23824
Summary: clang allows invalid lambda expression in decltype
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following invalid code compiles with clang (-std=c++14).
#include <type_traits>
template<class T>
constexpr int f() {
using Func = decltype(
[](auto x) { return x; }
);
return 0;
}
int main() {
std::integral_constant<int, f<int>()> x;
return 0;
}
Both gcc and EDG reject it.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs