From -230313685507548510
X-Google-Thread: f78e5,4176870a6d7b2d6
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: bloodymir.crap@gmx.net (Frank Birbacher)
Newsgroups: comp.std.c++
Subject: Re: Union fun
Date: Tue, 26 Oct 2004 22:00:51 GMT
Lines: 21
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <2u7uonF272r7kU3@uni-berlin.de>
References: <pan.2004.10.17.15.08.58.192861@nospam.com.au> <slrncn71pm.fqi.ben-public-nospam@decadentplace.org.uk> <pan.2004.10.19.01.55.50.896756@nospam.com.au> <1a0929fa.0410191124.162d57ee@posting.google.com> <pan.2004.10.20.14.16.29.574007@nospam.com.au> <194c1211.0410220336.5bdc63f9@posting.google.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1098828065 739 158.152.254.254 (26 Oct 2004 22:01:05 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Tue, 26 Oct 2004 22:01:05 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Orig-X-Trace: news.uni-berlin.de fwTSRmf79RcQy3oO3zsshAHdbIMAL7wag1ZsJcC2kl/79wVX06+3dqUkW2
X-Accept-Language: en-us, en
X-Virus-Scanned: by amavisd-new at cs.mu.OZ.AU
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i9QM0p0Q023729;
	Wed, 27 Oct 2004 08:00:51 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:3191

Hi!

Helium wrote:
> What about something like:
> 
> You use a strcut containing a char-array. It's size is that of the
> largest object you want to store (-> sizeof()).
> Than you create objects using placement new in this array (and you
> destroy them manually calleng thir destructor).

After some days of debugging you resort to boost::any, which 
already does that.

Frank

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



