This allows taking the input by-value instead of by-reference, while still protecting against unwanted type conversion. Add some basic static_assert tests that the swapped values are correct.