<div dir="ltr">I don't quite understand about __invoke bullet2 and bullet4.<div><br></div><div>for example, bullet2:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">template</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">class</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">_Fp</span><span class="" style="line-height:13px;white-space:pre">,</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">class</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">_A0</span><span class="" style="line-height:13px;white-space:pre">,</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">class</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">...</span><span class="" style="line-height:13px;white-space:pre">_Args</span><span class="" style="line-height:13px;white-space:pre">,<br>
</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">class</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">=</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">typename</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">enable_if<br>
</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><<br></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">is_member_function_pointer</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">typename</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">remove_reference</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre">_Fp</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">type</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">value</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">&&<br>
</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">!</span><span class="" style="line-height:13px;white-space:pre">is_base_of</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">typename</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">remove_reference</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">typename</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">__member_pointer_traits</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">typename</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">remove_reference</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre">_Fp</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">type</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">_ClassType</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">type</span><span class="" style="line-height:13px;white-space:pre">,<br>
</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">typename</font></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">remove_reference</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre">_A0</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">type</span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">value<br>
</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">>::</span><span class="" style="line-height:13px;white-space:pre">type<br></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">><br>
</span><span class="" style="line-height:13px;white-space:pre">_LIBCPP_INLINE_VISIBILITY<br></span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">auto<br></font></span><span class="" style="line-height:13px;white-space:pre">__invoke</span><span class="" style="line-height:13px;white-space:pre">(</span><span class="" style="line-height:13px;white-space:pre">_Fp</span><span class="" style="line-height:13px;white-space:pre">&&</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">__f</span><span class="" style="line-height:13px;white-space:pre">,</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">_A0</span><span class="" style="line-height:13px;white-space:pre">&&</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">__a0</span><span class="" style="line-height:13px;white-space:pre">,</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">_Args</span><span class="" style="line-height:13px;white-space:pre">&&</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">...</span><span class="" style="line-height:13px;white-space:pre">__args</span><span class="" style="line-height:13px;white-space:pre">)<br>
</span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre">-></span><span class="" style="line-height:13px;white-space:pre"> </span><span class="" style="line-height:13px;white-space:pre"><font color="#9900ff">decltype</font></span><span class="" style="line-height:13px;white-space:pre">(((*</span><span class="" style="line-height:13px;white-space:pre">_VSTD</span><span class="" style="line-height:13px;white-space:pre">::</span><span class="" style="line-height:13px;white-space:pre">forward</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre">_A0</span><span class="" style="line-height:13px;white-space:pre">>(</span><span class="" style="line-height:13px;white-space:pre">__a0</span><span class="" style="line-height:13px;white-space:pre">)).*</span><span class="" style="line-height:13px;white-space:pre">__f</span><span class="" style="line-height:13px;white-space:pre">)(</span><span class="" style="line-height:13px;white-space:pre">_VSTD</span><span class="" style="line-height:13px;white-space:pre">::</span><span class="" style="line-height:13px;white-space:pre">forward</span><span class="" style="line-height:13px;white-space:pre"><</span><span class="" style="line-height:13px;white-space:pre">_Args</span><span class="" style="line-height:13px;white-space:pre">>(</span><span class="" style="line-height:13px;white-space:pre">__args</span><span class="" style="line-height:13px;white-space:pre">)...));</span></blockquote>
<div><br></div><div>this functions invokes <b>f</b> with <b>(*a0).f(args) (</b>as written in header __functional_base)<b>, </b>so I guess that a0/A0 has the type of <i>Pointer to Class? (thus, of course, isn't a base class of himself)</i></div>
<div><br></div><div>Then why did <b>enable_if </b>just test if <i>ClassType</i> of <b>f </b>isn't a base class of <b>A0 </b>?</div><div>wouldn't </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
&& is_base_of<member_pointer_traits<_Fp>::ClassType, remove_pointer<A0>>::value</blockquote><div><br></div><div>be more accurate? also, wouldn't <Some_Class_C::*Fp, Some_Class_D, Some_Args...> makes the value of enable_if to be <font color="#9900ff">true</font>?</div>
<div><br></div><div>I must guess that there is something I hadn't taken into consideration ;> </div><div style="float:left;white-space:pre;line-height:1;background-image:initial;background-repeat:initial"><span class=""><br>
</span></div><div style="float:left;white-space:pre;line-height:1;background-image:initial;background-repeat:initial"><span class=""><br></span></div><div style="float:left;white-space:pre;line-height:1;background-image:initial;background-repeat:initial">
<span class=""><br></span></div><div style="float:left;white-space:pre;line-height:1;background-image:initial;background-repeat:initial"><span class=""><br></span></div><div style="float:left;white-space:pre;line-height:1;background-image:initial;background-repeat:initial">
<span class=""><br></span></div></div>