There are known ways to manipulate the type of an integer literal
0L; // long 3U; // unsigned integer 1LL; // long long
What I need is a
There is no dedicated suffix for std::size_t. In C++11, you could create a user-defined literal for it, though:
std::size_t
std::size_t operator "" _sz (unsigned long long int x) { return x; } // Usage: auto s = 1024_sz; static_assert(std::is_same::value, "He's wrong");
Live example