Re: [boost] Improved boost::any

hello and good day, Yes, this is actually not unlike the my own implementation of "any". But rather than limit myself to objects that fit in sizeof(void *) bytes, I keep an aggregate member whose size is governed by a template parameter with a default value of sizeof(void *). This way I can arbitrarily specify the mininum size at which objects are heap-allocated. I think this is probably the way to go for discriminant unions.. the typelist solution is just to messy for my tastes, and boost::any is too consumptive. Anyone interested? sincerely, Phillip On Tue, 09 Aug 2005 01:49:45 +0200, <boost-request@lists.boost.org> wrote:
Message: 19 Date: Mon, 08 Aug 2005 18:48:39 -0400 From: christopher diggins <cdiggins@videotron.ca> Subject: [boost] Improved boost::any To: Boost mailing list <boost@lists.boost.org> Message-ID: <016001c59c6b$51e3e250$2b792518@heronnest> Content-Type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original I have developed a type very similar to boost::any which requires less memory and significantly reduces the number of allocations / deallocations. If anyone is interested I have posted a brief article about it at CodeProject http://www.codeproject.com/useritems/dynamic_typing.asp and I have uploaded the source to the vault ( http://boost-sandbox.sourceforge.net/vault/index.php ). Is there any interest? Christopher Diggins http://www.cdiggins.com -----------------------------
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
participants (1)
-
felipe