logoalt Hacker News

aw1621107last Monday at 7:32 PM1 replyview on HN

> 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.


Replies

wakawaka28last Monday at 9:55 PM

You'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.

show 1 reply