Improve support for binding arguments of different types then expected by the functor
RippeR37 opened this issue · 3 comments
RippeR37 commented
Improve logic when binding arguments of different type than the functor requires. This may include, but is not limited to implementing adapters/wrappers like base::Owned
or adding support for types like std::reference_wrapper
.
Somewhat related to #12 .
RippeR37 commented
Also:
base::OwnedRef
- binding non helper to non-const-ref argument should fail compilation.
RippeR37 commented
NOTE: When binding functions that take non-const reference arguments, they must now be wrapped in std::reference_wrapper. Furthermore, arguments are always either moved or copied, never bound by reference. This is to avoid lifetime issues and accidental modifications outside of the callback and is also consistent with how original //base handles such cases.
RippeR37 commented
Done.