forked from hsutter/cppfront
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpure2-bugfix-for-non-local-function-expression.cpp
More file actions
39 lines (21 loc) · 1.13 KB
/
pure2-bugfix-for-non-local-function-expression.cpp
File metadata and controls
39 lines (21 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#define CPP2_INCLUDE_STD Yes
//=== Cpp2 type declarations ====================================================
#include "cpp2util.h"
#line 1 "pure2-bugfix-for-non-local-function-expression.cpp2"
#line 9 "pure2-bugfix-for-non-local-function-expression.cpp2"
class t;
//=== Cpp2 type definitions and function declarations ===========================
#line 1 "pure2-bugfix-for-non-local-function-expression.cpp2"
// Clang note: When using Clang as the Cpp1 compiler, the following uses of an unnamed function
// require Clang 13 or higher; Clang 12 complains "lambda expression in an unevaluated operand"
// Standalone Cpp1 repro: https://godbolt.org/z/dznnYTvc6
#line 5 "pure2-bugfix-for-non-local-function-expression.cpp2"
template<typename T> concept v = []() -> bool { return true; }();
using u = decltype([]() -> void{});
class t: public decltype([]() -> void{}) {
};
auto main() -> int;
//=== Cpp2 function definitions =================================================
#line 1 "pure2-bugfix-for-non-local-function-expression.cpp2"
#line 13 "pure2-bugfix-for-non-local-function-expression.cpp2"
auto main() -> int{}