I've been using types from cstdint (such as uint32_t) in my code regularly, but now they don't quite fit my needs, particularly with regards to templates.
Is there a way to specify an integer type that is twice the size of a template argument? When my template is passed a uint32_t, I need it to create a uint64_t for one variable within the function. Perhaps more difficultly, when passed a uint64_t, I need it to create a 'uint128_t'. I could do this with an array of two of the template arguments, but then I can't pass that array to other template functions. This is a performance critical section of code (I'm doing cryptography).
Related to that, is there some other header I can include (in order of preference: standard, boost, other) that gives me 128-bit integers? Looks like this question answers this particular part: Fastest 128 bit integer library
Is there a way to specify that I want to use the largest integer available that is not greater than a specific size? This maximum size would also be a function of sizeof (T).