The std::enable_if_t type trait is used for function overloading when dealing with a template function. While regular function overloading requires you to overload a function for every type you intend to use it with, std::enable_if_t uses a compile-time predicate for overloading.
Let's say we'd like to create an interpolate function, which mixes two values weighted by a power parameter from zero to one:
As the power must be a decimal number, the function only works with floats and doubles. Using regular function overloading, we have to ...