digitalmars.D - template FieldTypeTuple(S) in std.traits
- pc (8/8) Aug 31 2009 1. Are the types guaranteed to be in the same order as the definition?
1. Are the types guaranteed to be in the same order as the definition? struct S1 {int a; float f} can be intialized with S1(10, 10.5), implying a constructor that is based on the lexical order in the definition? Will FieldTypeTuple!(S1), always give me Tuple!(int, float)? Would the answer be the same if S1 were a class? 2. The description of "Template RepresentationTypeTuple(T...)" states: Get the primitive types of the fields of a struct or class, in topological order. Is this the lexical order in the code or how they are laid out when compiled or what? Thanks
Aug 31 2009