Skip to content

Commit f41e325

Browse files
committed
Actually make test case rely on the using
1 parent dd04703 commit f41e325

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

regression-tests/pure2-print.cpp2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ outer: @print type = {
7171
using std::array;
7272
using std::cout;
7373

74-
type_alias: type == std::array<int,10>;
74+
type_alias: type == array<int,10>;
7575

7676
object_alias_1: i8 == 42;
7777
object_alias_2: == 42;
7878

7979

8080
var: ::outer::mytype = ();
81-
std::cout << var.g(42) << "\n";
81+
cout << var.g(42) << "\n";
8282

83-
std::cout << inspect var.g(42) -> namespace_alias::string {
83+
cout << inspect var.g(42) -> namespace_alias::string {
8484
is 43 = "forty-and-three";
8585
is _ = "default case";
8686
} << "\n";
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
In file included from pure2-print.cpp:7:
22
../../../include/cpp2util.h:10005:33: error: expected unqualified-id before ‘static_assert’
33
pure2-print.cpp2:7:1: note: in expansion of macro ‘CPP2_REQUIRES_’
4-
pure2-print.cpp2:63:59: error: expected ‘;’ at end of member declaration
4+
pure2-print.cpp2:65:59: error: expected ‘;’ at end of member declaration
55
In file included from pure2-print.cpp:7:
66
../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10.
7-
pure2-print.cpp2:64:1: note: in expansion of macro ‘CPP2_REQUIRES_’
7+
pure2-print.cpp2:66:1: note: in expansion of macro ‘CPP2_REQUIRES_’
88
../../../include/cpp2util.h:10005:33: error: expected initializer before ‘static_assert’
9-
pure2-print.cpp2:89:1: note: in expansion of macro ‘CPP2_REQUIRES_’
9+
pure2-print.cpp2:94:1: note: in expansion of macro ‘CPP2_REQUIRES_’
1010
pure2-print.cpp2:6:29: error: ‘constexpr const T outer::object_alias’ is not a static data member of ‘class outer’
1111
pure2-print.cpp2:6:36: error: template definition of non-template ‘constexpr const T outer::object_alias’
12-
pure2-print.cpp2:63:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:89& ...) requires (is_convertible_v<typename std::remove_cv<typename std::remove_reference<decltype(outer::mytype::variadic::x)>::type>::type, int> && ...)’
13-
pure2-print.cpp2:63:29: note: candidate is: ‘template<class ... auto:80> static void outer::mytype::variadic(const auto:80& ...)’
12+
pure2-print.cpp2:65:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:89& ...) requires (is_convertible_v<typename std::remove_cv<typename std::remove_reference<decltype(outer::mytype::variadic::x)>::type>::type, int> && ...)’
13+
pure2-print.cpp2:65:29: note: candidate is: ‘template<class ... auto:80> static void outer::mytype::variadic(const auto:80& ...)’
1414
pure2-print.cpp2:8:19: note: ‘class outer::mytype’ defined here
15-
pure2-print.cpp2:88:37: error: no declaration matches ‘void outer::print(std::ostream&, const Args& ...) requires cpp2::cmp_greater_eq(sizeof (Args)..., 0)’
16-
pure2-print.cpp2:88:37: note: no functions named ‘void outer::print(std::ostream&, const Args& ...) requires cpp2::cmp_greater_eq(sizeof (Args)..., 0)’
15+
pure2-print.cpp2:93:37: error: no declaration matches ‘void outer::print(std::ostream&, const Args& ...) requires cpp2::cmp_greater_eq(sizeof (Args)..., 0)’
16+
pure2-print.cpp2:93:37: note: no functions named ‘void outer::print(std::ostream&, const Args& ...) requires cpp2::cmp_greater_eq(sizeof (Args)..., 0)’
1717
pure2-print.cpp2:4:7: note: ‘class outer’ defined here
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pure2-bugfix-for-non-local-function-expression.cpp2:9:7: warning: ‘t’ has a base ‘t::<lambda()>’ which has no linkage [-Wsubobject-linkage]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,16 @@ requires ((std::is_convertible_v<CPP2_TYPEOF(x), int> && ...))
173173
using std::array;
174174
using std::cout;
175175

176-
using type_alias = std::array<int,10>;
176+
using type_alias = array<int,10>;
177177

178178
cpp2::i8 constexpr object_alias_1 = 42;
179179
auto constexpr object_alias_2 = 42;
180180

181181
#line 80 "pure2-print.cpp2"
182182
::outer::mytype var {};
183-
std::cout << CPP2_UFCS(g, var, 42) << "\n";
183+
cout << CPP2_UFCS(g, var, 42) << "\n";
184184

185-
std::cout << [&] () -> namespace_alias::string { auto&& _expr = CPP2_UFCS(g, std::move(var), 42);
185+
cout << [&] () -> namespace_alias::string { auto&& _expr = CPP2_UFCS(g, std::move(var), 42);
186186
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{}; }
187187
else return "default case"; }
188188
() << "\n";

regression-tests/test-results/pure2-print.cpp2.output

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ outer: type =
121121
namespace_alias: namespace == ::std;
122122
using std::array;
123123
using std::cout;
124-
type_alias: type == std::array<int, 10>;
124+
type_alias: type == array<int, 10>;
125125
object_alias_1: i8 == 42;
126126
object_alias_2: == 42;
127127
var: ::outer::mytype = ();
128-
std::cout << var.g(42) << "\n";
129-
std::cout << inspect var.g(42) -> namespace_alias::string {
128+
cout << var.g(42) << "\n";
129+
cout << inspect var.g(42) -> namespace_alias::string {
130130
is 43 = "forty-and-three";
131131
is _ = "default case";
132132
} << "\n";

0 commit comments

Comments
 (0)