37 class state :
private detail::watchable<T>
39 using signal_ptr_t = decltype(
40 detail::make_state_signal(std::declval<T>()));
45 : signal_(detail::make_state_signal(T())) {}
47 : signal_(detail::make_state_signal(std::move(value))) {}
54 template <
typename T2>
57 signal_->push_down(std::forward<T2>(value));
62 return signal_->last();
66 const signal_ptr_t& signal() {
return signal_; }
67 const signal_ptr_t& roots() {
return signal_; }
69 friend class detail::access;
C++ amazing templates and reusable implementations awesomeness.