The Boost unfused adapter accepts only LValue arguments, while in general operations can also have RValues as arguments (const references or temporaries). Without C++11 or for older Boost versions this was apparently not an issue and the necessary conversion have been done implicitly (?).
The solution applies the forward_adapter template to overcome this limitation as suggested in the Boost Fusion documentation.
This patch also reverts the USE_CPP11 macro usage for this file, as it did not use std::bind or any other C++11 feature anyway and the only effect was the namespace of placeholders (see https://github.com/orocos-toolchain/rtt/commit/35cd426b4fd93c14a597b6ae590cc45c2dd2d105). Maybe it was unintentionally that boost::bind was not replaced by std::bind in the USE_CPP11 section of OperationInterfacePartFused.hpp like in other files of that patch (#103).
boost::arg<i> is a simpler solution than introducing the macro and use C++11 that also prevent namespace clashes without having to use boost::lambda.
Tested on Ubuntu Xenial with gcc 5.4, Boost 1.58 and -std=c++11 compile flag.
This is the build error I got without this patch.
The Boost unfused adapter accepts only LValue arguments, while in general operations can also have RValues as arguments (const references or temporaries). Without C++11 or for older Boost versions this was apparently not an issue and the necessary conversion have been done implicitly (?).
The solution applies the forward_adapter template to overcome this limitation as suggested in the Boost Fusion documentation.
This patch also reverts the
USE_CPP11
macro usage for this file, as it did not usestd::bind
or any other C++11 feature anyway and the only effect was the namespace of placeholders (see https://github.com/orocos-toolchain/rtt/commit/35cd426b4fd93c14a597b6ae590cc45c2dd2d105). Maybe it was unintentionally thatboost::bind
was not replaced bystd::bind
in theUSE_CPP11
section of OperationInterfacePartFused.hpp like in other files of that patch (#103).boost::arg<i>
is a simpler solution than introducing the macro and use C++11 that also prevent namespace clashes without having to use boost::lambda.Tested on Ubuntu Xenial with gcc 5.4, Boost 1.58 and
-std=c++11
compile flag. This is the build error I got without this patch.