[Tuple] Addressing by named tag?

View: New views
2 Messages — Rating Filter:   Alert me  

[Tuple] Addressing by named tag?

by Robert Jones-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am I correct in believing that tuples have to be accessed by element index,
as in

tuple.get<0>()

Multi-Index container has a really nice facility to use named (well typed
really) tags in these
kind of expressions, but it seems tuples do not.

Anyone fancy adding it to tuple?

- Rob.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [Tuple] Addressing by named tag?

by Matt Calabrese :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 9, 2009 at 12:49 PM, Robert Jones <robertgbjones@...>wrote:
>
> Multi-Index container has a really nice facility to use named (well typed
> really) tags in these
> kind of expressions, but it seems tuples do not.
>
> Anyone fancy adding it to tuple?
>

What you want already exists in Boost.Fusion. It's a map.
http://www.boost.org/doc/libs/1_39_0/libs/fusion/doc/html/fusion/container/map.html


--
-Matt Calabrese
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost