Skip to content

Commit 58ee983

Browse files
committed
test: update results after rebase
1 parent 83881bf commit 58ee983

6 files changed

+39
-39
lines changed

regression-tests/test-results/pure2-bugfix-for-deducible-parameters.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ template<typename T> class v;
1717
// are wrapped like non-dependent parameters.
1818
#line 3 "pure2-bugfix-for-deducible-parameters.cpp2"
1919
template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x) -> void;
20-
template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, T const& _) -> void;
20+
template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, [[maybe_unused]] T const& param2) -> void;
2121
template<typename T> [[nodiscard]] auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x) -> auto&&;
2222
template<typename T> auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x, T const& y) -> void;
2323

@@ -41,7 +41,7 @@ template<typename T> class v {
4141

4242
#line 3 "pure2-bugfix-for-deducible-parameters.cpp2"
4343
template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x) -> void{x.construct(); }
44-
template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, T const& _) -> void{x.construct(); }
44+
template<typename T> auto init(cpp2::out<std::integral_constant<cpp2::i32,T::value>> x, [[maybe_unused]] T const& param2) -> void{x.construct(); }
4545
template<typename T> [[nodiscard]] auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x) -> auto&& { return x; }
4646
template<typename T> auto id(cpp2::in<std::integral_constant<cpp2::i32,T::value>> x, T const& y) -> void{cpp2::Default.expects(&x==&y, ""); }
4747

@@ -53,12 +53,12 @@ auto main() -> int{
5353
cpp2::Default.expects(&id<zero>(z.value())==&z.value(), "");
5454

5555
// Deducible parameters.
56-
(void) v{0};
57-
(void) []<typename T>(std::vector<T> const& x) -> void{}(std::vector<cpp2::i32>{});
58-
(void) []<typename T>(std::vector<std::vector<T>> const& x) -> void{}(std::vector<std::vector<cpp2::i32>>{});
56+
static_cast<void>(v{0});
57+
static_cast<void>([]<typename T>(std::vector<T> const& x) -> void{}(std::vector<cpp2::i32>{}));
58+
static_cast<void>([]<typename T>(std::vector<std::vector<T>> const& x) -> void{}(std::vector<std::vector<cpp2::i32>>{}));
5959
// Uncomment once `typename` is supported for template arguments.
6060
// _ = :<T, U> (x: std::pair<T, typename U::value_type>, y: U) = {}(:std::pair = (0, 0), z);
61-
(void) []<typename T, typename U>(std::array<T,U::value> const& x, U const& y) -> void{}(std::array<cpp2::i32,0>{}, z.value());
61+
static_cast<void>([]<typename T, typename U>(std::array<T,U::value> const& x, U const& y) -> void{}(std::array<cpp2::i32,0>{}, z.value()));
6262
init(cpp2::out(&z.value()), z.value());
6363
id(z.value(), std::move(z.value()));
6464
{

regression-tests/test-results/pure2-bugfix-for-dependent-types.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -46,76 +46,76 @@ template<typename T, T::value_type V> [[nodiscard]] auto f(cpp2::in<typename T::
4646
return { typename T::value_type{x} };
4747

4848
// Dependent *template-id*s.
49-
(void) typename identity<T>::value_type{};// First identifier.
50-
(void) typename std::optional<T>::value_type{};// Non-first identifier.
51-
(void) typename std::array<cpp2::i32,T::value>::value_type{};
52-
(void) typename std::array<cpp2::i32,T::value + T::value>::value_type{};
49+
static_cast<void>(typename identity<T>::value_type{});// First identifier.
50+
static_cast<void>(typename std::optional<T>::value_type{});// Non-first identifier.
51+
static_cast<void>(typename std::array<cpp2::i32,T::value>::value_type{});
52+
static_cast<void>(typename std::array<cpp2::i32,T::value + T::value>::value_type{});
5353

5454
// Emitted `template`.
5555
using ptr = T*; // Needed, pending #502.
5656
using nptr = cpp2::i32*; // Needed, pending #502.
57-
(void) typename std::pointer_traits<ptr>::template rebind<ptr>{};// Type-only context.
58-
(void) std::pointer_traits<nptr>::rebind<nptr>{}; // Non-dependent.
59-
(void) std::pointer_traits<nptr>::rebind<ptr>{}; // Dependent on the nested template.
60-
(void) typename std::pointer_traits<ptr>::template rebind<nptr>{};// Dependent on the outer template.
57+
static_cast<void>(typename std::pointer_traits<ptr>::template rebind<ptr>{});// Type-only context.
58+
static_cast<void>(std::pointer_traits<nptr>::rebind<nptr>{});// Non-dependent.
59+
static_cast<void>(std::pointer_traits<nptr>::rebind<ptr>{});// Dependent on the nested template.
60+
static_cast<void>(typename std::pointer_traits<ptr>::template rebind<nptr>{});// Dependent on the outer template.
6161
// Uncomment once `typename` is supported for template arguments.
6262
// _ = :identity<typename std::pointer_traits<ptr>::rebind<ptr>> = (); // Non type-only context.
6363

6464
// Aliases.
6565
using w = T;
66-
(void) typename w::value_type{x};
66+
static_cast<void>(typename w::value_type{x});
6767
using v = w;
68-
(void) typename v::value_type{x};
68+
static_cast<void>(typename v::value_type{x});
6969
using a = T::type;
70-
(void) typename a::value_type{x};
70+
static_cast<void>(typename a::value_type{x});
7171

7272
{
7373
// Test that there's no prefixed `typename` to....
74-
(void) std::integral_constant<cpp2::i32,T::value>();// `T::value`.
75-
(void) std::type_identity_t<T>{}; // `std::type_identity_t<T>`.
74+
static_cast<void>(std::integral_constant<cpp2::i32,T::value>());// `T::value`.
75+
static_cast<void>(std::type_identity_t<T>{});// `std::type_identity_t<T>`.
7676

7777
// Test that non-dependent names aren't emitted with `typename`.
7878
using a = std::integral_constant<cpp2::i32,0>;
7979
using b = a;
8080
using c = b;
81-
(void) b::value_type{x};
82-
(void) c::value_type{x};
81+
static_cast<void>(b::value_type{x});
82+
static_cast<void>(c::value_type{x});
8383
}
8484
}
8585

8686
#line 56 "pure2-bugfix-for-dependent-types.cpp2"
8787
auto main() -> int{
8888
using zero = std::integral_constant<cpp2::i32,0>;
89-
(void) f<zero,0>(0);
89+
static_cast<void>(f<zero,0>(0));
9090

9191
// Emitted `template` (noop, taken care of by the UFCS macro).
92-
(void) [](auto const& f) -> void{(void) CPP2_UFCS_TEMPLATE_0(operator(), (<cpp2::i32>), f); }([]<typename T>() -> void{});
92+
static_cast<void>([](auto const& f) -> void{static_cast<void>(CPP2_UFCS_TEMPLATE_0(operator(), (<cpp2::i32>), f)); }([]<typename T>() -> void{}));
9393

9494
// Nesting is irrelevant.
95-
(void) []<typename T>() -> void{(void) typename T::value_type{}; };
96-
(void) []() -> void{(void) []<typename T>() -> void{(void) typename T::value_type{}; }; };
97-
(void) []() -> void{(void) []() -> void{(void) []<typename T>() -> void{(void) typename T::value_type{}; }; }; };
98-
(void) []() -> void{(void) []() -> void{(void) []() -> void{(void) []<typename T>() -> void{(void) typename T::value_type{}; }; }; }; };
99-
(void) []() -> void{(void) []() -> void{(void) []<typename T>() -> void{(void) []() -> void{(void) typename T::value_type{}; }; }; }; };
100-
(void) []() -> void{(void) []<typename T>() -> void{(void) []() -> void{(void) []() -> void{(void) typename T::value_type{}; }; }; }; };
101-
(void) []<typename T>() -> void{(void) []() -> void{(void) []() -> void{(void) []() -> void{(void) typename T::value_type{}; }; }; }; };
102-
(void) []<typename T>() -> void{(void) []() -> void{(void) []() -> void{(void) [](cpp2::in<typename T::value_type> x) -> void{}; }; }; };
103-
(void) []<typename T>() -> void{(void) []() -> void{(void) [](cpp2::in<typename T::value_type> x) -> void{(void) []() -> void{}; }; }; };
104-
(void) []<typename T>() -> void{(void) [](cpp2::in<typename T::value_type> x) -> void{(void) []() -> void{(void) []() -> void{}; }; }; };
105-
(void) []<typename T>(cpp2::in<typename T::value_type> x) -> void{(void) []() -> void{(void) []() -> void{(void) []() -> void{}; }; }; };
95+
static_cast<void>([]<typename T>() -> void{static_cast<void>(typename T::value_type{}); });
96+
static_cast<void>([]() -> void{static_cast<void>([]<typename T>() -> void{static_cast<void>(typename T::value_type{}); }); });
97+
static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([]<typename T>() -> void{static_cast<void>(typename T::value_type{}); }); }); });
98+
static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([]<typename T>() -> void{static_cast<void>(typename T::value_type{}); }); }); }); });
99+
static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([]<typename T>() -> void{static_cast<void>([]() -> void{static_cast<void>(typename T::value_type{}); }); }); }); });
100+
static_cast<void>([]() -> void{static_cast<void>([]<typename T>() -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>(typename T::value_type{}); }); }); }); });
101+
static_cast<void>([]<typename T>() -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>(typename T::value_type{}); }); }); }); });
102+
static_cast<void>([]<typename T>() -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([](cpp2::in<typename T::value_type> x) -> void{}); }); }); });
103+
static_cast<void>([]<typename T>() -> void{static_cast<void>([]() -> void{static_cast<void>([](cpp2::in<typename T::value_type> x) -> void{static_cast<void>([]() -> void{}); }); }); });
104+
static_cast<void>([]<typename T>() -> void{static_cast<void>([](cpp2::in<typename T::value_type> x) -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{}); }); }); });
105+
static_cast<void>([]<typename T>(cpp2::in<typename T::value_type> x) -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{static_cast<void>([]() -> void{}); }); }); });
106106

107107
// Lookup.
108108
{
109109
using alias = std::integral_constant<cpp2::i32,0>;
110-
(void) alias::value_type{0};// Non-dependent.
110+
static_cast<void>(alias::value_type{0});// Non-dependent.
111111
}
112-
(void) []<typename T>(T const& _) -> void{
112+
static_cast<void>([]<typename T>([[maybe_unused]] T const& param1) -> void{
113113
using alias = std::integral_constant<T,0>;
114-
(void) typename alias::value_type{0};// Dependent.
114+
static_cast<void>(typename alias::value_type{0});// Dependent.
115115
{
116116
using alias = std::integral_constant<cpp2::i32,0>;
117-
(void) typename alias::value_type{0};// Non-dependent.
117+
static_cast<void>(typename alias::value_type{0});// Non-dependent.
118118
}
119-
}(0);
119+
}(0));
120120
}
121121

0 commit comments

Comments
 (0)