
27 Jun
2005
27 Jun
'05
11:48 a.m.
Pavel Chikulaev wrote:
Hi all,
Is there any interest in tagged tuple as extension of tuples library or fusion library? The example:
struct name_t {}; //tagged types struct year_t {};
void foo() { tagged_tuple<std::string, name_t, int, year_t> s;
s.get<name_t>() = "Hello World"!; s.get<year_t>() = 2005; assert(s.get<0>() == s.get<name_t>()); assert(s.get<1>() == s.get<year_t>()); }
It already works in VC7.1 and VC8.0 :)
What do you think?
Hi, The plan for fusion is to have a set and map associative tuples. Your tagged_tuple is very similar to a fusion::map. Cheers, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net