Say we have:
enum X { X1, X2, X3 }; int func() { std::map<int, X> abc; ... }
Suppose 0 is a key that is not in the container.
I know that abc [0] needs to initialize an X object.
Here are the questions:
(1) Will initialization always be zero initialization for enums? namely abc [0], is always initialized as an enumerator corresponding to 0?
(2) What if we have
enum X { X1 = 1, ...
What will abc [0] be?
source share