11// ----- Cpp2 support -----
22#include " cpp2util.h"
33
4+ #line 1 "mixed-captures-in-expressions-and-postconditions.cpp2"
5+
6+ #include < algorithm>
7+ #include < vector>
48
5- #line 2 "mixed-captures-in-expressions-and-postconditions.cpp2"
69[[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"
912auto insert_at (cpp2::in<int > where, cpp2::in<int > val) -> void;
1013
1114// === Cpp2 definitions ==========================================================
1215
13- #line 1 "mixed-captures-in-expressions-and-postconditions.cpp2"
16+ #line 4 "mixed-captures-in-expressions-and-postconditions.cpp2"
1417
1518[[nodiscard]] auto main () -> int{
1619 std::vector<std::string> vec {
@@ -29,8 +32,8 @@ std::vector<int> vec { };
2932auto insert_at (cpp2::in<int > where, cpp2::in<int > val) -> void
3033{
3134 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"
3437
3538
3639 CPP2_UFCS (insert, vec, CPP2_UFCS_0 (begin, vec) + where, val);
0 commit comments