mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix std::result_of deprecation error in C++17 (fixes issue #3194)
This commit is contained in:
committed by
Marshall Greenblatt
parent
d24ea7572f
commit
477ab61e3b
@ -276,8 +276,13 @@ struct negation : bool_constant<!static_cast<bool>(B::value)> {};
|
|||||||
// References:
|
// References:
|
||||||
// [1] https://en.cppreference.com/w/cpp/types/result_of
|
// [1] https://en.cppreference.com/w/cpp/types/result_of
|
||||||
// [2] https://wg21.link/meta.trans.other#lib:invoke_result
|
// [2] https://wg21.link/meta.trans.other#lib:invoke_result
|
||||||
|
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
||||||
|
template <typename Functor, typename... Args>
|
||||||
|
using invoke_result = std::invoke_result<Functor, Args...>;
|
||||||
|
#else
|
||||||
template <typename Functor, typename... Args>
|
template <typename Functor, typename... Args>
|
||||||
using invoke_result = std::result_of<Functor && (Args && ...)>;
|
using invoke_result = std::result_of<Functor && (Args && ...)>;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Implementation of C++17's std::invoke_result_t.
|
// Implementation of C++17's std::invoke_result_t.
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user