----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61987/#review184221 -----------------------------------------------------------
3rdparty/libprocess/include/process/future.hpp Lines 1674 (patched) <https://reviews.apache.org/r/61987/#comment260309> Should be `std::declval<F&>()`, since the call you're actually making is `f(std::forward<Args>(args)...);` below. 3rdparty/libprocess/include/process/future.hpp Lines 1676 (patched) <https://reviews.apache.org/r/61987/#comment260312> You can just do `decltype(f(std::forward<Args>(args)...))` here. 3rdparty/libprocess/include/process/future.hpp Lines 1678 (patched) <https://reviews.apache.org/r/61987/#comment260311> Do you only want to support functions that return a `Future` by value? if a function returns a `const Future<T>&`, this `static_assert` will fail. 3rdparty/libprocess/include/process/future.hpp Lines 1702-1703 (patched) <https://reviews.apache.org/r/61987/#comment260313> Let's stick to the `typename std::enable_if<condition, int>::type = 0` pattern for now. 3rdparty/libprocess/include/process/future.hpp Lines 1703 (patched) <https://reviews.apache.org/r/61987/#comment260307> You need `typename std::decay<F>::type` here. `F` can deduce to be a l-value reference, in which case `is_specialization_of` will always return `false`, based on the implementation of it I see in `traits.hpp`. 3rdparty/libprocess/include/process/future.hpp Lines 1704 (patched) <https://reviews.apache.org/r/61987/#comment260308> You probably want to return `UndiscardableDecorator<typename std::decay<F>::type>` here, unless you're expecting `UndiscardableDecorator` to only exist as a temporary object. - Michael Park On Aug. 29, 2017, 11:30 p.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61987/ > ----------------------------------------------------------- > > (Updated Aug. 29, 2017, 11:30 p.m.) > > > Review request for mesos, Benjamin Mahler, Gilbert Song, and Jie Yu. > > > Bugs: MESOS-7926 > https://issues.apache.org/jira/browse/MESOS-7926 > > > Repository: mesos > > > Description > ------- > > This can be useful in circumstances where you don't want some > asynchronous operation to be canceled. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/future.hpp > 2f5f0a20b5a39b04fd684b1cb44b6a33b647bbef > 3rdparty/libprocess/src/tests/future_tests.cpp > 0c8725b9a5e64aaac6e3979e450a11e84f9bd45e > > > Diff: https://reviews.apache.org/r/61987/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
