On Thursday, 28 July 2022 at 12:02:54 UTC, pascal111 wrote:
I'm making an equivalent of "sgn" function of BASIC language, and I used "(T)" in its definition, but the function can receive wrong data by passing string data to it, how we can solve it?
There's no need to do the complication of a template, just do a normal function taking a `double`. You can add overloads if you want like one taking a `long` and/or `int` but those would cover all types that have signs.