Boost logo

Boost Users :

Subject: [Boost-users] How to get the behavior of make_recursive_variant ?
From: Timothy Madden (terminatorul_at_[hidden])
Date: 2010-07-07 06:40:31


Hello

I am constructing a data structure with STL containers and tuples and
containers ..., so all inner memebers/components are unnamed (tuples use
only indexes for element access, and so do STL containers, if at all)

At a certain point my structure is recursive as it needs to hold a tree
of (variables and maps and lists of (variables and maps and lists of (...)))

boost::make_recursive_variant< >::type can serve my purpose well, except
that I do not need a variant in my structure, I just need the structure
to be recursive. Is there a way to get the recursive-definition behavior
of make_recursive_variant<>, without the variant ?

Also I am curios: how is such a recursive definition possible ? How does
make_recursive_variant implement it ?

Thank you,
Timothy Madden


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net