如何解决如何使用 VS2019、/std:c++latest 和 /Zc:__cplusplus 编译 eigen
我正在尝试使用 VS2019、/std:c++latest
和 /Zc:__cplusplus
我得到的是一个
eigen\Eigen\src\Core\util\Meta.h(320,25): error C2039: 'result_of': is not a member of 'std'
因为定义了 EIGEN_HAS_STD_RESULT_OF
。此获取已确定here:
#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
从 i can read 中,std::result_of
在 C++20 中被删除,这没有反映在上面的检查中。
我做错了吗?是否有一种简单的方法可以使用 VS、C++20 和 __cplusplus
定义哪个 reflects the actual standard version 而不必manually set all the defines 自己或修补 Macros.h?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。