4 ms·
Great stuff for people working with C++ Templates! I've seen it explained by Bjarne and Andrew Sutton, the benefits are clear for people used to work with the S
by vmarsy 10y ago
Great stuff for people working with C++ Templates!
I've seen it explained by Bjarne and Andrew Sutton, the benefits are clear for people used to work with the STL. Unfortunately, Concepts won't be there yet, they are not coming in C++17 [1]
I can't wait the day when, we can avoid crazy long errors like this [2], which ends with a cryptic error "not match for operator + in iterator<foo<bar<.......> > >::ref " we will get clear, english errors that can be defined by the library writers : "The items in this collection needs to be summable" or "This collection must be sortable" , etc. etc.
[1] http://honermann.net/blog/2016/03/06/why-concepts-didnt-make-cxx17/ http://honermann.net/blog/2016/03/06/why-concepts-didnt-make...
[2] https://www.codeproject.com/KB/cpp/791461/errors_temp.PNG https://www.codeproject.com/KB/cpp/791461/errors_temp.PNG
- pjmlp 10y agoEven though they aren't here, auto parameters, constexpr if, static_assert, and enable_if can already simplify some of those errors.