Re:When to use generics
by Asooka on Wednesday April 13, 2022 @06:44AM
(#31013104)
You can always just convert your float to a bit-equivalent int and back for the type param if you really want it. I have never seen floats used for template parameters in the wild, other than party tricks like wrapping a float in a struct with an "epsilon" parameter used for the operator<. Which is all kinds of wrong.
[ Parent
| on HN ]
There are no comments on this comment yet.