In pseudocode I would like to do this:
func(int a, int b) {
assert(a == b, std::format("values differ: {}!={}", a, b));
}
or
func(int a, int b) {
assert(a == b, [&a,&b]() { return std::format("values differ:{}!={}", a, b);});
}
because I want to printout a failure message that is more verbose.
Is there some standard way to achieve this?
4