mirror of
https://github.com/boostorg/config.git
synced 2025-07-30 04:17:16 +02:00
BOOST_NO_CXX17_STD_INVOKE: Update test case to check we have std::invoke_result.
MSVC has no std::invoke in C++14 mode. GCC has no std::invoke_result prior to 7.1.
This commit is contained in:
@ -175,7 +175,7 @@
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
#endif
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
#endif
|
||||
|
||||
|
@ -294,12 +294,10 @@ extern "C" char *gets (char *__s);
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++17 features in GCC 6.1 and later
|
||||
// C++17 features in GCC 7.1 and later
|
||||
//
|
||||
#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
#endif
|
||||
#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
#endif
|
||||
|
||||
|
@ -19,7 +19,7 @@ int foo( int i, int j) {
|
||||
|
||||
int test() {
|
||||
int i = 1, j = 2;
|
||||
std::invoke( foo, i, j);
|
||||
typename std::invoke_result<int(&)(int,int), int, int>::type t = std::invoke( foo, i, j);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user