isImplictlyConvertible for Variadic Templates

rpeio via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 27 07:03:20 PDT 2017


On Tuesday, 27 June 2017 at 01:20:01 UTC, ag0aep6g wrote:
> ----
>     import std.meta: allSatisfy, ApplyRight;
>     import std.traits: isImplicitlyConvertible;
>
>     this(Vs...)(Vs values)
>         if (allSatisfy!(ApplyRight!(isImplicitlyConvertible, 
> T), Vs))
>     {
>         // do stuff
>     }
> ----

That is exactly what I was looking for. I was unaware of the 
existence of ApplyRight and ApplyLeft. Thank you for your help.


More information about the Digitalmars-d-learn mailing list