[#FOLLY_CREATE_MEMBER_INVOKER]
= FOLLY&lowbar;CREATE&lowbar;MEMBER&lowbar;INVOKER
:mrdocs:

&ast; FOLLY&lowbar;CREATE&lowbar;MEMBER&lowbar;INVOKER

== Synopsis

Declared in `&lt;folly&sol;functional&sol;Invoke&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define FOLLY&lowbar;CREATE&lowbar;MEMBER&lowbar;INVOKER(classname, membername)

----

== Description

Used to create an invoker type bound to a specific member&hyphen;invocable name&period;

Example&colon;

FOLLY&lowbar;CREATE&lowbar;MEMBER&lowbar;INVOKER(foo&lowbar;invoker, foo)&semi;

The type `foo&lowbar;invoker` is generated in the current namespace and may be used as follows&colon;

struct CanFoo &lcub; int foo(Bar&amp;) &lcub; return 1&semi; &rcub; int foo(Car&amp;&amp;) noexcept &lcub; return 2&semi; &rcub; &rcub;&semi;

using traits &equals; folly&colon;&colon;invoke&lowbar;traits&lt;foo&lowbar;invoker&gt;&semi;

traits&colon;&colon;invoke(CanFoo&lcub;&rcub;, Car&lcub;&rcub;) &sol;&sol; 2

traits&colon;&colon;invoke&lowbar;result&lt;CanFoo, Bar&amp;&gt; &sol;&sol; has member traits&colon;&colon;invoke&lowbar;result&lowbar;t&lt;CanFoo, Bar&amp;&gt; &sol;&sol; int traits&colon;&colon;invoke&lowbar;result&lt;CanFoo, Bar&amp;&amp;&gt; &sol;&sol; empty traits&colon;&colon;invoke&lowbar;result&lowbar;t&lt;CanFoo, Bar&amp;&amp;&gt; &sol;&sol; error

traits&colon;&colon;is&lowbar;invocable&lowbar;v&lt;CanFoo, Bar&amp;&gt; &sol;&sol; true traits&colon;&colon;is&lowbar;invocable&lowbar;v&lt;CanFoo, Bar&amp;&amp;&gt; &sol;&sol; false

traits&colon;&colon;is&lowbar;invocable&lowbar;r&lowbar;v&lt;int, CanFoo, Bar&amp;&gt; &sol;&sol; true traits&colon;&colon;is&lowbar;invocable&lowbar;r&lowbar;v&lt;char&ast;, CanFoo, Bar&amp;&gt; &sol;&sol; false

traits&colon;&colon;is&lowbar;nothrow&lowbar;invocable&lowbar;v&lt;CanFoo, Bar&amp;&gt; &sol;&sol; false traits&colon;&colon;is&lowbar;nothrow&lowbar;invocable&lowbar;v&lt;CanFoo, Car&amp;&amp;&gt; &sol;&sol; true

traits&colon;&colon;is&lowbar;nothrow&lowbar;invocable&lowbar;v&lt;int, CanFoo, Bar&amp;&gt; &sol;&sol; false traits&colon;&colon;is&lowbar;nothrow&lowbar;invocable&lowbar;v&lt;char&ast;, CanFoo, Bar&amp;&gt; &sol;&sol; false traits&colon;&colon;is&lowbar;nothrow&lowbar;invocable&lowbar;v&lt;int, CanFoo, Car&amp;&amp;&gt; &sol;&sol; true traits&colon;&colon;is&lowbar;nothrow&lowbar;invocable&lowbar;v&lt;char&ast;, CanFoo, Car&amp;&amp;&gt; &sol;&sol; false

== Parameters

[cols="1,4"]
|===
| Name| Description
| *classname*
| the name of the generated invoker type
| *membername*
| the member&hyphen;invocable name to bind
|===


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