On Friday, 6 October 2017 at 21:42:40 UTC, Steven Schveighoffer
wrote:
What you need is IFTI or "Implicit Function Template
Instantiation"
Note the "Function" part of it, in that it's only valid for
functions.
So you need a factory function:
auto m(T)(T x)
{
return M!(T)(x);
}
...
On 10/6/17 5:08 PM, Alex wrote:
Hey, template gurus :)
given this:
struct M(alias I : S!E, alias S, E...)
{
R!E r;
this(S)(S initStruct) // line 4
{
r = R!E(initStruct);
}
}
struct R(E...)
{
this(S)(S initStruct) // line 12
{
// do some
Hey, template gurus :)
given this:
struct M(alias I : S!E, alias S, E...)
{
R!E r;
this(S)(S initStruct)// line 4
{
r = R!E(initStruct);
}
}
struct R(E...)
{
this(S)(S initStruct)// line 12
{
// do some cool