@@ -49,14 +49,14 @@ struct throws {
4949};
5050static_assert (!std::is_nothrow_constructible_v<std::decay_t <throws>, throws>);
5151
52- template <bool Expect, typename Sender , typename Token , typename Env = ::env >
53- auto test_spawn_future_interface (Sender&& sndr, Token&& tok, Env&& e = Env{} ) -> void {
52+ template <bool Expect, typename Env = ::env , typename Sender , typename Token >
53+ auto test_spawn_future_interface (Sender&& sndr, Token&& tok) -> void {
5454 if constexpr (!std::same_as<std::remove_cvref_t <Env>, non_env>) {
5555 static_assert (Expect ==
5656 requires { test_std::spawn_future (std::forward<Sender>(sndr), std::forward<Token>(tok)); });
5757 }
58- static_assert (Expect == requires {
59- test_std::spawn_future (std::forward<Sender>(sndr), std::forward<Token>(tok), std::forward<Env>(e) );
58+ static_assert (Expect == requires (Env const & e) {
59+ test_std::spawn_future (std::forward<Sender>(sndr), std::forward<Token>(tok), e );
6060 });
6161}
6262
@@ -189,7 +189,8 @@ TEST(exec_spawn_future) {
189189 test_spawn_future_interface<true >(sender{}, token<true >{});
190190 test_spawn_future_interface<false >(non_sender{}, token<true >{});
191191 test_spawn_future_interface<false >(sender{}, token<false >{});
192- test_spawn_future_interface<false >(sender{}, token<true >{}, *new non_env{});
192+
193+ test_spawn_future_interface<false , non_env>(sender{}, token<true >{});
193194
194195 test_state_base ();
195196 test_receiver ();
0 commit comments