http://d.puremagic.com/issues/show_bug.cgi?id=6573
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from [email protected] 2011-08-30 01:51:23 PDT --- Something like this? (A different recursion base): template SameTypes(X, T...) { static if (T.length) enum bool SameTypes = is(X == T[0]) && SameTypes!(X, T[1 .. $]); else enum bool SameTypes = true; } void main() { static assert (!SameTypes!(int, int, int, double)); static assert (!SameTypes!(double, int, int, int)); static assert (SameTypes!(double)); static assert (SameTypes!(int)); static assert (SameTypes!(int, typeof(1))); static assert (SameTypes!(int, typeof(1), typeof(2))); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
