3 ms·
> but you lose out on much of the functionality of templates, right? I don't think so? From my understanding what you can do with concepts isn't much different
by aw1621107 10mo ago
> but you lose out on much of the functionality of templates, right?
I don't think so? From my understanding what you can do with concepts isn't much different from what you can do with SFINAE. It (primarily?) just allows for friendlier diagnostics further up in the call chain.
- wakawaka28 10mo agoYou're right but concepts do more than SFINAE, and with much less code. Concept matching is also interesting. There is a notion of the most specific concept that matches a given instantiation. The most specific concept wins, of course.
- aw1621107 10mo agoOh, interesting! I didn't know about that particular feature of concepts. I'll have to keep an eye out for potential places it can be used.