FTXUI/include/ftxui/util
Kefu Chai 63e8dadad9
allow passing move-only parameter to Make() (#338)
ftxui::Ref<> is used for passing Options, for instance, MenuOption,
to the corresponding component which is supposed to hold a strong
reference of it. and we can observe the events sent to the component
by setting callback(s) in the option instance passed to the owner
component.

but the callback function is not always copyable, despite that it
might be moveable.

in this change,

* Make<>() is updated to use the perfect forwarding to avoid
  enforcing its parameters to be copyable.
* Ref<> is also updated to take a rvalue reference, so we can
  move away from the contructor parameter when creating an
  instance of Ref<>() from it.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-02-16 14:09:08 +01:00
..
autoreset.hpp Include utility header in autoreset.hpp for std::move 2021-06-07 10:10:34 +02:00
ref.hpp allow passing move-only parameter to Make() (#338) 2022-02-16 14:09:08 +01:00