mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add is_constant_evaluated, update alignment checks
This commit is contained in:
committed by
Antonio Sánchez
parent
f0a91838aa
commit
e22d58e816
@@ -508,6 +508,14 @@ inline constexpr bool logical_xor(bool a, bool b) {
|
||||
inline constexpr bool check_implication(bool a, bool b) {
|
||||
return !a || b;
|
||||
}
|
||||
|
||||
/// \internal Provide fallback for std::is_constant_evaluated for pre-C++20.
|
||||
#if EIGEN_COMP_CXXVER >= 20
|
||||
using std::is_constant_evaluated;
|
||||
#else
|
||||
constexpr bool is_constant_evaluated() { return false; }
|
||||
#endif
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
Reference in New Issue
Block a user