Skip to content

Commit 3ccc31e

Browse files
committed
test: regenerate regression tests
1 parent 5d484ca commit 3ccc31e

File tree

40 files changed

+166
-166
lines changed

40 files changed

+166
-166
lines changed

regression-tests/test-results/mixed-bounds-check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
std::set_terminate(std::abort);
2525

2626
std::vector v {1, 2, 3, 4, 5, -999};
27-
CPP2_UFCS_0(pop_back, v);
27+
CPP2_UFCS(pop_back)(v);
2828
std::cout << cpp2::assert_in_bounds(std::move(v), 5) << "\n";
2929
}
3030

regression-tests/test-results/mixed-bounds-safety-with-assert-2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ auto add_42_to_subrange(auto& rng, cpp2::in<int> start, cpp2::in<int> end) -> vo
3838
auto add_42_to_subrange(auto& rng, cpp2::in<int> start, cpp2::in<int> end) -> void
3939
{
4040
cpp2::Bounds.expects(cpp2::cmp_less_eq(0,start), "");
41-
cpp2::Bounds.expects(cpp2::cmp_less_eq(end,CPP2_UFCS_0(ssize, rng)), "");
41+
cpp2::Bounds.expects(cpp2::cmp_less_eq(end,CPP2_UFCS(ssize)(rng)), "");
4242

4343
auto count {0};
4444
for (

regression-tests/test-results/mixed-bounds-safety-with-assert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ auto print_subrange(auto const& rng, cpp2::in<int> start, cpp2::in<int> end) ->
3737

3838
auto print_subrange(auto const& rng, cpp2::in<int> start, cpp2::in<int> end) -> void{
3939
cpp2::Bounds.expects(cpp2::cmp_less_eq(0,start), "");
40-
cpp2::Bounds.expects(cpp2::cmp_less_eq(end,CPP2_UFCS_0(ssize, rng)), "");
40+
cpp2::Bounds.expects(cpp2::cmp_less_eq(end,CPP2_UFCS(ssize)(rng)), "");
4141

4242
auto count {0};
4343
for (

regression-tests/test-results/mixed-captures-in-expressions-and-postconditions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ auto insert_at(cpp2::in<int> where, cpp2::in<int> val) -> void
4545

4646
#line 22 "mixed-captures-in-expressions-and-postconditions.cpp2"
4747
{
48-
cpp2::Default.expects(cpp2::cmp_less_eq(0,where) && cpp2::cmp_less_eq(where,CPP2_UFCS_0(ssize, vec)), "");
49-
auto post_21_5 = cpp2::finally_success([_0 = CPP2_UFCS_0(ssize, vec)]{cpp2::Default.expects(CPP2_UFCS_0(ssize, vec) == _0 + 1, "");} );
48+
cpp2::Default.expects(cpp2::cmp_less_eq(0,where) && cpp2::cmp_less_eq(where,CPP2_UFCS(ssize)(vec)), "");
49+
auto post_21_5 = cpp2::finally_success([_0 = CPP2_UFCS(ssize)(vec)]{cpp2::Default.expects(CPP2_UFCS(ssize)(vec) == _0 + 1, "");} );
5050
#line 23 "mixed-captures-in-expressions-and-postconditions.cpp2"
51-
static_cast<void>(CPP2_UFCS(insert, vec, CPP2_UFCS_0(begin, vec) + where, val));
51+
static_cast<void>(CPP2_UFCS(insert)(vec, CPP2_UFCS(begin)(vec) + where, val));
5252
}
5353

regression-tests/test-results/mixed-fixed-type-aliases.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ auto test(auto const& x) -> void{
4545
test(std::move(z));
4646

4747
for ( auto const& arg : args )
48-
std::cout << CPP2_UFCS_0(filename, std::filesystem::path(arg)) << "\n";
48+
std::cout << CPP2_UFCS(filename)(std::filesystem::path(arg)) << "\n";
4949
}
5050

regression-tests/test-results/mixed-function-expression-and-std-for-each.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@
3030

3131
// Passing a function expression
3232
std::for_each(
33-
CPP2_UFCS_0(begin, view),
34-
CPP2_UFCS_0(end, view),
33+
CPP2_UFCS(begin)(view),
34+
CPP2_UFCS(end)(view),
3535
[](auto& x) -> void { x += "-ish"; }
3636
);
3737

3838
// Initializing from a function expression
3939
auto callback {[](auto& x) -> void { x += " maybe"; }};
4040
std::for_each(
41-
CPP2_UFCS_0(begin, view),
42-
CPP2_UFCS_0(end, view),
41+
CPP2_UFCS(begin)(view),
42+
CPP2_UFCS(end)(view),
4343
std::move(callback)
4444
);
4545

regression-tests/test-results/mixed-function-expression-with-pointer-capture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
std::string y {"\n"};
3333
std::ranges::for_each(view, [_0 = (&y)](auto const& x) -> void{
34-
std::cout << CPP2_UFCS_0(c_str, (*cpp2::assert_not_null((_0)))) << x << *cpp2::assert_not_null(_0);
34+
std::cout << CPP2_UFCS(c_str)((*cpp2::assert_not_null((_0)))) << x << *cpp2::assert_not_null(_0);
3535
});
3636

3737
auto callback {[](auto& x) -> void { x += "-ish"; }};

regression-tests/test-results/mixed-initialization-safety-3-contract-violation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ auto fill(
5959
) -> void
6060

6161
{
62-
cpp2::Default.expects(cpp2::cmp_greater_eq(CPP2_UFCS_0(ssize, value),count), "fill: value must contain at least count elements");
62+
cpp2::Default.expects(cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(value),count), "fill: value must contain at least count elements");
6363
#line 25 "mixed-initialization-safety-3-contract-violation.cpp2"
64-
x.construct(CPP2_UFCS(substr, value, 0, count));
64+
x.construct(CPP2_UFCS(substr)(value, 0, count));
6565
}
6666

6767
auto print_decorated(auto const& x) -> void { std::cout << ">> [" << x << "]\n"; }

regression-tests/test-results/mixed-initialization-safety-3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ auto fill(
5454
) -> void
5555

5656
{
57-
cpp2::Default.expects(cpp2::cmp_greater_eq(CPP2_UFCS_0(ssize, value),count), "fill: value must contain at least count elements");
57+
cpp2::Default.expects(cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(value),count), "fill: value must contain at least count elements");
5858
#line 23 "mixed-initialization-safety-3.cpp2"
59-
x.construct(CPP2_UFCS(substr, value, 0, count));
59+
x.construct(CPP2_UFCS(substr)(value, 0, count));
6060
}
6161

6262
auto print_decorated(auto const& x) -> void { std::cout << ">> [" << x << "]\n"; }

regression-tests/test-results/mixed-lifetime-safety-and-null-contracts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ auto call_my_framework(char const* msg) -> void;
3434

3535
#line 6 "mixed-lifetime-safety-and-null-contracts.cpp2"
3636
[[nodiscard]] auto main() -> int{
37-
CPP2_UFCS(set_handler, cpp2::Null, &call_my_framework);
37+
CPP2_UFCS(set_handler)(cpp2::Null, &call_my_framework);
3838
try_pointer_stuff();
3939
std::cout << "done\n";
4040
}

regression-tests/test-results/mixed-postexpression-with-capture.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ auto insert_at(cpp2::in<int> where, cpp2::in<int> val) -> void
4040

4141
#line 17 "mixed-postexpression-with-capture.cpp2"
4242
{
43-
cpp2::Default.expects(cpp2::cmp_less_eq(0,where) && cpp2::cmp_less_eq(where,CPP2_UFCS_0(ssize, vec)), "");
44-
auto post_16_5 = cpp2::finally_success([_0 = CPP2_UFCS_0(size, vec)]{cpp2::Default.expects(CPP2_UFCS_0(size, vec) == _0 + 1, "");} );
43+
cpp2::Default.expects(cpp2::cmp_less_eq(0,where) && cpp2::cmp_less_eq(where,CPP2_UFCS(ssize)(vec)), "");
44+
auto post_16_5 = cpp2::finally_success([_0 = CPP2_UFCS(size)(vec)]{cpp2::Default.expects(CPP2_UFCS(size)(vec) == _0 + 1, "");} );
4545
#line 18 "mixed-postexpression-with-capture.cpp2"
46-
CPP2_UFCS(push_back, vec, val);
46+
CPP2_UFCS(push_back)(vec, val);
4747
}
4848

regression-tests/test-results/mixed-postfix-expression-custom-formatting.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ auto call([[maybe_unused]] auto const& param1, [[maybe_unused]] auto const& para
2828

2929
[[nodiscard]] auto test(auto const& a) -> std::string{
3030
return call(a,
31-
++*cpp2::assert_not_null(CPP2_UFCS(b, a, a.c)), "hello", /* polite
31+
++*cpp2::assert_not_null(CPP2_UFCS(b)(a, a.c)), "hello", /* polite
3232
greeting
3333
goes here */" there",
34-
CPP2_UFCS(e, a.d, ++CPP2_UFCS_0(g, *cpp2::assert_not_null(a.f)), // because f is foobar
35-
CPP2_UFCS_0(i, a.h),
36-
CPP2_UFCS(j, a, a.k, a.l))
34+
CPP2_UFCS(e)(a.d, ++CPP2_UFCS(g)(*cpp2::assert_not_null(a.f)), // because f is foobar
35+
CPP2_UFCS(i)(a.h),
36+
CPP2_UFCS(j)(a, a.k, a.l))
3737
);
3838
}
3939

regression-tests/test-results/mixed-string-interpolation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct custom_struct_with_no_stringize_customization { } custom;
3030
std::cout << "a = " + cpp2::to_string(a) + ", b = " + cpp2::to_string(b) + "\n";
3131

3232
b = 42;
33-
std::cout << "a^2 + b = " + cpp2::to_string(a * std::move(a) + CPP2_UFCS_0(value, std::move(b))) + "\n";
33+
std::cout << "a^2 + b = " + cpp2::to_string(a * std::move(a) + CPP2_UFCS(value)(std::move(b))) + "\n";
3434

3535
std::string_view sv {"my string_view"};
3636
std::cout << "sv = " + cpp2::to_string(std::move(sv)) + "\n";

regression-tests/test-results/mixed-type-safety-1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ auto print(cpp2::in<std::string> msg, cpp2::in<bool> b) -> void
5555
print( "1 is int? ", cpp2::is<int>(1));
5656

5757
auto c {cpp2_new<Circle>()}; // safe by construction
58-
Shape* s {CPP2_UFCS_0(get, c)}; // safe by Lifetime
58+
Shape* s {CPP2_UFCS(get)(c)}; // safe by Lifetime
5959
print("\ns* is Shape? ", cpp2::is<Shape>(*cpp2::assert_not_null(s)));
6060
print( "s* is Circle? ", cpp2::is<Circle>(*cpp2::assert_not_null(s)));
6161
print( "s* is Square? ", cpp2::is<Square>(*cpp2::assert_not_null(std::move(s))));

regression-tests/test-results/mixed-ufcs-multiple-template-arguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ struct X {
3939
std::cout << substr<4,8>(test_string) << "\n";
4040

4141
X x {test_string};
42-
std::cout << CPP2_UFCS_TEMPLATE_0(substr, (<4,8>), std::move(x)) << "\n";
42+
std::cout << CPP2_UFCS_TEMPLATE(substr<4,8>)(std::move(x)) << "\n";
4343
}
4444

regression-tests/test-results/pure2-bounds-safety-span.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ auto print_and_decorate(auto const& thing) -> void;
3030
std::span<std::string> s {words};
3131

3232
auto i {0};
33-
for( ; cpp2::cmp_less(i,CPP2_UFCS_0(ssize, s)); ++i ) {
33+
for( ; cpp2::cmp_less(i,CPP2_UFCS(ssize)(s)); ++i ) {
3434
print_and_decorate(cpp2::assert_in_bounds(s, i));
3535
}
3636
}

regression-tests/test-results/pure2-bugfix-for-ufcs-arguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ template<typename T> [[nodiscard]] auto f(cpp2::in<t> o, auto const& x) -> cpp2:
3131
template<typename T, typename U> [[nodiscard]] auto f(cpp2::in<t> o, auto const& x, auto const& y) -> cpp2::i32;
3232
extern t m;
3333
extern t const n;
34-
template<typename T, typename U> auto static constexpr a = n;
34+
template<typename T, typename U> auto inline constexpr a = n;
3535
extern cpp2::i32 auto_21_1;
3636
extern cpp2::i32 auto_22_1;
3737
extern cpp2::i32 auto_23_1;

regression-tests/test-results/pure2-enum.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ inline CPP2_CONSTEXPR file_attributes file_attributes::none = 0;
232232
#line 28 "pure2-enum.cpp2"
233233
auto main() -> int{
234234
auto j {janus::past};
235-
CPP2_UFCS_0(flip, j);
235+
CPP2_UFCS(flip)(j);
236236
static_cast<void>(std::move(j));
237237

238238
// x : skat_game = 9; // error, can't construct skat_game from integer
@@ -244,8 +244,8 @@ auto main() -> int{
244244
// if x == 9 { } // error, can't compare skat_game and integer
245245
// if x == rgb::red { } // error, can't compare skat_game and rgb color
246246

247-
std::cout << "x.to_string() is " + cpp2::to_string(CPP2_UFCS_0(to_string, x)) + "\n";
248-
std::cout << "x2.to_string() is " + cpp2::to_string(CPP2_UFCS_0(to_string, std::move(x2))) + "\n";
247+
std::cout << "x.to_string() is " + cpp2::to_string(CPP2_UFCS(to_string)(x)) + "\n";
248+
std::cout << "x2.to_string() is " + cpp2::to_string(CPP2_UFCS(to_string)(std::move(x2))) + "\n";
249249

250250
std::cout << "with if else: ";
251251
if (x == skat_game::diamonds) { // ok, can compare two skat_games
@@ -277,41 +277,41 @@ auto main() -> int{
277277

278278
x = skat_game::diamonds; // ok, can assign one skat_game from another
279279

280-
std::cout << "file_attributes::cached.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, file_attributes::cached)) + "\n";
281-
std::cout << "file_attributes::current.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, file_attributes::current)) + "\n";
282-
std::cout << "file_attributes::obsolete.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, file_attributes::obsolete)) + "\n";
283-
std::cout << "file_attributes::cached_and_current.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, file_attributes::cached_and_current)) + "\n";
280+
std::cout << "file_attributes::cached.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(file_attributes::cached)) + "\n";
281+
std::cout << "file_attributes::current.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(file_attributes::current)) + "\n";
282+
std::cout << "file_attributes::obsolete.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(file_attributes::obsolete)) + "\n";
283+
std::cout << "file_attributes::cached_and_current.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(file_attributes::cached_and_current)) + "\n";
284284

285285
file_attributes f {file_attributes::cached_and_current};
286286
f &= file_attributes::cached | file_attributes::obsolete;
287-
std::cout << "f. get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, f)) + "\n";
287+
std::cout << "f. get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(f)) + "\n";
288288

289289
auto f2 {file_attributes::cached};
290-
std::cout << "f2.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, f2)) + "\n";
290+
std::cout << "f2.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(f2)) + "\n";
291291

292-
std::cout << "f is " << CPP2_UFCS_0(to_string, f) << "\n";
293-
std::cout << "f2 is " << CPP2_UFCS_0(to_string, f2) << "\n";
292+
std::cout << "f is " << CPP2_UFCS(to_string)(f) << "\n";
293+
std::cout << "f2 is " << CPP2_UFCS(to_string)(f2) << "\n";
294294

295-
CPP2_UFCS(clear, f2, f2);
296-
std::cout << "f2 is " << CPP2_UFCS_0(to_string, f2) << "\n";
297-
CPP2_UFCS(set, f2, file_attributes::cached);
298-
std::cout << "f2 is " << CPP2_UFCS_0(to_string, f2) << "\n";
295+
CPP2_UFCS(clear)(f2, f2);
296+
std::cout << "f2 is " << CPP2_UFCS(to_string)(f2) << "\n";
297+
CPP2_UFCS(set)(f2, file_attributes::cached);
298+
std::cout << "f2 is " << CPP2_UFCS(to_string)(f2) << "\n";
299299

300-
std::cout << "f. get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, f)) + "\n";
301-
std::cout << "f2.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, f2)) + "\n";
300+
std::cout << "f. get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(f)) + "\n";
301+
std::cout << "f2.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(f2)) + "\n";
302302

303303
std::cout << "f is (f2) is " + cpp2::to_string(cpp2::is(f, (f2))) + "\n";
304304
std::cout << "f2 is (f ) is " + cpp2::to_string(cpp2::is(f2, (f))) + "\n\n";
305305

306-
CPP2_UFCS(clear, f, f2);
307-
CPP2_UFCS(set, f, file_attributes::current | f2);
306+
CPP2_UFCS(clear)(f, f2);
307+
CPP2_UFCS(set)(f, file_attributes::current | f2);
308308
f |= file_attributes::obsolete;
309309
f2 |= file_attributes::current;
310310

311-
std::cout << "f is " << CPP2_UFCS_0(to_string, f) << "\n";
312-
std::cout << "f2 is " << CPP2_UFCS_0(to_string, f2) << "\n";
313-
std::cout << "f. get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, f)) + "\n";
314-
std::cout << "f2.get_raw_value() is " + cpp2::to_string(CPP2_UFCS_0(get_raw_value, f2)) + "\n";
311+
std::cout << "f is " << CPP2_UFCS(to_string)(f) << "\n";
312+
std::cout << "f2 is " << CPP2_UFCS(to_string)(f2) << "\n";
313+
std::cout << "f. get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(f)) + "\n";
314+
std::cout << "f2.get_raw_value() is " + cpp2::to_string(CPP2_UFCS(get_raw_value)(f2)) + "\n";
315315
std::cout << "f == f2 is " + cpp2::to_string(f == f2 ) + "\n";
316316
std::cout << "f is (f2) is " + cpp2::to_string(cpp2::is(f, (f2))) + "\n";
317317
std::cout << "f2 is (f ) is " + cpp2::to_string(cpp2::is(f2, (f))) + "\n";

regression-tests/test-results/pure2-initialization-safety-with-else-if.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ auto main(int const argc_, char** argv_) -> int{
2525
auto c {3};
2626
auto d {4};
2727

28-
if (CPP2_UFCS_0(size, args) == 3) {
28+
if (CPP2_UFCS(size)(args) == 3) {
2929
p.construct(&a);
3030
}else {if (true) {
31-
if (CPP2_UFCS_0(size, args) == 2) {
31+
if (CPP2_UFCS(size)(args) == 2) {
3232
p.construct(&c);
3333
}else {if (cpp2::cmp_greater(std::move(b),0)) {
3434
p.construct(&a);

regression-tests/test-results/pure2-inspect-expression-in-generic-function-multiple-types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ auto test_generic(auto const& x, auto const& msg) -> void;
2929
test_generic(a, "any");
3030
test_generic(o, "optional<int>");
3131

32-
static_cast<void>(CPP2_UFCS_TEMPLATE(emplace, (<0>), v, 1));
32+
static_cast<void>(CPP2_UFCS_TEMPLATE(emplace<0>)(v, 1));
3333
a = 2;
3434
o = 3;
3535
test_generic(42, "int");

regression-tests/test-results/pure2-interpolation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ auto const& x = item();
5959

6060
#line 25 "pure2-interpolation.cpp2"
6161
{
62-
std::cout << std::left << std::setw(20) << CPP2_UFCS_0(name, x) << " color " << std::left << std::setw(10) << CPP2_UFCS_0(color, x) << " price " << std::setw(10) << std::setprecision(3) << CPP2_UFCS_0(price, x) << " in stock = " << std::boolalpha << (cpp2::cmp_greater(CPP2_UFCS_0(count, x),0)) << "\n";
62+
std::cout << std::left << std::setw(20) << CPP2_UFCS(name)(x) << " color " << std::left << std::setw(10) << CPP2_UFCS(color)(x) << " price " << std::setw(10) << std::setprecision(3) << CPP2_UFCS(price)(x) << " in stock = " << std::boolalpha << (cpp2::cmp_greater(CPP2_UFCS(count)(x),0)) << "\n";
6363

64-
std::cout << cpp2::to_string(CPP2_UFCS_0(name, x), "{:20}") + " color " + cpp2::to_string(CPP2_UFCS_0(color, x), "{:10}") + " price " + cpp2::to_string(CPP2_UFCS_0(price, x), "{: <10.2f}") + " in stock = " + cpp2::to_string(cpp2::cmp_greater(CPP2_UFCS_0(count, x),0)) + "\n";
64+
std::cout << cpp2::to_string(CPP2_UFCS(name)(x), "{:20}") + " color " + cpp2::to_string(CPP2_UFCS(color)(x), "{:10}") + " price " + cpp2::to_string(CPP2_UFCS(price)(x), "{: <10.2f}") + " in stock = " + cpp2::to_string(cpp2::cmp_greater(CPP2_UFCS(count)(x),0)) + "\n";
6565
}
6666
}
6767

regression-tests/test-results/pure2-intro-example-hello-2022.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ auto print_it(auto const& x, auto const& len) -> void;
3636

3737
[[nodiscard]] auto decorate(auto& thing) -> int{
3838
thing = "[" + thing + "]";
39-
return CPP2_UFCS_0(ssize, thing);
39+
return CPP2_UFCS(ssize)(thing);
4040
}
4141

4242
auto print_it(auto const& x, auto const& len) -> void {

regression-tests/test-results/pure2-intro-example-three-loops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ auto decorate_and_print(auto& thing) -> void{
4242
std::span<std::string> view {words};
4343

4444
auto i {cpp2_new<int>(0)};
45-
for( ; cpp2::cmp_less(*cpp2::assert_not_null(i),CPP2_UFCS_0(ssize, view)); ++*cpp2::assert_not_null(i) ) {
45+
for( ; cpp2::cmp_less(*cpp2::assert_not_null(i),CPP2_UFCS(ssize)(view)); ++*cpp2::assert_not_null(i) ) {
4646
print(cpp2::assert_in_bounds(view, *cpp2::assert_not_null(i)));
4747
}
4848

regression-tests/test-results/pure2-print.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ requires (true)
103103
if (cpp2::cmp_less(*cpp2::assert_not_null(p),0)) {
104104
ret = -*cpp2::assert_not_null(std::move(p));
105105
}
106-
ret += strlen(s) - 10 + CPP2_UFCS_0(strlen, std::move(s)) * (16 / (3 & 2)) % 3;
106+
ret += strlen(s) - 10 + CPP2_UFCS(strlen)(std::move(s)) * (16 / (3 & 2)) % 3;
107107

108108
std::map<int const,std::string> m {};
109109
cpp2::assert_in_bounds(m, 0) = cpp2::as_<std::string>("har");
110-
ret -= CPP2_UFCS_0(length, h("x", m));
110+
ret -= CPP2_UFCS(length)(h("x", m));
111111
static_cast<void>(std::move(m));
112112

113113
return ret;
@@ -117,24 +117,24 @@ requires (true)
117117

118118
#line 32 "pure2-print.cpp2"
119119
{
120-
cpp2::Default.expects(CPP2_UFCS_0(empty, m) == false || false, "");
121-
cpp2::Bounds.expects([_0 = 0, _1 = CPP2_UFCS_0(ssize, m), _2 = 100]{ return cpp2::cmp_less(_0,_1) && cpp2::cmp_less(_1,_2); }() && true != false, "");
120+
cpp2::Default.expects(CPP2_UFCS(empty)(m) == false || false, "");
121+
cpp2::Bounds.expects([_0 = 0, _1 = CPP2_UFCS(ssize)(m), _2 = 100]{ return cpp2::cmp_less(_0,_1) && cpp2::cmp_less(_1,_2); }() && true != false, "");
122122
#line 33 "pure2-print.cpp2"
123123
auto a {[]() -> void{}};
124124
auto b {[]() -> void{}};
125125
auto c {[]() -> void{}};
126126

127-
for( ; CPP2_UFCS_0(empty, s); a() ) {break; }
127+
for( ; CPP2_UFCS(empty)(s); a() ) {break; }
128128

129-
do {} while ( CPP2_UFCS_0(empty, s) && [&]{ b() ; return true; }() );
129+
do {} while ( CPP2_UFCS(empty)(s) && [&]{ b() ; return true; }() );
130130

131131
for ( [[maybe_unused]] auto const& param1 : m ) {
132132
#line 41 "pure2-print.cpp2"
133133
{ do {goto CONTINUE_41_13; } while (false); c(); } CPP2_CONTINUE_BREAK(41_13) }
134134

135135
#line 43 "pure2-print.cpp2"
136-
if (cpp2::is(!(CPP2_UFCS_0(empty, s)), (true))) {std::move(a)(); }
137-
else {if (!(CPP2_UFCS_0(empty, m))) {std::move(b)(); }
136+
if (cpp2::is(!(CPP2_UFCS(empty)(s)), (true))) {std::move(a)(); }
137+
else {if (!(CPP2_UFCS(empty)(m))) {std::move(b)(); }
138138
else {std::move(c)(); }}
139139

140140
cpp2::Default.expects(true, "");
@@ -169,9 +169,9 @@ requires (true)
169169

170170
#line 75 "pure2-print.cpp2"
171171
::outer::mytype var {};
172-
std::cout << CPP2_UFCS(g, var, 42) << "\n";
172+
std::cout << CPP2_UFCS(g)(var, 42) << "\n";
173173

174-
std::cout << [&] () -> namespace_alias::string { auto&& _expr = CPP2_UFCS(g, std::move(var), 42);
174+
std::cout << [&] () -> namespace_alias::string { auto&& _expr = CPP2_UFCS(g)(std::move(var), 42);
175175
if (cpp2::is(_expr, 43)) { if constexpr( requires{"forty-and-three";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("forty-and-three")),namespace_alias::string> ) return "forty-and-three"; else return namespace_alias::string{}; else return namespace_alias::string{}; }
176176
else return "default case"; }
177177
() << "\n";

regression-tests/test-results/pure2-stdio-with-raii.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
[[nodiscard]] auto main() -> int{
2525
std::string s {"Fred"};
2626
auto myfile {cpp2::fopen("xyzzy", "w")};
27-
static_cast<void>(CPP2_UFCS(fprintf, std::move(myfile), "Hello %s with UFCS!", CPP2_UFCS_0(c_str, std::move(s))));
27+
static_cast<void>(CPP2_UFCS(fprintf)(std::move(myfile), "Hello %s with UFCS!", CPP2_UFCS(c_str)(std::move(s))));
2828
}
2929

regression-tests/test-results/pure2-stdio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
[[nodiscard]] auto main() -> int{
2727
std::string s {"Fred"};
2828
auto myfile {fopen("xyzzy", "w")};
29-
static_cast<void>(CPP2_UFCS(fprintf, myfile, "Hello %s with UFCS!", CPP2_UFCS_0(c_str, std::move(s))));
30-
static_cast<void>(CPP2_UFCS_0(fclose, std::move(myfile)));
29+
static_cast<void>(CPP2_UFCS(fprintf)(myfile, "Hello %s with UFCS!", CPP2_UFCS(c_str)(std::move(s))));
30+
static_cast<void>(CPP2_UFCS(fclose)(std::move(myfile)));
3131
}
3232

0 commit comments

Comments
 (0)