r/cpp • u/pavel_v • Mar 27 '26
C++26: A User-Friendly assert() macro
https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
53
Upvotes
r/cpp • u/pavel_v • Mar 27 '26
View all comments
14
u/Kronikarz Mar 27 '26
I want an assert/assumption facility for C++ with these features:
assertEqual(a, b, ...); each such variant should make sure to evaluate and stringify the arguments, and give a helpful message, such as: "Assert Failed: a (10) == b (20)"