Function object adaptor that composes one binary and two unary functors.

Synopsis

Declared in <bslstp_exfunctional.h>

template<
    class OPERATION1,
    class OPERATION2,
    class OPERATION3>
class binary_compose;

Description

This class provides a function object adaptor for three other functors. When given two adaptable unary functions g1 and g2, and a third adaptable binary function f, and if g1 and g2`s argument type is convertible to `f`s argument type, this class can be used to create a function object `h that is equivalent to f(g1(x), g2(x)).

Type Aliases

Name

Description

argument_type

This typedef is an alias to OPERATION2::argument_type.

result_type

This typedef is an alias to OPERATION1::result_type.

Member Functions

Name

Description

binary_compose [constructor]

Create a binary_compose object from the specified fn1, fn2, and fn3 functors.

operator()

Function call operators

Protected Data Members

Name

Description

d_fn1

First functor f in the composition f(g1(x), g2(x)).

d_fn2

Second functor g1 in the composition f(g1(x), g2(x)).

d_fn3

Third functor g2 in the composition f(g1(x), g2(x)).

Non-Member Functions

Name

Description

compose2

Create a binary_compose adaptor from one binary and two unary functors.

Created with MrDocs