From 7b07edd9e4ffc009469579bfe36de0668b618353 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 17 Jun 2020 06:33:35 -0500 Subject: [PATCH] [ox/std] Rename is_signed to is_signed_v --- deps/ox/src/ox/mc/intops.hpp | 6 +++--- deps/ox/src/ox/std/typetraits.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/ox/src/ox/mc/intops.hpp b/deps/ox/src/ox/mc/intops.hpp index a7e91d93..c3d64fe8 100644 --- a/deps/ox/src/ox/mc/intops.hpp +++ b/deps/ox/src/ox/mc/intops.hpp @@ -28,7 +28,7 @@ template // find most significant non-sign indicator bit std::size_t highestBit = 0; // start at one bit lower if signed - if constexpr(ox::is_signed) { + if constexpr(ox::is_signed_v) { --shiftStart; } for (int i = shiftStart; i > -1; --i) { @@ -65,7 +65,7 @@ template if (val) { // bits needed to represent number factoring in space possibly // needed for signed bit - const auto bits = highestBit(val) + 1 + (ox::is_signed ? 1 : 0); + const auto bits = highestBit(val) + 1 + (ox::is_signed_v ? 1 : 0); // bytes needed to store value std::size_t bytes = bits / 8 + (bits % 8 != 0); const auto bitsAvailable = bytes * 8; // bits available to integer value @@ -128,7 +128,7 @@ template decoded >>= bytes; auto out = static_cast(decoded); // move sign bit - if constexpr(ox::is_signed) { + if constexpr(ox::is_signed_v) { const auto valBits = bytes << 3; // get sign uint64_t sign = decoded >> (valBits - 1); diff --git a/deps/ox/src/ox/std/typetraits.hpp b/deps/ox/src/ox/std/typetraits.hpp index d3932b8a..48990ba0 100644 --- a/deps/ox/src/ox/std/typetraits.hpp +++ b/deps/ox/src/ox/std/typetraits.hpp @@ -89,7 +89,7 @@ template constexpr bool is_class_v = ox::is_class(); template -constexpr bool is_signed = ox::integral_constant::value; +constexpr bool is_signed_v = ox::integral_constant::value; // enable_if ///////////////////////////////////////////////////////////////////