diff --git a/libs/async_cuda/include/hpx/async_cuda/cuda_future.hpp b/libs/async_cuda/include/hpx/async_cuda/cuda_future.hpp index c90a2cb8034c..be5d1fd3fb6f 100644 --- a/libs/async_cuda/include/hpx/async_cuda/cuda_future.hpp +++ b/libs/async_cuda/include/hpx/async_cuda/cuda_future.hpp @@ -309,7 +309,7 @@ namespace hpx { namespace cuda { namespace experimental { // ----------------------------------------------------------------- // This RAII helper class enables polling for a scoped block - struct enable_user_polling + struct HPX_NODISCARD enable_user_polling { enable_user_polling(std::string const& pool_name = "") : pool_name_(pool_name) diff --git a/libs/async_mpi/include/hpx/async_mpi/mpi_future.hpp b/libs/async_mpi/include/hpx/async_mpi/mpi_future.hpp index b672c7bc1445..dec3c68c9ce0 100644 --- a/libs/async_mpi/include/hpx/async_mpi/mpi_future.hpp +++ b/libs/async_mpi/include/hpx/async_mpi/mpi_future.hpp @@ -230,7 +230,7 @@ namespace hpx { namespace mpi { namespace experimental { // ----------------------------------------------------------------- // This RAII helper class assumes that MPI initialization/finalization is // handled elsewhere - struct enable_user_polling + struct HPX_NODISCARD enable_user_polling { enable_user_polling(std::string const& pool_name = "") : pool_name_(pool_name)