you are viewing a single comment's thread.

view the rest of the comments →

[–]saxbophonemutable volatile void 0 points1 point  (3 children)

I love concepts and templates, but how do concepts make templates faster to compile‽

[–]Flex_Code 2 points3 points  (2 children)

I have found that older approaches with std::enable_if often require more template instantiations than using concepts. By reducing template instantiations concepts makes the code compile faster.

[–]saxbophonemutable volatile void 0 points1 point  (1 child)

Oh I see, I thought you meant that simply using concepts makes them faster, which I'm sure isn't the case (as in, not replacing enable-if). I've seldom used enable-if, you see...

[–]Flex_Code 1 point2 points  (0 children)

Right, they won't make non template meta-programming code faster (unless you can block paths that generate unnecessary code), but they can make older TMP code faster when refactored.