Boost logo

Boost :

From: Geoff Leyland (geoff.leyland_at_[hidden])
Date: 2002-09-05 09:20:40


I wrote to the list some time ago about a container for holding "any"
(or at least for the moment, my cheap equivalent to any). At one point
I said I'd put something up for people to look at by the end of the
week. So, it's next month, and I've finally tidied it up a bit, and you
can get it to have a look at it.

It's at

I've compiled in under CW 8.2 and an apple-modified gcc 3.1 under osx
10.2. There's a CW project and makefile in rts_boost/rts/build.

What is it? It's containers for a thing like an any, to enable the use
of "run time structures". There's maps (like structures) and vectors.
So you can go

whatever_map m;

m["a[5].b.c.d"] = 3.0;
m["a"][6]["b.c.d"] = "hello";

and so on. It can also read such a container from a simple text file
(using a very cheap and nasty parser I hand-wrote):

a =
   b = [1 "hello" false 3.0]
   c.d = "a name"

and so on...

I find it very useful, and there was a little interest from others in
the list. On the other hand, it's not really finished or up to boost
standard or anything like that. I tried to be careful about exception
safety in the container code, but otherwise there's lots of things to
fix. Clearly the contained type should be "any" (dynamic_any would be
better) or even parameterised, the parser "needs work" and so on.

If there's any interest and any ideas, I'll have a go at making it


Geoff Leyland
Laboratoire d'energetique industrielle
LENI-DGM-EPFL, CH-1015, Lausanne, Switzerland
Phone: +41 (21) 693 3505, Fax: +41 (21) 693 35 02

Boost list run by bdawes at, gregod at, cpdaniel at, john at