Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-02-10 18:39:02


"Ion Gaztañaga" wrote:

>> If you really *must* provide 2-phase construction, then please make it
>> a special mode that can be enabled with an #ifdef.
>
> I see you have strong opinions like me. So, no ifdefs, please. I would
> like to point out that as it's using the same model as Shmem, fstream
> from the standard library is also broken.
>

Filesystem is quite expected to fail.

The classes were designed before exceptions were
fully accepted (I think) and would not be sucessful
if they didn't work on systems w/o exceptions.

-----------
Anyway:

shmem can use factory method returning
a objact acting like smart pointer. This would
hide the construction/initialisation phases
and work in exception-less environment.

For systems forced to live without heap this factory
method can take as parameter buffer
char[sizeof(shmem)] where the shmem
object gets instantiated.

Ability to provide "heap" for such systems
should be listed on "What I can do with shmem"
docs page.

/Pavel


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