mirror of
https://github.com/microsoft/GSL.git
synced 2025-02-22 01:12:53 -05:00
Fix to_integer()
This commit is contained in:
parent
ad991370da
commit
6cf154e067
@ -103,7 +103,7 @@ inline constexpr byte operator~(byte b) noexcept { return byte(~static_cast<unsi
|
|||||||
template <class IntegerType, class = std::enable_if_t<std::is_integral<IntegerType>::value>>
|
template <class IntegerType, class = std::enable_if_t<std::is_integral<IntegerType>::value>>
|
||||||
inline constexpr IntegerType to_integer(byte b) noexcept
|
inline constexpr IntegerType to_integer(byte b) noexcept
|
||||||
{
|
{
|
||||||
return {b};
|
return static_cast<IntegerType>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<bool E, typename T>
|
template<bool E, typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user