4 ms·
That's because templates have no type-checking in C++. Ideally, you wouldn't be able to do this with concepts, but I don't know whether that's true for the con
by beojan 9y ago
That's because templates have no type-checking in C++.
Ideally, you wouldn't be able to do this with concepts, but I don't know whether that's true for the concepts that finally made it into the standard (i.e. I don't know if it would be an error to call a function or operator on an argument if that function isn't required in the concept specification.).
- deleted 9y ago[deleted]
- seanmcdirmid 9y agoC++ templates have type checking after expansion, the type checking just isn’t modular.