boost 1.55 provides a logging API using the C ++ thread insert operator (otherwise called the left shift operator).
Although the syntax is convenient, I can't think of a way to drop debugging text literals from the executable.
Using MFC, for example, the TRACE macro ends up as an empty string in the release configuration.
Using TRACE (or any such macro function):
TRACE("This text literal shall only be found in debug configuration");
Using Boost API:
LOG_DEBUG << "This text literal shall only be found in debug configuration";
I tested (using Visual Studio 2010, full compiler optimization (/ Ox)) How to remove debug log statements from the program , but the literal ends in the executable in the release (which makes sense, as far as I could predict the result).