Printing shortest decimal form of floating point number with Mir
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Jan 4 18:53:03 UTC 2021
On Monday, 4 January 2021 at 17:58:35 UTC, Ola Fosheim Grøstad
wrote:
> On Monday, 4 January 2021 at 17:24:42 UTC, John Colvin wrote:
>>> in your opinion, this should compile and msg `int int`, yes?
>
>
> It does match:
>
> template Q(A : Foo!int) {
> pragma(msg, A.stringof);
> }
>
>
> So in then it should also match Foo!T, yes?
Please also note that it is completely acceptable to put limits
on the constraints you are allowed to use on matching in order to
get good performance, but it should work for the constraints you
do allow.
More information about the Digitalmars-d-announce
mailing list