Subject: Re: [boost] [contract] static_assert in contracts or not?
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-09-16 21:30:16
on Thu Aug 30 2012, Lorenzo Caminiti <lorcaminiti-AT-gmail.com> wrote:
> 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
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk