We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f35455b commit 01aea9dCopy full SHA for 01aea9d
README.md
@@ -24,8 +24,9 @@ observer.reset(); // removes observer from event
24
lars::ObservableValue a = 1;
25
lars::ObservableValue b = 2;
26
lars::DependentObservableValue sum([](auto a, auto b){ return a+b; },a,b);
27
-sum.onChange.connect([](auto &v){ std::cout << "The result is " << r << std::endl; });
28
-a.set(3); // -> "The result is 5"
+sum.onChange.connect([](auto &v){ std::cout << "The result changed to " << r << std::endl; });
+std::cout << "The result is " << *sum << std::endl; // -> the result is 3
29
+a.set(3); // -> The result changed to 5
30
```
31
32
# Installation and usage
0 commit comments