For a problem, see your writing template class in c + + program design language of enum can outside the class definition, is about this structure:
Template Class C { Public: Enum E: int. };
Template Enum C : : E {a, b, c};
Under VS2017 run however, C3113, says do not allow the enum is template, In addition, in the initializer ({a, b, c}), reported E2762, enumerator declared (please refer to the constant "C : : a ", ABC was featured a,
Template attached to this chapter 3 section experiment and expect different, crazy, solve, thank you,
CodePudding user response:
C3113 do not understand, E2762 behind the will not because a E specifies: int, another behind is not specified, although is E, but are treated as two different types? The second place behind E also add: int a try?