Daily bit(e) of C++ | type tagging
Daily bit(e) of C++ ♻️120, Distinguishing function overloads that fully overlap using type tagging.
If you need to distinguish two (or more) function overloads, but the argument types fully overlap, you can use the type tagging technique.
Passing in a unique tag as the first argument of a function call guarantees that the overload set will only contain one viable function.
This technique is particularly useful for constructors since constructors cannot be renamed.