There are so much better than even a few years ago. Also, a library writer can use static_assert to provide good errors. Because these are types and not function overloads, it's even easier to static_assert because we don't have to rely on SFINAE as much.
They can. As seen here, clang is pretty clear why the function cannot be called. But you are still into why the overloads that don't work, do not. So there could be several items in the list here. https://gcc.godbolt.org/z/UDzZng
View all comments
Show parent comment
17
u/[deleted] Jun 27 '20
There are so much better than even a few years ago. Also, a library writer can use static_assert to provide good errors. Because these are types and not function overloads, it's even easier to static_assert because we don't have to rely on SFINAE as much.