mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Added constexpr in place of enum for C++11
This commit is contained in:
parent
a2ef3a5bc8
commit
17bc860c2e
@ -49,11 +49,15 @@ namespace etl
|
||||
etl::constant<intmax_t, I - 1>,
|
||||
etl::sqrt<VALUE, I + 1> >::type type;
|
||||
|
||||
enum value_type
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
static constexpr size_t value = type::value;
|
||||
#else
|
||||
enum
|
||||
{
|
||||
// Recursive definition.
|
||||
value = type::value
|
||||
};
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user