Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-02-15 03:51:33


Attached is an implementation of 'boost::tuples::apply' function template,
providing one with a possibility of function application on a tuple of
arguments:

    #include "boost/tuple/tuple.hpp"
    #include "boost/tuple/apply.hpp"

    using namespace boost;

    void f(int, char const*);

    int main()
    {
        char const* text = "text";
        tuples::apply(f, make_tuple(5, text)); // here
    }

For those who knows Python, it's an equivalent of Python's built-in 'apply'
function.

IMO it's one of the fundamental tuple facilities, and I would love to
contribute it to the Boost.Tuple library, if it's welcome. Jaakko?

Aleksey




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