Quick A: Write the type!
Recently on SO:
How to use auto keyword to assign a variable of type uint32_t or uint64_t in C++
I'm assuming you're working with the AAA style suggested by Herb Sutter.
In that case, a nice solution is to simply write:
auto variable_name = uint64_t{ 5000000000 };This is clear, consistent, and explicitly typed with no nasty C-preprocessor necessary.
Add a Comment
Comments are closed.