|
Boost : |
From: Corrado Zoccolo (czoccolo_at_[hidden])
Date: 2007-11-06 17:00:27
On 10/23/07, Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
>
> Josh Napoli wrote:
> >> This can be done by adding a clone() virtual function to
> > boost::exception.
> >
> > Since the clone function is just a stopgap until 0x
>
> C++0x has virtual constructors?
Cloning can be supported non-intrusively, without virtual constructors or
virtual clone() functions.
You can have a look at the Optional Polymorphic Value object with Small
Object optimization Library in the vault: *http://tinyurl.com/2og6st*
The thread discussing it is:
http://archives.free.net.ph/thread/20071102.211935.ab0db275.en.html
The only requirement you need is that all your concrete classes derive from
a know base class, and you get cloning and the small object optimization for
free.
Corrado
_______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
-- __________________________________________________________________________ dott. Corrado Zoccolo mailto:zoccolo_at_[hidden] PhD - Department of Computer Science - University of Pisa, Italy -------------------------------------------------------------------------- The self-confidence of a warrior is not the self-confidence of the average man. The average man seeks certainty in the eyes of the onlooker and calls that self-confidence. The warrior seeks impeccability in his own eyes and calls that humbleness. Tales of Power - C. Castaneda
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk