Skip to content

Commit

Permalink
Replace usage of std::result_of with decltype
Browse files Browse the repository at this point in the history
It's slated for removal in c++20

Fixes: QTBUG-82240
Change-Id: I7b35c151413b131ca49b2c09b6382efc3fc8ccb6
Reviewed-by: Timur Pocheptsov <[email protected]>
  • Loading branch information
Morten242 committed Feb 21, 2020
1 parent f9086eb commit fb6acf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/kernel/qobjectdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ struct Q_CORE_EXPORT QMetaObject
static typename std::enable_if<!QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
&& QtPrivate::FunctionPointer<Func>::ArgumentCount == -1
&& !std::is_convertible<Func, const char*>::value, bool>::type
invokeMethod(QObject *context, Func function, typename std::result_of<Func()>::type *ret)
invokeMethod(QObject *context, Func function, decltype(function()) *ret)
{
return invokeMethodImpl(context,
new QtPrivate::QFunctorSlotObjectWithNoArgs<Func, decltype(function())>(std::move(function)),
Expand Down

0 comments on commit fb6acf0

Please sign in to comment.