Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-07-17 02:55:13

David Abrahams wrote:
> [...]
> Further, I'm not sure it usually makes sense to use "pure" when
> describing constraints on user-supplied operations. It stands to
> reason that in general, the library has no knowledge of external state
> that might be modified by a user-supplied operation and can't roll
> back the results. It's often a reasonable shorthand to say "gives the
> strong guarantee" when you mean "gives the strong guarantee as long
> as the user-supplied operation is pure".

But what is the user-supplied operation, and how does the user know
she has supplied it? In this case, it's the default c'tor for the
Sequence, but the function is not documented as taking that as a
user-spplied operation. Thus, it seems worthwhile to tell the user
which operations must be pure in order to get the strong guarantee.
Will that constrain implementations? Maybe. But safety isn't free.
The only alternative I see is to not even attempt to offer the strong


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