On 09/21/2011 09:44 PM, Andrej Mitrovic wrote:
What is the purpose of this ternary operator on slide 16?
static if (is(typeof(1 ? T[0].init : T[1].init) U))

This does the bulk of the work to get the combined type of T[0] and T[1]. It basically just asks the compiler what the combined type should be. It works because the result type of the ternary operator is the combined type of it's second and third arguments.

Reply via email to