
Gordon Woodhull <gordon <at> woodhull.com> writes:
This is bad idea in general compile you unit test with different options than your regular build and bad idea generate different code in this case as well. Also what these statements do in regular build? Server as static asserts?
In general, I agree that is is bad idea to compile code under test with different compiler flags than in production, but in this case, with the
On Thu, Sep 15, 2011 at 3:46 PM, Gennadiy Rozental <rogeeff@gmail.com>wrote: production flags, the code would fail to compile anyway, so nothing would be produced that can be run in a unit test framework. The key ingredient of my idea, is to allow the code to compile by conditionally replacing the failing static asserts with throwing a run-time exception. Now the code can compile, and unit tests can be written to confirm that each assertion either passes or fails as desired. And yes, in a production build, they are static asserts that will fail to compile if the library user instantiates something incorrectly. Regards, Ben Robinson, Ph.D.
Gennadiy
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost