Skip to content

Commit ac735cb

Browse files
committed
Removed ->* overload from example.
1 parent 39a9b6e commit ac735cb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/sandbox/Main.cpp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ void SignalExample2()
6868
auto height = D::MakeVar(70);
6969
auto depth = D::MakeVar(8);
7070

71-
auto volume = (width,height,depth) ->* [] (int w, int h, int d) {
72-
return w * h * d;
73-
};
71+
auto volume = MakeSignal(
72+
With(width,height,depth),
73+
[] (int w, int h, int d) {
74+
return w * h * d;
75+
});
7476

7577
// Observe returns an observer handle, which can be used to detach the observer explicitly.
7678
// This observer handle holds a shared_ptr to the subject, so as long as it exists,
@@ -80,6 +82,7 @@ void SignalExample2()
8082
cout << "Volume changed to: " << v << endl;
8183
});
8284

85+
// Change multiple inputs at once
8386
D::DoTransaction([&] {
8487
width <<= 90;
8588
depth <<= 80;

0 commit comments

Comments
 (0)