Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-04-14 08:10:34

Hi Robert,

This is some comments based on reading the tutorial. I think your
explanations are
fine, but I would like to see some remarks added:


class gps_position
    int degrees;
    int minutes;
    float seconds;
    gps_position(int d, int m, float s) :
        degrees(d), minutes(m), seconds(s)

I think it should be stated that this is not recommended practice, ie, this
class has a non-trivial invariant
and should not have public members. A better example might be to use

The examples use pointers in arrays and pointers in standard containers. I
think the text should
state that this is not recommended; or even better, throw in a shared_ptr
instead. The code in the
example is inherently exception unsafe.

Therefore I also think that container< shared_ptr<T> > should be supported
by default whereas container< T* >
is, well, ok if you don't have exceptions somehow.



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