On Mon, 23 Aug 2004 08:42:09 -0700, Steven L. Scott
I'm working on an application (a data analysis system built in C++) for which it would be helpful to have nested (multidimensional) containers other than ordinary arrays.
I've been toying with using boost::variant for something like this -
an arbitrarily nested data structure that could be used like the
hashes in Perl/Python etc. Unfortunately, because boost::variant
doesn't know about the std::map operators, you can't use code like
thedata["first"]["second"] but you can write something like this
(data_t is used just to gain the syntactic sugar of
std::map::operator[])
#include <map>
#include <string>
#include