On Tuesday, 3 October 2023 at 14:35:31 UTC, Joel wrote:
Oh, I found, ```d static if (isIntegral!T) ``` seems to work.
If you are using a struct, another way to affect the whole is as follows:
```d struct S(T) { invariant() { static assert(isIntegral!T); } auto addUp() { /**/ } } ``` For detailed information and examples, please continue here: https://tour.dlang.org/tour/en/gems/contract-programming SDB@79