From 5898d310221bff35567bf1964720731da53ab8f8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Apr 2024 19:05:19 -0700 Subject: [PATCH] [gcc7] fix for compilation error (#36390) Closes #36390 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36390 from ctiller:7-ish e5e04f6f0860f75dca0298e18f0034d51ebdb31b PiperOrigin-RevId: 625878832 --- test/core/transport/test_suite/test.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/core/transport/test_suite/test.h b/test/core/transport/test_suite/test.h index f0451a4488d..5b0862a2744 100644 --- a/test/core/transport/test_suite/test.h +++ b/test/core/transport/test_suite/test.h @@ -130,9 +130,9 @@ PromiseSpawner SpawnerForContext( template using NextSpawner = absl::AnyInvocable; -template +template Promise WrapPromiseAndNext(std::shared_ptr action_state, - Promise promise, NextSpawner next) { + P promise, NextSpawner next) { return Promise(OnCancel( [action_state, promise = std::move(promise), next = std::move(next)]() mutable -> Poll { @@ -172,8 +172,7 @@ NextSpawner WrapFollowUps(NameAndLocation loc, action_state->Set(ActionState::kNotStarted); spawner(name, WrapPromiseAndNext(std::move(action_state), - Promise(factory.Make(std::move(arg))), - std::move(next))); + factory.Make(std::move(arg)), std::move(next))); }; } @@ -191,9 +190,9 @@ void StartSeq(NameAndLocation loc, ActionStateFactory action_state_factory, [spawner, first = Factory(std::move(first)), next = std::move(next), action_state = std::move(action_state), name = loc.name()]() mutable { action_state->Set(ActionState::kNotStarted); + auto promise = first.Make(); spawner(name, WrapPromiseAndNext(std::move(action_state), - Promise(first.Make()), - std::move(next))); + std::move(promise), std::move(next))); return Empty{}; }); }