Summary: was using the renamed/nonexistent makeTryFunction
Reviewed By: @elliottneilclark
Differential Revision:
D2416178
template <class T>
template <class F>
void SharedPromise<T>::setWith(F&& func) {
- setTry(makeTryFunction(std::forward<F>(func)));
+ setTry(makeTryWith(std::forward<F>(func)));
}
template <class T>
p = std::move(p2);
p.setValue(std::make_shared<int>(1));
}
+
+TEST(SharedPromise, setWith) {
+ SharedPromise<int> p;
+ p.setWith([]{ return 1; });
+ EXPECT_EQ(1, p.getFuture().value());
+}