On Wednesday, 30 December 2020 at 20:42:49 UTC, jmh530 wrote:
You mean like thisstruct Foo(T) { T x; } void foo(T : Foo!V, V)(T x) {
Not quite, "Foo" would be a template parameter, so something like this (which does not work, but maybe there is some other way to express it?):
struct Foo(T) { T x; } void foo(T)(T!int x) { import std.stdio: writeln; writeln("here"); } void main() { Foo!int x; foo(x); }