Boost logo

Boost Users :

Subject: Re: [Boost-users] [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
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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net