Environment
- OS Version: Ubuntu 26.04
- Source or binary build?
Source jetty build
Description
The changes introduced in #642 made the subscription API substantially worse if using lambdas.
Before the changes one could do
gzNode->Subscribe<gz::msgs::CameraInfo>( topic, [](
const gz::msgs::CameraInfo& gzMsg) { });
if you are using lambdas now,
// NOT COMPILING
gzNode->Subscribe( topic, [](const gz::msgs::CameraInfo& gzMsg) { });
fails as the deduction for lambda argument fails, therefore one needs to do
gzNode->Subscribe( topic, [](
std::function<void(const gz::msgs::CameraI&)>{const gz::msgs::CameraInfo& gzMsg) { }});
This is a clear step backwards in the usability of the API.
Environment
Source jetty build
Description
The changes introduced in #642 made the subscription API substantially worse if using lambdas.
Before the changes one could do
gzNode->Subscribe<gz::msgs::CameraInfo>( topic, []( const gz::msgs::CameraInfo& gzMsg) { });if you are using lambdas now,
fails as the deduction for lambda argument fails, therefore one needs to do
This is a clear step backwards in the usability of the API.