2 ms·
C23 has _BitInt(N) that works exactly like I think you'd want it to work.
by jcranmer 3y ago
C23 has _BitInt(N) that works exactly like I think you'd want it to work.
- IAmLiterallyAB 3y agoYes, and I'm excited about that! Though I do wish the syntax sucked less. Also would be interesting to see it be the primary integer type of the language. I'm also interested in a more advanced version for setting arbitrary bounds. E.g. an integer that goes from 1-10. Adding two of those would be an integer from 2-20. The goal being that the compiler could help enforce that you don't pass a value that is OOB. Might make more sense for that to be a library. Perhaps some C++ template magic. But I digress