Making recursively-defined traits iterative using `static foreach`

Nordlöw per.nordlow at gmail.com
Sat Mar 10 09:50:37 UTC 2018


On Saturday, 10 March 2018 at 09:47:55 UTC, Nordlöw wrote:
>             static if (V[0] != Vi)
>             {
>                 enum allSameIterative = false;
>             }

Perhaps even better to do

             static if (!is(typeof(allSameIterative) == bool) && 
// not yet defined
                        V[0] != Vi)
             {
                 enum allSameIterative = false;
             }



More information about the Digitalmars-d mailing list