simple template constraint - compile error.

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 7 16:13:13 PDT 2015


On Sunday, 7 June 2015 at 23:08:02 UTC, WhatMeWorry wrote:
> However, when I try to add a simple constraint to the function 
> like so:
>
> int arrayByteSize(T)(T[] someArray) if (isDynamicArray(T))

You forgot an exclamation mark here. Make that: isDynamicArray!(T)


More information about the Digitalmars-d-learn mailing list