This morning a friend asked me how to add two numbers in modern C++.
First I wanted to write that you do it as in old C++, but after a little thinking I came up with this example:
Note that if the addition would overflow 32-bit integer values you would only be assigning the overflowed value to the 64-bit integer. If you want to prevent the overflow you need to convert before the addition.