Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2002-11-01 22:54:41

"Joel de Guzman" <djowel_at_[hidden]> wrote in message

> BTW, if you wish to have the tup.field syntax, you might find
> inspiration in boost.spirit closures. Example syntax:
> struct my_tuple : tuple_fields<my_tuple, std::string, int, int>
> {
> member1 name;
> member2 id;
> member3 age;
> };
> Then:
> my_tuple tup;
> std::cout << << std::endl;
> see

Here you explicitly define your fields, which makes impossible something
like projection or cross-product.

As far as boost::tuple is concerned, I need some time to consider pros and

By the way, what are the objections against our current approach? One, as I
understand, the need for macro. Another is that boost::tuple is already
widely used throughout the library. Anything else?

Just to re-iterate, we currently define a class for every column. This
class contains a placeholder for the value. The name of this class serves
as the column name. Columns (classes) get combined in a typelist, which is
passed to the tuple, which inherits from all of them. Static_cast is used
to access individual fields.



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