From a511d2d1ef5fa07dde601961fe9394b474aad5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 24 Apr 2021 21:20:25 +0200 Subject: Behavior lens for shared refs from local state --- src/state.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/state.cpp') diff --git a/src/state.cpp b/src/state.cpp index 6e39b5e..1a3381a 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -153,3 +153,15 @@ Ref SharedState::store(const Storage & st) const return st.storeObject(Record(std::move(items))); } + +template<> +optional LocalState::lens>(const LocalState & x) +{ + return x.identity(); +} + +template<> +vector LocalState::lens>(const LocalState & x) +{ + return x.sharedRefs(); +} -- cgit v1.2.3