Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-01-12 02:08:39

Dan W. wrote:

> Major clean-up. Interest? Bug reports? Thoughts? Criticism?
> All welcome.
> Cheers!
> ------------------------------------------------------------------------
> _______________________________________________
> Unsubscribe & other changes:
way too complicated.

But the thing is: why would we need something like this?
Invariants are more like an idiom, and can be easily coded by hand, if
one wants to (no need for any macros or anything).

Or, you can create a certain function to access your internal data,
which contains all preconditions, like this:

const internal_data & get_data() const { check_invariant(); return m_data; }
internal_data & get_data() { check_invariant(); return m_data; }

And all code that uses internal data will have something like this at
its beginning:

internal_data & data = get_data();

(of course, this can be refined in SOOO many ways)


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