Template constraint and specializations

Philippe Sigaud philippe.sigaud at gmail.com
Sat Mar 24 04:18:07 PDT 2012


On Fri, Mar 23, 2012 at 23:19, Andrej Mitrovic
<andrej.mitrovich at gmail.com> wrote:

> Yes but check the isA template. It seems there's something causing a
> nested variadic template to fail. This won't work in a template
> constraint (it returns false):

> But if you change "Args..." to "Args" then it works, although only for
> single-type templates.. I'm not sure what's going on..

Then the generic template should be

enum isA = ( Arg case ) || (Args... case)


More information about the Digitalmars-d-learn mailing list