mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Make EIGEN_HAS_STD_RESULT_OF user configurable
This commit is contained in:
parent
1395056fc0
commit
abd1c1af7a
@ -372,8 +372,12 @@
|
||||
#endif
|
||||
|
||||
// Does the compiler support result_of?
|
||||
#ifndef EIGEN_HAS_STD_RESULT_OF
|
||||
#if EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L)))
|
||||
#define EIGEN_HAS_STD_RESULT_OF 1
|
||||
#else
|
||||
#define EIGEN_HAS_STD_RESULT_OF 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Does the compiler support variadic templates?
|
||||
|
@ -254,7 +254,7 @@ protected:
|
||||
* upcoming next STL generation (using a templated result member).
|
||||
* If none of these members is provided, then the type of the first argument is returned. FIXME, that behavior is a pretty bad hack.
|
||||
*/
|
||||
#ifdef EIGEN_HAS_STD_RESULT_OF
|
||||
#if EIGEN_HAS_STD_RESULT_OF
|
||||
template<typename T> struct result_of {
|
||||
typedef typename std::result_of<T>::type type1;
|
||||
typedef typename remove_all<type1>::type type;
|
||||
|
@ -57,7 +57,7 @@ template<int SizeAtCompileType> void mixingtypes(int size = SizeAtCompileType)
|
||||
|
||||
mf+mf;
|
||||
VERIFY_RAISES_ASSERT(mf+md);
|
||||
#ifndef EIGEN_HAS_STD_RESULT_OF
|
||||
#if !EIGEN_HAS_STD_RESULT_OF
|
||||
// this one does not even compile with C++11
|
||||
VERIFY_RAISES_ASSERT(mf+mcf);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user