
From: Patrick Horgan
You could equally well ask what is the real utility of having C++-style casts over the C-style one. ;-) It's a bad analogy. The BOOST_FAIL_MSG and it's ilk just overlays another level of indirection. It adds more complexity. C++ style casts reduce complexity.
I can't agree. The macros reduce complexity by simplifying the boolean expressions and by being more descriptive, thus better expressing the author's intention. And one could argue that C++ casts may add complexity as well, e.g. when you have const_cast<derived*>(dynamic_cast<const derived*>(const_base_ptr)) instead of (derived *) const_base_ptr Yet they are good, because, just like the macros, they tell more precisely what is done and will make it way harder to write something different than you intended. Regards, Robert