On Wednesday, 18 August 2021 at 05:33:13 UTC, james.p.leblanc wrote:
If I wanted to ensure that a function accepts only arguments of
byte, int, uint, long, etc. (i.e. integer-like types). Is the accepted way to do this like so?:

**auto foo( T : long )(T a, T b){ ... }**

I very much prefer the ususal constraint syntax

**auto foo(T)(T a, T b) if(isIntegral!T) { ... }**

Reply via email to