Dave Jenkins wrote:
"Eric Niebler"
wrote in message news:49808FDC.5040006@boost-consulting.com... That is not a half-bad suggestion. It's funny that we have NDEBUG to avoid costly runtime checks but no equivalent for costly compile-time checks.
I've never particularly cared for the "N" in "NDEBUG" ... it seems the wrong default. Perhaps we can have a boost-wide macro for expensive compile-time checks. How about BOOST_COMPILE_TIME_DEBUG?
I think a BOOST_COMPILE_TIME_DEBUG flag is a good idea.
I was surprised that transforming an invalid expression produced exactly the same output as transforming a valid expression. It was undetectable that you were depending on compile time UB.
To be sure that you aren't getting compile time UB, you have to test each expression against each transform grammar for a match. I doubt people will think to do that without help.
I have the same idea a while back. I'll suggest not making it a flag but an integer that gives the level of debugging. That way, you have 0 == no CT debug, 1..3 CT debug levels. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net