[#bsl-unary_compose]
= xref:bsl.adoc[bsl]::unary&lowbar;compose
:relfileprefix: ../
:mrdocs:

This class provides a function object adaptor for two other functors&period; 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))`&period;

== Synopsis

Declared in `&lt;bslstp&lowbar;exfunctional&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class OPERATION1,
    class OPERATION2&gt;
class unary&lowbar;compose;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/unary_compose/argument_type.adoc[`argument&lowbar;type`] 
| This `typedef` is an alias to `OPERATION2&colon;&colon;argument&lowbar;type`&period;
| xref:bsl/unary_compose/result_type.adoc[`result&lowbar;type`] 
| This `typedef` is an alias to `OPERATION1&colon;&colon;result&lowbar;type`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/unary_compose/2constructor.adoc[`unary&lowbar;compose`]         [.small]#[constructor]#
| Create a `unary&lowbar;compose` object from the specified `x` and `y` functors&period;
| 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&lowbar;fn1`] 
| First functor `f` in the composition `f(g(x))`&period;
| xref:bsl/unary_compose/d_fn2.adoc[`d&lowbar;fn2`] 
| Second functor `g` in the composition `f(g(x))`&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/compose1.adoc[`compose1`]
| Return an `unary&lowbar;compose` function object constructed using the specified `fn1` and `fn2` unary functions&period; The returned function object is equivalent to `fn1(fn2(x))`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
