1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-05-31 10:14:52 +08:00

comment out store tuple

This commit is contained in:
Xiaoxi Wang 2022-06-13 13:36:19 -07:00
parent 1de6c09307
commit ea2edebbeb
2 changed files with 7 additions and 0 deletions

@ -181,6 +181,7 @@ TEST_CASE("/flow/genericactors/AsyncListener") {
return Void();
}
#if false
TEST_CASE("/flow/genericactors/generic/storeTuple") {
state std::vector<UID> resA;
state int resB;
@ -197,3 +198,4 @@ TEST_CASE("/flow/genericactors/generic/storeTuple") {
ASSERT(resC == 2.0);
return Void();
}
#endif

@ -300,6 +300,10 @@ Future<Void> store(T& out, Future<T> what) {
});
}
#if false
// NOTE: Think twice whether create a new struct for a complex return type is better before using tuple.
// If we just use the return type once, is it worth to create a new struct?
// And enable the unit test in genericactors.actor.cpp
template <class A, class... Bs>
Future<Void> storeTuple(Future<std::tuple<A, Bs...>> what, A& a, Bs&... b) {
return map(what, [&](std::tuple<A, Bs...> const& v) {
@ -307,6 +311,7 @@ Future<Void> storeTuple(Future<std::tuple<A, Bs...>> what, A& a, Bs&... b) {
return Void();
});
}
#endif
template <class T>
Future<Void> storeOrThrow(T& out, Future<Optional<T>> what, Error e = key_not_found()) {