Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2003-01-23 18:09:54


> > Look on MPL example for inherit_linear. It may have what you need.
>
> Well, as I said, I'm new... I can find mpl documentation, but searches
> for inherit_linear came up with nothing.

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/libs/mpl/example/
inherit_linearly.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup

In the above example terms, what you want would look like:
typedef mpl::int_c<0> Cash;
typedef mpl::int_c<0> Name;

field( foobar, Cash() ) = 32.2;
field( foobar, Name() ) = "Fred";

IOW, this or another way implemented: tuples are your friends. Look onto
boost::tuple lib, that supply full featured tuples.

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk