34 template <
typename InputValueT,
typename CallbackT>
35 auto watch(InputValueT&& value, CallbackT&& callback)
37 detail::access::watchers(std::forward<InputValueT>(value))
38 .connect(std::forward<CallbackT>(callback)))
40 auto& watchers = detail::access::watchers(
41 std::forward<InputValueT>(value));
44 auto& observers = detail::access::signal(
45 std::forward<InputValueT>(value))->observers();
46 observers.connect(watchers);
48 return watchers.connect(std::forward<CallbackT>(callback));
C++ amazing templates and reusable implementations awesomeness.