Closed vic1707 closed 2 weeks ago
Hi, thanks for your initiative and effort, but I don't think I will be willing to merge & maintain this. It's not the direction I want this library to move to.
I'd rather to to make const fn new
possible (where it's possible), and let users to define the constant they want. They should not need to use nutype
macro for that.
I was thinking of this as a temporary solution since I don't have the skills to enable nutype to generate const fn, but I get your point π
This PR makes it possible to do, inspiration taken from https://github.com/greyblake/nutype/issues/35
Tests are generated in order to ensure that those consts are valid.
TODO: [ ] make
consts
only available to ints and floats. Strings simply can't. But how about any other datatypes ? [ ] changelog & docs [ ] any ideas ? @greyblake