std.experimental.checkedint is ready for comments!

tsbockman via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 14 20:23:01 PDT 2016


On Wednesday, 15 June 2016 at 00:16:12 UTC, Walter Bright wrote:
> A complete list of what types are acceptable for 'N' would be 
> desirous, too.

This is specified fully in the template constraints:
     if (isIntegral!N && isUnqual!N)
     if ((isIntegral!N && !isUnqual!N) || isCheckedint!N)

The second overload simply forwards to the first, after applying 
BasicScalar!(Unqual!N).

However, I recall that new users tend to get confused/intimidated 
by template constraints, so I suppose I should add a prose 
explanation to the docs, as well.


More information about the Digitalmars-d mailing list