Write one definition that works for many types, then constrain it with C++20 concepts so misuse fails early with a readable message.