File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ class Future {
117
117
// / Has no effect if the shared state already has value.
118
118
template <typename Func>
119
119
auto then (Func&& func) {
120
- using Result = std::result_of_t <Func (T) >;
120
+ using Result = std::invoke_result_t <Func, T >;
121
121
122
122
if constexpr (details::FutureTraits<Result>::value) {
123
123
using FutResult = typename details::FutureTraits<Result>::ResultType;
@@ -194,7 +194,7 @@ class Future<void> {
194
194
195
195
template <typename Func>
196
196
auto then (Func&& func) {
197
- using Result = std::result_of_t <Func () >;
197
+ using Result = std::invoke_result_t <Func>;
198
198
if constexpr (details::FutureTraits<Result>::value) {
199
199
using FutResult = typename details::FutureTraits<Result>::ResultType;
200
200
auto newPromise = Promise<FutResult>();
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ using StateType = decltype(std::declval<const DerivedSW>().createState());
24
24
// using StateType = std::result_of_t<decltype (&DerivedSW::createState)()>;
25
25
26
26
template <typename DerivedSW>
27
- using WidgetType = std::result_of_t <decltype (&StateType<DerivedSW>::build)(
28
- const StateType<DerivedSW>,
29
- AppContext&,
30
- const BuildContext&) >;
27
+ using WidgetType = std::invoke_result_t <decltype (&StateType<DerivedSW>::build),
28
+ const StateType<DerivedSW>,
29
+ AppContext&,
30
+ const BuildContext&>;
31
31
32
32
} // namespace details
33
33
You can’t perform that action at this time.
0 commit comments