mirror of
https://github.com/edo9300/ygopro-core
synced 2026-08-25 16:23:07 -04:00
Update FunctionResult template to use std::__invoke_of on old clang
This commit is contained in:
parent
0e70f5ad53
commit
787d171ce1
1 changed files with 7 additions and 5 deletions
12
scriptlib.h
12
scriptlib.h
|
|
@ -228,13 +228,15 @@ namespace scriptlib {
|
|||
}
|
||||
}
|
||||
|
||||
#if (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 7000) && \
|
||||
((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
||||
template<typename T, typename... Arg>
|
||||
using FunctionResult = std::invoke_result_t<T, Arg...>;
|
||||
#else
|
||||
#if (!defined(_MSVC_LANG) && __cplusplus < 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG < 201703L)
|
||||
template<typename T, typename... Arg>
|
||||
using FunctionResult = std::result_of_t<T(Arg...)>;
|
||||
#elif defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 7000
|
||||
template <class T, class... Args>
|
||||
using FunctionResult = typename std::__invoke_of<T, Args...>::type;
|
||||
#else
|
||||
template<typename T, typename... Arg>
|
||||
using FunctionResult = std::invoke_result_t<T, Arg...>;
|
||||
#endif
|
||||
|
||||
template<typename T, typename T2>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue