[#BloombergLP-bslstl-SharedPtr_TestIsCallable-test-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/SharedPtr_TestIsCallable.adoc[SharedPtr&lowbar;TestIsCallable]::test
:relfileprefix: ../../../
:mrdocs:

SFINAE probe selecting when the functor is callable with `ARG`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ARG&gt;
static
xref:BloombergLP/bslstl/SharedPtr_TestIsCallable.adoc[FalseType]
test(&period;&period;&period;);
----

== Description

This function is never defined&period; It provides a property&hyphen;checker that an entity of (template parameter) type `FACTORY` can be called like a function with a single argument, which is a pointer to an object of (template parameter) type `ARG`&period; The `sizeof()` expression provides an unevaluated context to check the validity of the enclosed expression, and the `, 0` ensures that the `sizeof` check remains valid, even if the expression returns `void`&period; Similarly, the cast to `void` ensures that there are no surprises with types that overload the comma operator&period; Note that the cast to `void` is elided for Clang compilers using versions of LLVM prior to 12, which fail to evaluate the trait properly&period; Note that `sizeof(decltype())` is required for MSVC due to a compiler bug in MSVC 17&period;6 and later (at least including 17&period;7&period;0 Preview 2&period;0)&period;

== Return Value

`FalseType` indicating the functor is not callable with `ARG`


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