In a recent post the use of enum was described as 'archaic' why would that be? Surely its a convenient way of listing a group of constants?
Printable View
In a recent post the use of enum was described as 'archaic' why would that be? Surely its a convenient way of listing a group of constants?
Perhaps it was about template metaprogramming:
Code:template <int N>
struct Archaic
{
enum { value = N };
};
template <int N>
struct Modern
{
static const int value = N;
};