|
|
|
|
|
by pron
416 days ago
|
|
Maybe you can insist that these are two features (although I disagree), but calling one of them templates really misses the mark. That's because, at least in C++, templates have their own template-level language (of "metafunctions"), whereas that's not the case in Zig. E.g. that C++'s `std::enable_if` is just the regular `if` in Zig makes all the difference (and also shows why there may not really be two features here, only one). |
|
enable_if is mostly deprecated, and was used for overloading not branching, you can use concepts now instead