On 18/02/2011 21:22, Steven Schveighoffer wrote:
<snip>
template VerifyTuple(Types...)
{
static if(Types.length == 0)
enum bool VerifyTuple = true;
else
enum bool VerifyTuple == is(Type : Object) && VerifyTuple!(Types[1..$]);
<snip>

You have two typos there.  Corrected version:

    enum bool VerifyTuple = is(Types[0] : Object) && VerifyTuple!(Types[1..$]);

But perhaps even nicer:

----------
template VerifyTuple() {
    enum bool VerifyTuple = true;
}

template VerifyTuple(T, Ypes...) {
    enum bool VerifyTuple = is(T : Object) && VerifyTuple!(Ypes);
}
----------

(Some of you will be able to guess what other language I've programmed in in my time from this.)

Stewart.

Reply via email to