On 2013-07-14, 07:00, JS wrote:
I need to conditionally inherit:interface A(T) : conditionallyInherit!(isBasicType!T, B); A!(double) will inherit B but A!(mytype) won't.
template conditionallyInherit(bool choice, T...) { static if (choice) { alias conditionallyInherit = T; } else { import std.typetuple : TypeTuple; alias conditionallyInherit = TypeTuple!(); } } Should work. -- Simen