Skip to content

Commit 38d4947

Browse files
committed
Output formatting improvements - remove a lot of the extra-space injection
1 parent aa70d09 commit 38d4947

File tree

46 files changed

+304
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+304
-209
lines changed

regression-tests/test-results/mixed-as-for-variant-20-types.cpp

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ struct X { operator int() const { return I; } };
1515
[[nodiscard]] auto main() -> int{
1616

1717
std::variant<X<0>,X<1>,X<2>,X<3>,X<4>,X<5>,X<6>,X<7>,X<8>,X<9>,X<10>,X<11>,X<12>,X<13>,X<14>,X<15>,X<16>,X<17>,X<18>,X<19>> v {
18-
X<0>()};
18+
X<0>()};
1919

2020
// lvalue reference
21-
v = X< 0>(); std::cout << "v as X< 0> = " + cpp2::to_string(int(cpp2::as_<X<0>>(v))) << std::endl;
22-
v = X< 1>(); std::cout << "v as X< 1> = " + cpp2::to_string(int(cpp2::as_<X<1>>(v))) << std::endl;
23-
v = X< 2>(); std::cout << "v as X< 2> = " + cpp2::to_string(int(cpp2::as_<X<2>>(v))) << std::endl;
24-
v = X< 3>(); std::cout << "v as X< 3> = " + cpp2::to_string(int(cpp2::as_<X<3>>(v))) << std::endl;
25-
v = X< 4>(); std::cout << "v as X< 4> = " + cpp2::to_string(int(cpp2::as_<X<4>>(v))) << std::endl;
26-
v = X< 5>(); std::cout << "v as X< 5> = " + cpp2::to_string(int(cpp2::as_<X<5>>(v))) << std::endl;
27-
v = X< 6>(); std::cout << "v as X< 6> = " + cpp2::to_string(int(cpp2::as_<X<6>>(v))) << std::endl;
28-
v = X< 7>(); std::cout << "v as X< 7> = " + cpp2::to_string(int(cpp2::as_<X<7>>(v))) << std::endl;
29-
v = X< 8>(); std::cout << "v as X< 8> = " + cpp2::to_string(int(cpp2::as_<X<8>>(v))) << std::endl;
30-
v = X< 9>(); std::cout << "v as X< 9> = " + cpp2::to_string(int(cpp2::as_<X<9>>(v))) << std::endl;
21+
v = X<0>(); std::cout << "v as X< 0> = " + cpp2::to_string(int(cpp2::as_<X<0>>(v))) << std::endl;
22+
v = X<1>(); std::cout << "v as X< 1> = " + cpp2::to_string(int(cpp2::as_<X<1>>(v))) << std::endl;
23+
v = X<2>(); std::cout << "v as X< 2> = " + cpp2::to_string(int(cpp2::as_<X<2>>(v))) << std::endl;
24+
v = X<3>(); std::cout << "v as X< 3> = " + cpp2::to_string(int(cpp2::as_<X<3>>(v))) << std::endl;
25+
v = X<4>(); std::cout << "v as X< 4> = " + cpp2::to_string(int(cpp2::as_<X<4>>(v))) << std::endl;
26+
v = X<5>(); std::cout << "v as X< 5> = " + cpp2::to_string(int(cpp2::as_<X<5>>(v))) << std::endl;
27+
v = X<6>(); std::cout << "v as X< 6> = " + cpp2::to_string(int(cpp2::as_<X<6>>(v))) << std::endl;
28+
v = X<7>(); std::cout << "v as X< 7> = " + cpp2::to_string(int(cpp2::as_<X<7>>(v))) << std::endl;
29+
v = X<8>(); std::cout << "v as X< 8> = " + cpp2::to_string(int(cpp2::as_<X<8>>(v))) << std::endl;
30+
v = X<9>(); std::cout << "v as X< 9> = " + cpp2::to_string(int(cpp2::as_<X<9>>(v))) << std::endl;
3131
v = X<10>(); std::cout << "v as X<10> = " + cpp2::to_string(int(cpp2::as_<X<10>>(v))) << std::endl;
3232
v = X<11>(); std::cout << "v as X<11> = " + cpp2::to_string(int(cpp2::as_<X<11>>(v))) << std::endl;
3333
v = X<12>(); std::cout << "v as X<12> = " + cpp2::to_string(int(cpp2::as_<X<12>>(v))) << std::endl;
@@ -40,16 +40,16 @@ struct X { operator int() const { return I; } };
4040
v = X<19>(); std::cout << "v as X<19> = " + cpp2::to_string(int(cpp2::as_<X<19>>(v))) << std::endl;
4141

4242
// const lvalue reference
43-
v = X< 0>(); std::cout << "as_const(v) as X< 0> = " + cpp2::to_string(int(cpp2::as_<X<0>>(std::as_const(v)))) << std::endl;
44-
v = X< 1>(); std::cout << "as_const(v) as X< 1> = " + cpp2::to_string(int(cpp2::as_<X<1>>(std::as_const(v)))) << std::endl;
45-
v = X< 2>(); std::cout << "as_const(v) as X< 2> = " + cpp2::to_string(int(cpp2::as_<X<2>>(std::as_const(v)))) << std::endl;
46-
v = X< 3>(); std::cout << "as_const(v) as X< 3> = " + cpp2::to_string(int(cpp2::as_<X<3>>(std::as_const(v)))) << std::endl;
47-
v = X< 4>(); std::cout << "as_const(v) as X< 4> = " + cpp2::to_string(int(cpp2::as_<X<4>>(std::as_const(v)))) << std::endl;
48-
v = X< 5>(); std::cout << "as_const(v) as X< 5> = " + cpp2::to_string(int(cpp2::as_<X<5>>(std::as_const(v)))) << std::endl;
49-
v = X< 6>(); std::cout << "as_const(v) as X< 6> = " + cpp2::to_string(int(cpp2::as_<X<6>>(std::as_const(v)))) << std::endl;
50-
v = X< 7>(); std::cout << "as_const(v) as X< 7> = " + cpp2::to_string(int(cpp2::as_<X<7>>(std::as_const(v)))) << std::endl;
51-
v = X< 8>(); std::cout << "as_const(v) as X< 8> = " + cpp2::to_string(int(cpp2::as_<X<8>>(std::as_const(v)))) << std::endl;
52-
v = X< 9>(); std::cout << "as_const(v) as X< 9> = " + cpp2::to_string(int(cpp2::as_<X<9>>(std::as_const(v)))) << std::endl;
43+
v = X<0>(); std::cout << "as_const(v) as X< 0> = " + cpp2::to_string(int(cpp2::as_<X<0>>(std::as_const(v)))) << std::endl;
44+
v = X<1>(); std::cout << "as_const(v) as X< 1> = " + cpp2::to_string(int(cpp2::as_<X<1>>(std::as_const(v)))) << std::endl;
45+
v = X<2>(); std::cout << "as_const(v) as X< 2> = " + cpp2::to_string(int(cpp2::as_<X<2>>(std::as_const(v)))) << std::endl;
46+
v = X<3>(); std::cout << "as_const(v) as X< 3> = " + cpp2::to_string(int(cpp2::as_<X<3>>(std::as_const(v)))) << std::endl;
47+
v = X<4>(); std::cout << "as_const(v) as X< 4> = " + cpp2::to_string(int(cpp2::as_<X<4>>(std::as_const(v)))) << std::endl;
48+
v = X<5>(); std::cout << "as_const(v) as X< 5> = " + cpp2::to_string(int(cpp2::as_<X<5>>(std::as_const(v)))) << std::endl;
49+
v = X<6>(); std::cout << "as_const(v) as X< 6> = " + cpp2::to_string(int(cpp2::as_<X<6>>(std::as_const(v)))) << std::endl;
50+
v = X<7>(); std::cout << "as_const(v) as X< 7> = " + cpp2::to_string(int(cpp2::as_<X<7>>(std::as_const(v)))) << std::endl;
51+
v = X<8>(); std::cout << "as_const(v) as X< 8> = " + cpp2::to_string(int(cpp2::as_<X<8>>(std::as_const(v)))) << std::endl;
52+
v = X<9>(); std::cout << "as_const(v) as X< 9> = " + cpp2::to_string(int(cpp2::as_<X<9>>(std::as_const(v)))) << std::endl;
5353
v = X<10>(); std::cout << "as_const(v) as X<10> = " + cpp2::to_string(int(cpp2::as_<X<10>>(std::as_const(v)))) << std::endl;
5454
v = X<11>(); std::cout << "as_const(v) as X<11> = " + cpp2::to_string(int(cpp2::as_<X<11>>(std::as_const(v)))) << std::endl;
5555
v = X<12>(); std::cout << "as_const(v) as X<12> = " + cpp2::to_string(int(cpp2::as_<X<12>>(std::as_const(v)))) << std::endl;
@@ -62,16 +62,16 @@ struct X { operator int() const { return I; } };
6262
v = X<19>(); std::cout << "as_const(v) as X<19> = " + cpp2::to_string(int(cpp2::as_<X<19>>(std::as_const(v)))) << std::endl;
6363

6464
// rvalue reference
65-
v = X< 0>(); std::cout << "move(v) as X< 0> = " + cpp2::to_string(int(cpp2::as_<X<0>>((std::move(v))))) << std::endl;
66-
v = X< 1>(); std::cout << "move(v) as X< 1> = " + cpp2::to_string(int(cpp2::as_<X<1>>((std::move(v))))) << std::endl;
67-
v = X< 2>(); std::cout << "move(v) as X< 2> = " + cpp2::to_string(int(cpp2::as_<X<2>>((std::move(v))))) << std::endl;
68-
v = X< 3>(); std::cout << "move(v) as X< 3> = " + cpp2::to_string(int(cpp2::as_<X<3>>((std::move(v))))) << std::endl;
69-
v = X< 4>(); std::cout << "move(v) as X< 4> = " + cpp2::to_string(int(cpp2::as_<X<4>>((std::move(v))))) << std::endl;
70-
v = X< 5>(); std::cout << "move(v) as X< 5> = " + cpp2::to_string(int(cpp2::as_<X<5>>((std::move(v))))) << std::endl;
71-
v = X< 6>(); std::cout << "move(v) as X< 6> = " + cpp2::to_string(int(cpp2::as_<X<6>>((std::move(v))))) << std::endl;
72-
v = X< 7>(); std::cout << "move(v) as X< 7> = " + cpp2::to_string(int(cpp2::as_<X<7>>((std::move(v))))) << std::endl;
73-
v = X< 8>(); std::cout << "move(v) as X< 8> = " + cpp2::to_string(int(cpp2::as_<X<8>>((std::move(v))))) << std::endl;
74-
v = X< 9>(); std::cout << "move(v) as X< 9> = " + cpp2::to_string(int(cpp2::as_<X<9>>((std::move(v))))) << std::endl;
65+
v = X<0>(); std::cout << "move(v) as X< 0> = " + cpp2::to_string(int(cpp2::as_<X<0>>((std::move(v))))) << std::endl;
66+
v = X<1>(); std::cout << "move(v) as X< 1> = " + cpp2::to_string(int(cpp2::as_<X<1>>((std::move(v))))) << std::endl;
67+
v = X<2>(); std::cout << "move(v) as X< 2> = " + cpp2::to_string(int(cpp2::as_<X<2>>((std::move(v))))) << std::endl;
68+
v = X<3>(); std::cout << "move(v) as X< 3> = " + cpp2::to_string(int(cpp2::as_<X<3>>((std::move(v))))) << std::endl;
69+
v = X<4>(); std::cout << "move(v) as X< 4> = " + cpp2::to_string(int(cpp2::as_<X<4>>((std::move(v))))) << std::endl;
70+
v = X<5>(); std::cout << "move(v) as X< 5> = " + cpp2::to_string(int(cpp2::as_<X<5>>((std::move(v))))) << std::endl;
71+
v = X<6>(); std::cout << "move(v) as X< 6> = " + cpp2::to_string(int(cpp2::as_<X<6>>((std::move(v))))) << std::endl;
72+
v = X<7>(); std::cout << "move(v) as X< 7> = " + cpp2::to_string(int(cpp2::as_<X<7>>((std::move(v))))) << std::endl;
73+
v = X<8>(); std::cout << "move(v) as X< 8> = " + cpp2::to_string(int(cpp2::as_<X<8>>((std::move(v))))) << std::endl;
74+
v = X<9>(); std::cout << "move(v) as X< 9> = " + cpp2::to_string(int(cpp2::as_<X<9>>((std::move(v))))) << std::endl;
7575
v = X<10>(); std::cout << "move(v) as X<10> = " + cpp2::to_string(int(cpp2::as_<X<10>>((std::move(v))))) << std::endl;
7676
v = X<11>(); std::cout << "move(v) as X<11> = " + cpp2::to_string(int(cpp2::as_<X<11>>((std::move(v))))) << std::endl;
7777
v = X<12>(); std::cout << "move(v) as X<12> = " + cpp2::to_string(int(cpp2::as_<X<12>>((std::move(v))))) << std::endl;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ auto insert_at(cpp2::in<int> where, cpp2::in<int> val) -> void;
1818
#line 5 "mixed-captures-in-expressions-and-postconditions.cpp2"
1919
[[nodiscard]] auto main() -> int{
2020
std::vector<std::string> vec {
21-
"hello", "2022"};
21+
"hello", "2022"};
2222

2323
std::string y {"\n"};
24-
auto callback {[_0 = (&y)](auto const& x) -> void{std::cout << x << *cpp2::assert_not_null(_0);}};
24+
auto callback {[_0 = (&y)](auto const& x) -> void{std::cout << x << *cpp2::assert_not_null(_0); }};
2525

26-
std::ranges::for_each( vec, callback );
26+
std::ranges::for_each(vec, callback);
2727
y = "-ish\n";
28-
std::ranges::for_each( std::move(vec), std::move(callback));
28+
std::ranges::for_each(std::move(vec), std::move(callback));
2929
}
3030

3131
std::vector<int> vec {};

regression-tests/test-results/mixed-forwarding.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ auto use(auto const& x) -> void{}
3838
auto apply_implicit_forward(auto&& t) -> void
3939
requires (std::is_same_v<CPP2_TYPEOF(t), std::pair<X,X>>)
4040
#line 16 "mixed-forwarding.cpp2"
41-
{
41+
{
4242
copy_from(t.first); // copies
4343
copy_from(CPP2_FORWARD(t).second);// moves
4444
}
4545
auto apply_explicit_forward(auto&& t) -> void
4646
requires (std::is_same_v<CPP2_TYPEOF(t), std::pair<X,X>>)
4747
#line 20 "mixed-forwarding.cpp2"
48-
{
49-
copy_from( CPP2_FORWARD(t).first);// moves
50-
copy_from( CPP2_FORWARD(t).second);// moves
48+
{
49+
copy_from(CPP2_FORWARD(t).first);// moves
50+
copy_from(CPP2_FORWARD(t).second);// moves
5151
}
5252

5353
[[nodiscard]] auto main() -> int{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
#line 7 "mixed-function-expression-and-std-for-each.cpp2"
1818
[[nodiscard]] auto main() -> int{
1919
std::vector<std::string> vec {
20-
"hello", "2022"};
20+
"hello", "2022"};
2121
std::span view {vec};
2222

2323
// Passing a function expression
2424
std::for_each(
2525
CPP2_UFCS_0(begin, view),
2626
CPP2_UFCS_0(end, view),
27-
[](auto& x ) -> void { x += "-ish"; }
27+
[](auto& x) -> void { x += "-ish"; }
2828
);
2929

3030
// Initializating from a function expression
31-
auto callback {[](auto& x) -> void { x += " maybe"; }};
31+
auto callback {[](auto& x) -> void { x += " maybe"; }};
3232
std::for_each(
3333
CPP2_UFCS_0(begin, view),
3434
CPP2_UFCS_0(end, view),

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
#line 8 "mixed-function-expression-and-std-ranges-for-each-with-capture.cpp2"
1919
[[nodiscard]] auto main() -> int{
2020
std::vector<std::string> vec {
21-
"hello", "2022"};
21+
"hello", "2022"};
2222
std::span view {vec};
2323

2424
auto y {"\n"};
2525
std::ranges::for_each
26-
( view, [_0 = std::move(y)](auto const& x) -> void{std::cout << x << _0;});
26+
(view, [_0 = std::move(y)](auto const& x) -> void{std::cout << x << _0; });
2727

28-
auto callback {[](auto& x) -> void { x += "-ish"; }};
29-
std::ranges::for_each( view, std::move(callback));
28+
auto callback {[](auto& x) -> void { x += "-ish"; }};
29+
std::ranges::for_each(view, std::move(callback));
3030

3131
for ( auto const& cpp2_range = view; auto const& str : cpp2_range )
3232
std::cout << str << "\n";

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
#line 8 "mixed-function-expression-and-std-ranges-for-each.cpp2"
1919
[[nodiscard]] auto main() -> int{
2020
std::vector<std::string> vec {
21-
"hello", "2022"};
21+
"hello", "2022"};
2222
std::span view {vec};
2323

2424
std::ranges::for_each
25-
( view, [](auto const& x) -> void{std::cout << x << "\n";});
25+
(view, [](auto const& x) -> void{std::cout << x << "\n"; });
2626

27-
auto callback {[](auto& x) -> void { x += "-ish"; }};
28-
std::ranges::for_each( view, std::move(callback));
27+
auto callback {[](auto& x) -> void { x += "-ish"; }};
28+
std::ranges::for_each(view, std::move(callback));
2929

3030
for ( auto const& cpp2_range = view; auto const& str : cpp2_range )
3131
std::cout << str << "\n";

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
#line 8 "mixed-function-expression-with-pointer-capture.cpp2"
1919
[[nodiscard]] auto main() -> int{
2020
std::vector<std::string> vec {
21-
"hello", "2023"};
21+
"hello", "2023"};
2222
std::span view {vec};
2323

2424
std::string y {"\n"};
25-
std::ranges::for_each( view, [_0 = (&y)](auto const& x) -> void{
25+
std::ranges::for_each(view, [_0 = (&y)](auto const& x) -> void{
2626
std::cout << CPP2_UFCS_0(c_str, (*cpp2::assert_not_null((_0)))) << x << *cpp2::assert_not_null(_0);
27-
} );
27+
});
2828

29-
auto callback {[](auto& x) -> void { x += "-ish"; }};
30-
std::ranges::for_each( view, std::move(callback));
29+
auto callback {[](auto& x) -> void { x += "-ish"; }};
30+
std::ranges::for_each(view, std::move(callback));
3131

3232
for ( auto const& cpp2_range = view; auto const& str : cpp2_range )
3333
std::cout << str << "\n";

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
#line 8 "mixed-function-expression-with-repeated-capture.cpp2"
1919
[[nodiscard]] auto main() -> int{
2020
std::vector<std::string> vec {
21-
"hello", "2022"};
21+
"hello", "2022"};
2222
std::span view {vec};
2323

2424
auto y {"\n"};
2525
std::ranges::for_each
26-
( view, [_0 = std::move(y)](auto const& x) -> void{std::cout << _0 << x << _0;});
26+
(view, [_0 = std::move(y)](auto const& x) -> void{std::cout << _0 << x << _0; });
2727

28-
auto callback {[](auto& x) -> void { x += "-ish"; }};
29-
std::ranges::for_each( view, std::move(callback));
28+
auto callback {[](auto& x) -> void { x += "-ish"; }};
29+
std::ranges::for_each(view, std::move(callback));
3030

3131
for ( auto const& cpp2_range = view; auto const& str : cpp2_range )
3232
std::cout << str << "\n";

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ bool flip_a_coin() {
3535

3636
if (flip_a_coin()) {
3737
x.construct("xyzzy");
38-
} else {
39-
fill(& x, "plugh", 40 ); // note: constructs x!
38+
}else {
39+
fill(&x, "plugh", 40); // note: constructs x!
4040
}
4141
print_decorated(std::move(x.value()));
4242
}
@@ -53,5 +53,5 @@ auto fill(
5353
x.construct(CPP2_UFCS(substr, value, 0, count));
5454
}
5555

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ auto print_decorated(auto const& x) -> void;
3131

3232
if (flip_a_coin()) {
3333
x.construct("xyzzy");
34-
} else {
35-
fill(& x, "plugh", 40 ); // note: constructs x!
34+
}else {
35+
fill(&x, "plugh", 40); // note: constructs x!
3636
}
3737
print_decorated(std::move(x.value()));
3838
}
@@ -49,9 +49,9 @@ auto fill(
4949
x.construct(CPP2_UFCS(substr, value, 0, count));
5050
}
5151

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

5454
// for test determinism, force "xyzzy" branch
5555
// the standard mandates that std::mt19937()() == 3499211612
56-
[[nodiscard]] auto flip_a_coin() -> bool { return std::mt19937()() % 2==0; }
56+
[[nodiscard]] auto flip_a_coin() -> bool { return std::mt19937()() % 2==0; }
5757

regression-tests/test-results/mixed-inspect-templates.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ struct my_type {};
2626
return [&] () -> std::string { auto&& __expr = v;
2727
if (cpp2::is<std::vector>(__expr)) { if constexpr( requires{"std::vector";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("std::vector")),std::string> ) return "std::vector"; else return std::string{}; else return std::string{}; }
2828
else if (cpp2::is<std::array>(__expr)) { if constexpr( requires{"std::array";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("std::array")),std::string> ) return "std::array"; else return std::string{}; else return std::string{}; }
29-
else if (cpp2::is<std::variant>(__expr)) { if constexpr( requires{"std::variant";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("std::variant")),std::string> ) return "std::variant"; else return std::string{}; else return std::string{}; }
29+
else if (cpp2::is<std::variant>(__expr)) { if constexpr( requires{"std::variant";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("std::variant")),std::string> ) return "std::variant"; else return std::string{}; else return std::string{}; }
3030
else if (cpp2::is<my_type>(__expr)) { if constexpr( requires{"my_type";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("my_type")),std::string> ) return "my_type"; else return std::string{}; else return std::string{}; }
31-
else return "unknown"; }
31+
else return "unknown"; }
3232
();
3333
}
3434

regression-tests/test-results/mixed-inspect-values-2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ constexpr auto empty = [](auto&& x){
3232

3333
std::cout << [&] () -> std::string { auto&& __expr = i;
3434
if (cpp2::is(__expr, (less_than(10)))) { if constexpr( requires{"i less than 10";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("i less than 10")),std::string> ) return "i less than 10"; else return std::string{}; else return std::string{}; }
35-
else if (cpp2::is(__expr, in(11, 20))) { if constexpr( requires{"i is between 11 and 20";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("i is between 11 and 20")),std::string> ) return "i is between 11 and 20"; else return std::string{}; else return std::string{}; }
36-
else return "i is out of our interest"; }
35+
else if (cpp2::is(__expr, in(11, 20))) { if constexpr( requires{"i is between 11 and 20";} ) if constexpr( std::is_convertible_v<CPP2_TYPEOF(("i is between 11 and 20")),std::string> ) return "i is between 11 and 20"; else return std::string{}; else return std::string{}; }
36+
else return "i is out of our interest"; }
3737
() << std::endl;
3838

3939
if (cpp2::is(i, (less_than(20)))) {

0 commit comments

Comments
 (0)