4 ms·
std::enable_if exists to disable certain overloads during overload resolution. Zig has no overloading, so it has no equivalent.
by edflsafoiewq 1y ago
std::enable_if exists to disable certain overloads during overload resolution. Zig has no overloading, so it has no equivalent.
- matklad 1y agoI'd flip it over and say that C++ has overloading&SFINAE to enable polymorphism which it otherwise can't express.
- edflsafoiewq 1y agoSuch as? The basic property of overloading is it's open. Any closed set of overloads can be converted to a single function which does the same dispatch logic with ifs and type traits (it may not be very readable).