Template constraint on alias template parameter.
john.michael.hall at gmail.com
Thu Aug 6 17:32:17 UTC 2020
On Thursday, 6 August 2020 at 16:01:35 UTC, jmh530 wrote:
It seems as if the T is properly Foo(T) and can only be
instantiated with actual types. Something like below works and
might work for me.
template test(alias T)
if (__traits(isTemplate, T))
void test(U)(U x)
if (is(T!U : Foo!U))
import std.stdio: writeln;
More information about the Digitalmars-d-learn