Closed helmesjo closed 3 years ago
In TupleDispatcher.hpp, use perfect forwarding when invoking callbacks instead of always passing by value (makes mutable lambdas work as expected).
TupleDispatcher.hpp
Added new test for mutable lambda which passes with fix, and fails without.
All tests pass on GCC & MSVC.
Coverage remained the same at 99.923% when pulling 419fe3fe24a088dfe445bfa3a296aaf86d1d526e on helmesjo:perfectly_forward_mock_delegates into 814f28cd509ef2a8cdf7fe370bd9ec6d3b181dc7 on eranpeer:master.
Thanks
@eranpeer Any release planned?
In
TupleDispatcher.hpp
, use perfect forwarding when invoking callbacks instead of always passing by value (makes mutable lambdas work as expected).Added new test for mutable lambda which passes with fix, and fails without.
All tests pass on GCC & MSVC.