8 ms·
You're not wrong, but is at the very least weird that a specialization doesn't conform to the concept that the general template does. Something which proper par
by Quekid5 2y ago
You're not wrong, but is at the very least weird that a specialization doesn't conform to the concept that the general template does. Something which proper parametricity would have avoided -- if it were available.
(The Hysterical Raisins are understandable, esp. given that it wasn't even possible to specify Concepts in C++ until 2020...)
- HelloNurse 2y agoThe point is exactly that the "concept" of what the template should do is informal and a careful, detailed specification in a far more expressive language than vintage C++ would be needed to elicit good compilation errors from something like vector<bool>. Proper parametricity is only a starting point: types that specify alignment, equality and lifetimes would be needed to make it useful.