Skip to content

Commit b1142c5

Browse files
committed
Remove use of result_of_t
It has been deprecated in favor of invoke_result_t
1 parent 11c50ae commit b1142c5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libs/rMlib/include/UI/Future.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class Future {
117117
/// Has no effect if the shared state already has value.
118118
template<typename Func>
119119
auto then(Func&& func) {
120-
using Result = std::result_of_t<Func(T)>;
120+
using Result = std::invoke_result_t<Func, T>;
121121

122122
if constexpr (details::FutureTraits<Result>::value) {
123123
using FutResult = typename details::FutureTraits<Result>::ResultType;
@@ -194,7 +194,7 @@ class Future<void> {
194194

195195
template<typename Func>
196196
auto then(Func&& func) {
197-
using Result = std::result_of_t<Func()>;
197+
using Result = std::invoke_result_t<Func>;
198198
if constexpr (details::FutureTraits<Result>::value) {
199199
using FutResult = typename details::FutureTraits<Result>::ResultType;
200200
auto newPromise = Promise<FutResult>();

libs/rMlib/include/UI/StatefulWidget.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ using StateType = decltype(std::declval<const DerivedSW>().createState());
2424
// using StateType = std::result_of_t<decltype (&DerivedSW::createState)()>;
2525

2626
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&>;
3131

3232
} // namespace details
3333

0 commit comments

Comments
 (0)