mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
C++03 compatibiity to to_underlying
This commit is contained in:
parent
5094a0a9e1
commit
b6300d97ff
@ -138,9 +138,9 @@ namespace etl
|
||||
// Gets the underlying type of an enum.
|
||||
//***********************************
|
||||
template <typename T>
|
||||
ETL_CONSTEXPR underlying_type_t<T> to_underlying(T value) ETL_NOEXCEPT
|
||||
ETL_CONSTEXPR typename underlying_type<T>::type to_underlying(T value) ETL_NOEXCEPT
|
||||
{
|
||||
return static_cast<underlying_type_t<T>>(value);
|
||||
return static_cast<typename underlying_type<T>::type>(value);
|
||||
}
|
||||
|
||||
// We can't have std::swap and etl::swap templates coexisting in the unit tests
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user