r/cpp • • Mar 27 '26

C++26: A User-Friendly assert() macro

https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
53 Upvotes

27 comments sorted by

View all comments

Show parent comment

5

u/EC36339 Mar 27 '26

Well, that's fine.

In that case, SFINAE was just not a good example, because SFINAE, even with standard wrappers like std::enable_if_t is just horrible and unreadable, to the point that you think 3 times whether you use it or just not have type constraints when they are not strictly needed for overload resolution.

3

u/38thTimesACharm Mar 28 '26

SFINAE is the only C++ "feature" where if it's the only way to accomplish something, I strongly consider just not doing that thing.

2

u/EC36339 Mar 28 '26

No. It used to have its justification, but now type constraints can be achieved in better ways.