aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil MacIntosh <neilmac@microsoft.com>2016-09-13 12:17:17 -0700
committerGitHub <noreply@github.com>2016-09-13 12:17:17 -0700
commite40729a561b208429d9298ee60f5a4945c096c99 (patch)
tree59b531df353c31f006fd27f9185bcd2c875e3c68
parent2d74fd5c8445bb906de1f5fffad77307c300d9c7 (diff)
parentad5275ca7847b8f32c719dd0bc3e9b55ed5973c2 (diff)
downloadplatform_external_Microsoft-GSL-e40729a561b208429d9298ee60f5a4945c096c99.tar.gz
platform_external_Microsoft-GSL-e40729a561b208429d9298ee60f5a4945c096c99.tar.bz2
platform_external_Microsoft-GSL-e40729a561b208429d9298ee60f5a4945c096c99.zip
Added inline to byte member functions to fix MSVC 2013 warnings
-rw-r--r--gsl/gsl_byte16
1 files changed, 8 insertions, 8 deletions
diff --git a/gsl/gsl_byte b/gsl/gsl_byte
index 09592eb..bee1092 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