mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Issue #329, fixed build issues on clang
Fixed build issues that clang shows up the MS VS accepts.
This commit is contained in:
parent
55b232dde4
commit
7d083fd08c
@ -106,14 +106,15 @@ constexpr IntegerType to_integer(byte b) noexcept
|
||||
return {b};
|
||||
}
|
||||
|
||||
template<bool, typename T>
|
||||
template<bool E, typename T>
|
||||
constexpr byte to_byte_impl(T t) noexcept
|
||||
{
|
||||
static_assert(
|
||||
false,
|
||||
E,
|
||||
"gsl::to_byte(t) must be provided an unsigned char, otherwise data loss may occur. "
|
||||
"If you are calling to_byte with an integer contant use: gsl::to_byte<t>() version."
|
||||
)
|
||||
);
|
||||
return static_cast<byte>(t);
|
||||
}
|
||||
template<>
|
||||
constexpr byte to_byte_impl<true, unsigned char>(unsigned char t) noexcept
|
||||
|
Loading…
Reference in New Issue
Block a user