diff --git a/include/rexy/compat/if_consteval.hpp b/include/rexy/compat/if_consteval.hpp index 7fb4a7b..cead49c 100644 --- a/include/rexy/compat/if_consteval.hpp +++ b/include/rexy/compat/if_consteval.hpp @@ -20,7 +20,7 @@ #if defined(__cpp_if_consteval) #define REXY_if_consteval if consteval - #define REXY_if_consteval if not consteval + #define REXY_if_not_consteval if not consteval #elif defined(__cpp_lib_is_constant_evaluated) #include //is_constant_evaluated #define REXY_if_consteval if(std::is_constant_evaluated()) diff --git a/include/rexy/utility.hpp b/include/rexy/utility.hpp index 75f39ad..8a42d2b 100644 --- a/include/rexy/utility.hpp +++ b/include/rexy/utility.hpp @@ -99,7 +99,7 @@ namespace rexy{ } template constexpr int strcmp(const T* l, const T* r)noexcept{ - REXY_if_consteval{ + REXY_if_not_consteval{ if constexpr(std::is_same_v,char>){ return std::strcmp(l, r); }else if constexpr(std::is_same_v,wchar_t>){ @@ -111,7 +111,7 @@ namespace rexy{ } template constexpr int strncmp(const T* l, const T* r, std::size_t max)noexcept{ - REXY_if_consteval{ + REXY_if_not_consteval{ if constexpr(std::is_same_v,char>){ return std::strncmp(l, r, max); }else if constexpr (std::is_same_v,wchar_t>){ @@ -123,7 +123,7 @@ namespace rexy{ } template constexpr int strncmp(const T* l, const T* r, std::size_t max, Compare cmp)noexcept{ - REXY_if_consteval{ + REXY_if_not_consteval{ if constexpr(std::is_same_v,char>){ return std::strncmp(l, r, max); }else if constexpr (std::is_same_v,wchar_t>){ @@ -139,7 +139,7 @@ namespace rexy{ return *l - *r; } constexpr void memcpy(void* l, const void* r, std::size_t n){ - REXY_if_consteval{ + REXY_if_not_consteval{ std::memcpy(l, r, n); }else{ char* ld = static_cast(l);