3 ms·
I mean, that's just the tip of the iceberg. Templates have evolved a great deal over time, and continue to do so (C++20 added Concepts).
by cbsmith 4y ago
I mean, that's just the tip of the iceberg. Templates have evolved a great deal over time, and continue to do so (C++20 added Concepts).
- kllrnohj 4y agoConstraints and concepts don't increase the scope or feature set of templates, which was GP's broader point. That is, all the additions are around things that are a smaller, but easier to use, subset of the broader feature. `if constexpr` for example just being a way more approachable std::enable_if, not an expansion of the feature set. And concepts then are about clarifying the contract of the template, they don't actually add new capabilities. It'd be I think reflection, however that ends up looking, that's the next actual feature set expansion of templates.
- cbsmith 4y agoThey added a whole new keyword just to support it. Just because C++ templates are Turing complete doesn't mean new features don't count as new features.