Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-01-11 15:55:59 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-11 15:55:59 +0300
commitc3b3821cce2a4eab4126e526f85121a6b671c930 (patch)
tree9a03bfc9fd50c4b06f2d49dfbd0e65123e0188e7
parentfcf3ddfb4889bb2098398e20e0cb6c2cb7305285 (diff)
Simplify template macros
-rw-r--r--source/blender/blenlib/BLI_math_vector.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.hh b/source/blender/blenlib/BLI_math_vector.hh
index 049027bf94c..9b485bf5187 100644
--- a/source/blender/blenlib/BLI_math_vector.hh
+++ b/source/blender/blenlib/BLI_math_vector.hh
@@ -51,14 +51,13 @@ namespace blender::math {
#ifdef WITH_GMP
# define BLI_ENABLE_IF_FLT_VEC(T) \
- BLI_ENABLE_IF((std::disjunction_v<std::is_floating_point<typename T::base_type>, \
- std::is_same<typename T::base_type, mpq_class>>))
+ BLI_ENABLE_IF((std::is_floating_point_v<typename T::base_type> || \
+ std::is_same_v<typename T::base_type, mpq_class>))
#else
-# define BLI_ENABLE_IF_FLT_VEC(T) \
- BLI_ENABLE_IF((std::is_floating_point<typename T::base_type>::value))
+# define BLI_ENABLE_IF_FLT_VEC(T) BLI_ENABLE_IF((std::is_floating_point_v<typename T::base_type>))
#endif
-#define BLI_ENABLE_IF_INT_VEC(T) BLI_ENABLE_IF((std::is_integral<typename T::base_type>::value))
+#define BLI_ENABLE_IF_INT_VEC(T) BLI_ENABLE_IF((std::is_integral_v<typename T::base_type>))
template<typename T> inline bool is_zero(const T &a)
{