diff options
author | Steve Brain <sbrain@imagus.com.au> | 2016-09-13 16:07:34 +1000 |
---|---|---|
committer | Steve Brain <sbrain@imagus.com.au> | 2016-09-13 16:07:34 +1000 |
commit | ad5275ca7847b8f32c719dd0bc3e9b55ed5973c2 (patch) | |
tree | c9454ae3f847ae410e08e7772ea0228143e49f1d | |
parent | d23f4d931c98c074ebe90bebf609c397589bf7b9 (diff) | |
download | platform_external_Microsoft-GSL-ad5275ca7847b8f32c719dd0bc3e9b55ed5973c2.tar.gz platform_external_Microsoft-GSL-ad5275ca7847b8f32c719dd0bc3e9b55ed5973c2.tar.bz2 platform_external_Microsoft-GSL-ad5275ca7847b8f32c719dd0bc3e9b55ed5973c2.zip |
Added inline to fix compilation warnings on msvc 2013
-rw-r--r-- | gsl/gsl_byte | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gsl/gsl_byte b/gsl/gsl_byte index 5134032..8f57f67 100644 --- a/gsl/gsl_byte +++ b/gsl/gsl_byte @@ -26,7 +26,7 @@ // constexpr is not understood #pragma push_macro("constexpr") -#define constexpr /*constexpr*/ +#define constexpr /*constexpr*/ // noexcept is not understood #pragma push_macro("noexcept") @@ -68,37 +68,37 @@ constexpr byte operator>>(byte b, IntegerType shift) noexcept return byte(static_cast<unsigned char>(b) >> shift); } -constexpr byte& operator|=(byte& l, byte r) noexcept +inline constexpr byte& operator|=(byte& l, byte r) noexcept { return l = byte(static_cast<unsigned char>(l) | static_cast<unsigned char>(r)); } -constexpr byte operator|(byte l, byte r) noexcept +inline constexpr byte operator|(byte l, byte r) noexcept { return byte(static_cast<unsigned char>(l) | static_cast<unsigned char>(r)); } -constexpr byte& operator&=(byte& l, byte r) noexcept +inline constexpr byte& operator&=(byte& l, byte r) noexcept { return l = byte(static_cast<unsigned char>(l) & static_cast<unsigned char>(r)); } -constexpr byte operator&(byte l, byte r) noexcept +inline constexpr byte operator&(byte l, byte r) noexcept { return byte(static_cast<unsigned char>(l) & static_cast<unsigned char>(r)); } -constexpr byte& operator^=(byte& l, byte r) noexcept +inline constexpr byte& operator^=(byte& l, byte r) noexcept { return l = byte(static_cast<unsigned char>(l) ^ static_cast<unsigned char>(r)); } -constexpr byte operator^(byte l, byte r) noexcept +inline constexpr byte operator^(byte l, byte r) noexcept { return byte(static_cast<unsigned char>(l) ^ static_cast<unsigned char>(r)); } -constexpr byte operator~(byte b) noexcept { return byte(~static_cast<unsigned char>(b)); } +inline constexpr byte operator~(byte b) noexcept { return byte(~static_cast<unsigned char>(b)); } template <class IntegerType, class = std::enable_if_t<std::is_integral<IntegerType>::value>> constexpr IntegerType to_integer(byte b) noexcept |