Hi I'm trying to have enum outside of class but inside namespace AND have them have different definition depending on some condition. How can I achieve this? (C++)
For example something like this
namespace fruit {
if (season) {
enum eAvailfruit
{
apple,
banana,
cNumFruit
};
} else {
enum eAvailfruit
{
watermelon,
grape,
peach,
cNumFruit
};
}
}
Is there a way ??
seasonis a compile-time constant, but not otherwise.season?bananathen what will happen whenseasonis false?