Skip to content

Commit 767b182

Browse files
committed
test: regenerate regression tests
1 parent 7b5acc9 commit 767b182

36 files changed

+132
-132
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
@@ -46,6 +46,6 @@ auto test(auto const& x) -> void{
4646
test(std::move(z));
4747

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

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-enum.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ auto main() -> int;
101101
else {if (value == clubs) {ret = "clubs";}
102102
else {if (value == grand) {ret = "grand";}
103103
else {if (value == null) {ret = "null";}}}}}}
104-
if (CPP2_UFCS_0(empty, ret)) {ret = "(invalid skat_game enumerator value)";}
104+
if (CPP2_UFCS(empty)(ret)) {ret = "(invalid skat_game enumerator value)";}
105105
return ret;
106106
}
107107

@@ -122,7 +122,7 @@ std::string ret {};
122122
if (value == red) {ret = "red";}
123123
else {if (value == green) {ret = "green";}
124124
else {if (value == blue) {ret = "blue";}}}
125-
if (CPP2_UFCS_0(empty, ret)) {ret = "(invalid rgb enumerator value)";}
125+
if (CPP2_UFCS(empty)(ret)) {ret = "(invalid rgb enumerator value)";}
126126
return ret;
127127
}
128128

@@ -150,7 +150,7 @@ if ((value & current) == current) {ret += comma + "current";comma = ", ";}
150150
if ((value & obsolete) == obsolete) {ret += comma + "obsolete";comma = ", ";}
151151
if ((value & cached_and_current) == cached_and_current) {ret += comma + "cached_and_current";comma = ", ";}
152152
if (value == none) {ret += comma + "none";comma = ", ";}
153-
if (CPP2_UFCS_0(empty, ret)) {ret = "(invalid file_attributes enumerator value)";}
153+
if (CPP2_UFCS(empty)(ret)) {ret = "(invalid file_attributes enumerator value)";}
154154
return ret + ")";
155155
}
156156

@@ -171,8 +171,8 @@ auto main() -> int{
171171
// if x == 9 { } // error, can't compare skat_game and integer
172172
// if x == rgb::red { } // error, can't compare skat_game and rgb color
173173

174-
std::cout << "x.to_string() is " + cpp2::to_string(CPP2_UFCS_0(to_string, x)) + "\n";
175-
std::cout << "x2.to_string() is " + cpp2::to_string(CPP2_UFCS_0(to_string, std::move(x2))) + "\n";
174+
std::cout << "x.to_string() is " + cpp2::to_string(CPP2_UFCS(to_string)(x)) + "\n";
175+
std::cout << "x2.to_string() is " + cpp2::to_string(CPP2_UFCS(to_string)(std::move(x2))) + "\n";
176176
std::cout << "using << prints " << x << "\n";
177177

178178
std::cout << "with if else: ";
@@ -213,9 +213,9 @@ auto main() -> int{
213213
std::cout << "f is " << f << "\n";
214214
std::cout << "f2 is " << f2 << "\n";
215215

216-
CPP2_UFCS(clear, f2, f2);
216+
CPP2_UFCS(clear)(f2, f2);
217217
std::cout << "f2 is " << f2 << "\n";
218-
CPP2_UFCS(set, f2, file_attributes::cached);
218+
CPP2_UFCS(set)(f2, file_attributes::cached);
219219
std::cout << "f2 is " << f2 << "\n";
220220

221221
std::cout << "f as int is " + cpp2::to_string(cpp2::as_<int>(f)) + "\n";
@@ -224,8 +224,8 @@ auto main() -> int{
224224
std::cout << "f is (f2) is " + cpp2::to_string(cpp2::is(f, (f2))) + "\n";
225225
std::cout << "f2 is (f ) is " + cpp2::to_string(cpp2::is(f2, (f))) + "\n\n";
226226

227-
CPP2_UFCS(clear, f, f2);
228-
CPP2_UFCS(set, f, file_attributes::current | f2);
227+
CPP2_UFCS(clear)(f, f2);
228+
CPP2_UFCS(set)(f, file_attributes::current | f2);
229229
f |= file_attributes::obsolete;
230230
f2 |= file_attributes::current;
231231

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-intro-example-hello-2022.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ auto println(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 println(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-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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ auto print(cpp2::in<std::string> msg, cpp2::in<bool> b) -> void;
4141

4242
std::cout << "\n";
4343

44-
static_cast<void>(CPP2_UFCS_TEMPLATE(emplace, (<1>), v, 1));
44+
static_cast<void>(CPP2_UFCS_TEMPLATE(emplace<1>)(v, 1));
4545
a = 2;
4646
o = 3;
4747
test_generic(42, "int");

regression-tests/test-results/pure2-type-safety-2-with-inspect-expression.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, (<2>), v, 1));
32+
static_cast<void>(CPP2_UFCS_TEMPLATE(emplace<2>)(v, 1));
3333
a = 2;
3434
o = 3;
3535
test_generic(42, "int");

regression-tests/test-results/pure2-types-basics.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,19 @@ namespace N {
191191

192192
auto main() -> int{
193193
N::myclass x {1};
194-
CPP2_UFCS(f, x, 53);
194+
CPP2_UFCS(f)(x, 53);
195195
N::myclass::nested::g();
196-
std::cout << "f1: " + cpp2::to_string(CPP2_UFCS(f1, x, 1, 1)) + "\n";
197-
std::cout << "f2: " + cpp2::to_string(CPP2_UFCS(f2, x, 2, 2)) + "\n";
198-
std::cout << "f3: " + cpp2::to_string(CPP2_UFCS_TEMPLATE_0(f3, (<3,3>), x)) + "\n";
199-
std::cout << "f4: " + cpp2::to_string(CPP2_UFCS_TEMPLATE_0(f4, (<4,4>), x)) + "\n";
196+
std::cout << "f1: " + cpp2::to_string(CPP2_UFCS(f1)(x, 1, 1)) + "\n";
197+
std::cout << "f2: " + cpp2::to_string(CPP2_UFCS(f2)(x, 2, 2)) + "\n";
198+
std::cout << "f3: " + cpp2::to_string(CPP2_UFCS_TEMPLATE(f3<3,3>)(x)) + "\n";
199+
std::cout << "f4: " + cpp2::to_string(CPP2_UFCS_TEMPLATE(f4<4,4>)(x)) + "\n";
200200
N::myclass x2 {"abracadabra"};
201201
N::myclass x3 {};
202202
N::myclass x4 {1, "hair"};
203203

204204
// Invoke the single-param operator=s as actual assignments
205205
std::cout << "x's state before assignments: ";
206-
CPP2_UFCS_0(print, x);
206+
CPP2_UFCS(print)(x);
207207
x = 84;
208208
x = "syzygy";
209209
x = 84;

regression-tests/test-results/pure2-types-down-upcast.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ auto func_const(cpp2::in<B> b) -> void{std::cout << "Call B const: " + cpp2::to_
7777
auto test_const_foo() -> void{
7878
A s {};
7979
A const* sC {&s};
80-
CPP2_UFCS_0(const_foo, s);
81-
CPP2_UFCS_0(const_foo, (*cpp2::assert_not_null(sC)));
82-
CPP2_UFCS_0(const_foo, (cpp2::as_<A>(s)));
83-
CPP2_UFCS_0(const_foo, (cpp2::as_<A>(*cpp2::assert_not_null(sC))));
80+
CPP2_UFCS(const_foo)(s);
81+
CPP2_UFCS(const_foo)((*cpp2::assert_not_null(sC)));
82+
CPP2_UFCS(const_foo)((cpp2::as_<A>(s)));
83+
CPP2_UFCS(const_foo)((cpp2::as_<A>(*cpp2::assert_not_null(sC))));
8484
static_cast<void>(std::move(s));
8585
static_cast<void>(std::move(sC));
8686
}
8787

8888
auto test_mut_foo() -> void{
8989
A s {};
90-
CPP2_UFCS_0(mut_foo, s);
91-
CPP2_UFCS_0(mut_foo, (cpp2::as_<A>(s)));
90+
CPP2_UFCS(mut_foo)(s);
91+
CPP2_UFCS(mut_foo)((cpp2::as_<A>(s)));
9292
static_cast<void>(std::move(s));
9393
}
9494

regression-tests/test-results/pure2-types-inheritance.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ namespace N {
132132
#line 38 "pure2-types-inheritance.cpp2"
133133
auto make_speak(cpp2::in<Human> h) -> void{
134134
std::cout << "-> [vcall: make_speak] ";
135-
CPP2_UFCS_0(speak, h);
135+
CPP2_UFCS(speak)(h);
136136
}
137137

138138
auto do_work(cpp2::in<N::Machine<99>> m) -> void{
139139
std::cout << "-> [vcall: do_work] ";
140-
CPP2_UFCS_0(work, m);
140+
CPP2_UFCS(work)(m);
141141
}
142142

143143
auto main() -> int{
144144
Cyborg c {"Parsnip"};
145-
CPP2_UFCS_0(print, c);
146-
CPP2_UFCS_0(make_speak, c);
147-
CPP2_UFCS_0(do_work, std::move(c));
145+
CPP2_UFCS(print)(c);
146+
CPP2_UFCS(make_speak)(c);
147+
CPP2_UFCS(do_work)(std::move(c));
148148
}
149149

0 commit comments

Comments
 (0)