Boost logo

Boost :

Subject: [boost] Please use BOOST_ASSERT_MSG(x, "message") instead of BOOST_ASSERT(x && "message")
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-02-24 08:46:09

Several libraries, including Boost.Array, use things like
BOOST_ASSERT( i < N && "out of range" );

This causes warnings with EDG-based compilers.

It would be nice if library authors could replace this with something like
BOOST_ASSERT_MSG( i < N, "out of range" );

Not only will it make those warnings disappear, it will also enable
users to use those messages more efficiently in custom assert handlers.

Thank you.

Boost list run by bdawes at, gregod at, cpdaniel at, john at