diff --git a/cxx/constellation/core/message/PayloadBuffer.hpp b/cxx/constellation/core/message/PayloadBuffer.hpp index 0180c7925b..57e18fbf0e 100644 --- a/cxx/constellation/core/message/PayloadBuffer.hpp +++ b/cxx/constellation/core/message/PayloadBuffer.hpp @@ -47,11 +47,12 @@ namespace constellation::message { * * @note If T doesn't construct nicely to an `std::any`, one possibility is moving it into an `std::shared_ptr` * - * @param t L-Value Reference of object T to move into the buffer + * @param t R-Value Reference of object T to move into the buffer * @param f Function F that takes a reference of T and returns an `std::span` */ template - requires std::move_constructible && std::is_invocable_r_v, F, T&> + requires(!std::is_lvalue_reference_v && std::move_constructible && + std::is_invocable_r_v, F, T&>) PayloadBuffer(T&& t, F f) : any_ptr_(new std::any(std::forward(t))), span_(f(std::any_cast(*any_ptr_))) {} /**