Boost logo

Boost :

From: vladimir josef sykora (vladimir.sykora_at_[hidden])
Date: 2002-11-25 05:37:14


Hello,
Is there a way to apply a binary operation over two sequences?
For example, I have two sequences: LHSseq and RHSseq. I want now to
construct the return type, which is a sequence that cointains the result
types of applying a binary operation for every member of the sequences.
Something like:

template<
      typename BOOST_MPL_AUX_VOID_SPEC_PARAM(LhsSequence)
    , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(RhsSequence)
    , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BinaryOperation)
>
struct transform{..};

usage:
typedef transform<LHSseq,RHSseq,someBinOp>::type result_type;

Guarantees complexity O(n)?

--
vladimir josef sykora
morphochem AG
gmunder str. 37-37a
81379 muenchen
tel. ++49-89-78005-0
fax  ++49-89-78005-555
vladimir.sykora_at_[hidden]
http://www.morphochem.de

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