I challenge someone to make a class in C++ that can hold any specified-sized variable like:
var<bool float, int size>
Therefore an int would be:
var<false,32>
A short would be:
var<false,16>
A float would be:
var<true,16>
Although this isn't useful for standard sizes (16,32,64-bit) but when dealing with odd sizes like 96-bit and even 2048-bit+ numbers.
challenge for infinitely sized integer in C++
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)