▲ | AndriyKunitsyn 2 days ago | |
This test is better with a function call, because it clearly shows the intent. Perf-wise, this function call will be inlined by any decent compiler. https://godbolt.org/z/chhM85vP3 Breaking a basic programming expectation for a specific class of values of a specific type is not a good thing, in my opinion. |