diff --git a/include/stdex/endian.hpp b/include/stdex/endian.hpp index c92d3557c..32e7dc318 100644 --- a/include/stdex/endian.hpp +++ b/include/stdex/endian.hpp @@ -43,7 +43,7 @@ namespace stdex { - inline uint8_t byteswap(_In_ const uint8_t value) + inline constexpr uint8_t byteswap(_In_ const uint8_t value) { return value; } @@ -95,8 +95,8 @@ namespace stdex #endif } - inline int8_t byteswap(_In_ const char value) { return byteswap(static_cast(value)); } - inline int8_t byteswap(_In_ const int8_t value) { return byteswap(static_cast(value)); } + inline constexpr int8_t byteswap(_In_ const char value) { return byteswap(static_cast(value)); } + inline constexpr int8_t byteswap(_In_ const int8_t value) { return byteswap(static_cast(value)); } inline int16_t byteswap(_In_ const int16_t value) { return byteswap(static_cast(value)); } inline int32_t byteswap(_In_ const int32_t value) { return byteswap(static_cast(value)); } inline int64_t byteswap(_In_ const int64_t value) { return byteswap(static_cast(value)); }