On Tue, Jan 8, 2013 at 9:14 PM, Era Scarecrow <[email protected]> wrote:
> On Tuesday, 8 January 2013 at 20:07:29 UTC, monarch_dodra wrote: > >> You appear to want "choice" to represent a value, rather than a type. >> >> Declare it as "int choice" or "alias choice" >> >> Not that with "int choice", you'll get a compiler error because it isn't >> a compile constant. I'm not really sure about how "alias" works, but that's >> the source of your problem. >> > > Ahh. I changed it and instantly it compiles. I never quite did understand > alias for templates, but now I think I have a better grasp. > alias for templates gives you a 'symbol' parameter: you can pass any identifier to it: variable, user-defined types, module names... Not built-in types (int,...) which are keywords and *not* valid identifiers. A single identifier in a template parameter list (usually marked with UpperCase) denotes a type.
