Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-07-23 09:22:21


"Sam Partington" <Sam.Partington_at_[hidden]> wrote in message
news:NDBBIABHPAACPOAKLJBHMENBDGAA.Sam.Partington_at_codescape.com...
> ok, I admit it. I don't understand what testptr2.cpp is supposed to be
> doing. apart from leaking, and if I'm honest I don't want to know what its
> supposed to do:
>
> node * s = new (new (new (buffer<node>()) int(8) + pos(& node::j))
> double(2.6) - pos(& node::j)) node("My name is Bob.");

Like I said: this example will never be needed. It is just a theoretical
example.

[...]

> Aside from the confusing use, prebuild to me, seems like a great way of
> asking a classes user to create uninitalised data. Sidestepping one of
the
> goals of C++. It is already possible to create uninitialised data, but
the
> onus should be on you the class writer not the class user to make sure
that
> the data is initialised at the right time.

It is a useful application of runtime construction with operator new
(size_t, void *). Completely useless operator otherwise.

[...]

> Finally, for me at least, squad_ptr is just to obfuscated.

(Just like iostreams in my beginnings).

[...]

> I just don't see any real benefit of adding squad_ptr to boost.

Well logically:
- if libboost-dev is used with time / memory consuming parallel algorithms,
multithreaded processes with nearly atomic operations (or with inexpensive
thread freezes) using a hypercube of processors for advanced researchs:
    - yes it would be useful;
- if no one cares:
    - I'll stop annoying you.

Philippe A. Bouchard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk