Re: [boost] minor scoped_ptr/scoped_array feature request

2002-11-17 Thread David Abrahams
Thorsten Ottosen <[EMAIL PROTECTED]> writes: > - Original Message - > From: "Peter Dimov" <[EMAIL PROTECTED]> > [nip] >> In general, it is recommended practice to always assert() preconditions in >> client code, instead of relying on in-library asserts. First, the library > is >> not requi

Re: [boost] minor scoped_ptr/scoped_array feature request

2002-11-17 Thread Thorsten Ottosen
- Original Message - From: "Peter Dimov" <[EMAIL PROTECTED]> > From: "Thorsten Ottosen" <[EMAIL PROTECTED]> > > From: "Peter Dimov" <[EMAIL PROTECTED]> > > [nip] > > > In general, it is recommended practice to always assert() preconditions > in > > > client code, instead of relying on in-l

Re: [boost] minor scoped_ptr/scoped_array feature request

2002-11-17 Thread Peter Dimov
From: "Thorsten Ottosen" <[EMAIL PROTECTED]> > From: "Peter Dimov" <[EMAIL PROTECTED]> > [nip] > > In general, it is recommended practice to always assert() preconditions in > > client code, instead of relying on in-library asserts. First, the library > is > > not required to have asserts, and seco

Re: [boost] minor scoped_ptr/scoped_array feature request

2002-11-17 Thread Thorsten Ottosen
- Original Message - From: "Peter Dimov" <[EMAIL PROTECTED]> [nip] > In general, it is recommended practice to always assert() preconditions in > client code, instead of relying on in-library asserts. First, the library is > not required to have asserts, and second, the earlier you catch pr

Re: [boost] minor scoped_ptr/scoped_array feature request

2002-11-17 Thread Peter Dimov
From: "Dan Gohman" <[EMAIL PROTECTED]> [...] > Documentation: > > set > > void set(T * p); // never throws > > Stores a copy of p, which must have been allocated via a C++ new > expression or be 0. Behavior is undefined if the stored pointer > is not 0. Rejected, sorry. :-) Introducing undefined b

[boost] minor scoped_ptr/scoped_array feature request

2002-11-16 Thread Dan Gohman
I've been using scoped_ptr and scoped_array in several large projects, and I'm very happy with them. One feature that they lack that would be useful for me is a set member function. It would be similar to reset, except that it would require the stored pointer to be 0. This would allow user code to