1
1
// ----- Cpp2 support -----
2
2
#include " cpp2util.h"
3
3
4
+ #line 1 "mixed-captures-in-expressions-and-postconditions.cpp2"
5
+
6
+ #include < algorithm>
7
+ #include < vector>
4
8
5
- #line 2 "mixed-captures-in-expressions-and-postconditions.cpp2"
6
9
[[nodiscard]] auto main () -> int;
7
- #line 14 "mixed-captures-in-expressions-and-postconditions.cpp2"
8
- #line 16 "mixed-captures-in-expressions-and-postconditions.cpp2"
10
+ #line 17 "mixed-captures-in-expressions-and-postconditions.cpp2"
11
+ #line 19 "mixed-captures-in-expressions-and-postconditions.cpp2"
9
12
auto insert_at (cpp2::in<int > where, cpp2::in<int > val) -> void;
10
13
11
14
// === Cpp2 definitions ==========================================================
12
15
13
- #line 1 "mixed-captures-in-expressions-and-postconditions.cpp2"
16
+ #line 4 "mixed-captures-in-expressions-and-postconditions.cpp2"
14
17
15
18
[[nodiscard]] auto main () -> int{
16
19
std::vector<std::string> vec {
@@ -29,8 +32,8 @@ std::vector<int> vec { };
29
32
auto insert_at (cpp2::in<int > where, cpp2::in<int > val) -> void
30
33
{
31
34
cpp2::Default.expects (0 <= where && where <= CPP2_UFCS_0 (ssize, vec), " " );
32
- auto post_18_5 = cpp2::finally_success ([_0 = CPP2_UFCS_0 (ssize, vec)]{cpp2::Default.expects (CPP2_UFCS_0 (ssize, vec) == _0 + 1 , " " );} );
33
- #line 18 "mixed-captures-in-expressions-and-postconditions.cpp2"
35
+ auto post_21_5 = cpp2::finally_success ([_0 = CPP2_UFCS_0 (ssize, vec)]{cpp2::Default.expects (CPP2_UFCS_0 (ssize, vec) == _0 + 1 , " " );} );
36
+ #line 21 "mixed-captures-in-expressions-and-postconditions.cpp2"
34
37
35
38
36
39
CPP2_UFCS (insert, vec, CPP2_UFCS_0 (begin, vec) + where, val);
0 commit comments