[#BloombergLP-bslstl-Function_InvokerUtil-IsFuncInvocable]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Function_InvokerUtil.adoc[Function&lowbar;InvokerUtil]::IsFuncInvocable
:relfileprefix: ../../../
:mrdocs:

Boolean metafunction for invocability of `FUNC` under `PROTOTYPE`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;function&lowbar;invokerutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class PROTOTYPE,
    class FUNC&gt;
struct IsFuncInvocable
    : xref:BloombergLP/bslstl/Function_InvokerUtil_IsFuncInvocable-05.adoc[Function&lowbar;InvokerUtil&lowbar;IsFuncInvocable&lt;PROTOTYPE, FUNC&gt;]
----

== Description

This `struct` template implements a Boolean metafunction that publicly inherits from `bsl&colon;&colon;true&lowbar;type` if an object of the specified `FUNC` type is invocable under the specified `PROTOTYPE`, and publicly inherits from `bsl&colon;&colon;false&lowbar;type` otherwise&period; An object of `FUNC` type is invocable under the `PROTOTYPE` if it is Lvalue&hyphen;Callable with the arguments of the `PROTOTYPE` (as forwarded by the facilities of &apos;bslmf&lowbar;forwardingtype), and returns an object of type explicitly convertible to the return type of the `PROTOTYPE`&period; If the return type of the `PROTOTYPE` is `void`, then any type is considered explicitly convertible to the return type of the `PROTOTYPE`&period; This `struct` template requires `PROTOTYPE` to be an unqualified function type&period;

Note that `IsFuncInvocable` is qualitatively different than `std&colon;&colon;is&lowbar;invocable&lowbar;r`, in that it makes concessions for supporting legacy behavior of `bsl&colon;&colon;function`&period; `std&colon;&colon;is&lowbar;invocable&lowbar;r&lt;RET, FUNC, ARGS&period;&period;&period;&gt;` requires that the return type of the invocation of `FUNC` with `ARGS&period;&period;&period;` be implicitly convertible to `RET`, as opposed to explicitly convertible&period; Further, the use of `bslmf&colon;&colon;ForwardingType` to forward arguments in the invoker of a `bsl&colon;&colon;function` creates qualitatively different behavior than the argument forwarding mechanism used by the standard `INVOKE` pseudo&hyphen;expression&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslstl/Function_InvokerUtil_IsFuncInvocable-05.adoc[Function&lowbar;InvokerUtil&lowbar;IsFuncInvocable&lt;PROTOTYPE, FUNC&gt;]`
| forward declaration
|===

== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Function_IsInvocableWithPrototype-00.adoc[`Function&lowbar;IsInvocableWithPrototype&lt;RET(ARGS&period;&period;&period;), FUNC&gt;`] 
| Boolean metafunction reporting whether `FUNC` can initialize `bsl&colon;&colon;function`&period;
|===


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