
17 Sep
2012
17 Sep
'12
1:30 a.m.
on Thu Aug 30 2012, Lorenzo Caminiti
In this case, would it ever make sense to use static_assert in postcondition and/or class invariants even if that were allowed?
The only good excuse I can think of for doing so is that you happen to have calculated some type or constant needed for the assertion in the scope of the postcondition and/or class invariant, and you want to keep it there. Not terribly compelling unless you can show there's a large class of examples like this, IMO. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost