[#bsl-unary_compose] = xref:bsl.adoc[bsl]::unary_compose :relfileprefix: ../ :mrdocs: This class provides a function object adaptor for two other functors. When given two adaptable unary functions `f` and `g`, and when `g`s return type is convertible to `f`s argument type, this class can be used to create a function object `h` that is equivalent to `f(g(x))`. == Synopsis Declared in `<bslstp_exfunctional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class OPERATION1, class OPERATION2> class unary_compose; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/unary_compose/argument_type.adoc[`argument_type`] | This `typedef` is an alias to `OPERATION2::argument_type`. | xref:bsl/unary_compose/result_type.adoc[`result_type`] | This `typedef` is an alias to `OPERATION1::result_type`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/unary_compose/2constructor.adoc[`unary_compose`] [.small]#[constructor]# | Create a `unary_compose` object from the specified `x` and `y` functors. | xref:bsl/unary_compose/operator_call-06.adoc[`operator()`] | Function call operators |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:bsl/unary_compose/d_fn1.adoc[`d_fn1`] | First functor `f` in the composition `f(g(x))`. | xref:bsl/unary_compose/d_fn2.adoc[`d_fn2`] | Second functor `g` in the composition `f(g(x))`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/compose1.adoc[`compose1`] | Return an `unary_compose` function object constructed using the specified `fn1` and `fn2` unary functions. The returned function object is equivalent to `fn1(fn2(x))`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#