Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-04-27 18:09:01


On 04/27/2005 05:33 PM, Giovanni P. Deretta wrote:
[snip]
> to use some kind of tag instead of indexes). In code that i wrote there
> were a set of functions that had similar effects and had multiple
> return values (as tuples). The return values weren't the same, but all
> of them had a common types. Some generic code had to work with this
> functions and needed to extract this common types from the tuples. A
> typed get was exactly what i needed. Fusion 'find' would probably have
> done the job as well, but i did not know it untill now.

I amended the code in vault:

http://boost-sandbox.sourceforge.net/vault/index.php?&direction=0&order=&directory=cppljevans

by adding templated member function:

    template<class FieldType>
      FieldType&
    find_type(void)
    ;

to template tuple_indexed. Would this satisfy your needs?


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