Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-07 00:08:11

Dave Gomboc wrote:

>> Checks are only strictly necessary either at entry or at exit
>> points of functions, not both. See under 'Rationale'.
> AFAIk for the general case it needs to be checked both at entry and at
> exit. See the text under "Class invariants and reference semantics",
> particularly regarding what is referred to as the "Indirect Invariant
> Effect", within OOSC2 (Meyer), Section 11.14, pp. 403-406.

Done. Just add in file "invariants.hpp" the two lines marked "++" below,
in invariants' nested struct 'trigobj's ctor,:

         trigobj( invariants const * pinv )
         : pinv_( pinv )
             ENSURE( pinv_ );
++ if( pinv_ )
++ pinv_->verf_invars();

The change worked first time, BTW --no difference with the tests.
Got a link to that text, so I can reference it?


Boost list run by bdawes at, gregod at, cpdaniel at, john at