$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Joel de Guzman (joel_at_[hidden])
Date: 2005-06-27 06:48:09
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