<div dir="ltr">Also as a bonus, once compilers start supporting &quot;Deducing this&quot;, the pointers to deducing this member functions are free function pointers.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 5, 2024 at 11:21 AM Jarrad Waterloo &lt;<a href="mailto:descender76@gmail.com">descender76@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">That example will scare people away for 2 reasons. Besides the one presented, there is the awkward ergometric of having to specify the instance TWICE in 

memfunc_to_func and 

invoke_func_as_memfunc which then leads to the presented problem.<div><br></div><div><div>At compile time for KNOWN instance `a` you can call both Base::Go and Derived1::Go.</div><div><div>At compile time for KNOWN instance `b` you can call both Base::Go and Derived2::Go.</div><div><br></div><div>function_ref allows you to do these same 4 tasks and you don&#39;t have to make Base, Derived1 or Derived2 virtual at all.</div><div><br></div><div>function_ref, Dyno and the others are really a better form of polymorphism that you ?should? defer to 85/90/95/99% of the time.</div><div><br></div><div><a href="https://youtube.com/clip/Ugkxo9iqdK7DOY8JCS6hvw9x-P5FqO849zSQ?si=J85Eh-aLJdpgBOqX" target="_blank">https://youtube.com/clip/Ugkxo9iqdK7DOY8JCS6hvw9x-P5FqO849zSQ?si=J85Eh-aLJdpgBOqX</a><br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 5, 2024 at 10:54 AM Frederick Virchanza Gotham via Std-Proposals &lt;<a href="mailto:std-proposals@lists.isocpp.org" target="_blank">std-proposals@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>On Friday, January 5, 2024, Frederick Virchanza Gotham wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div>The above code will invoke the &#39;Derived2::Go&#39; member function on an object of type &#39;Derived1&#39;. </div></blockquote><div><br></div><div><br></div><div>Typographical error:</div><div>     Swap &#39;Derived2&#39; with &#39;Derived1&#39;. </div>
-- <br>
Std-Proposals mailing list<br>
<a href="mailto:Std-Proposals@lists.isocpp.org" target="_blank">Std-Proposals@lists.isocpp.org</a><br>
<a href="https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals" rel="noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals</a><br>
</blockquote></div>
</blockquote></div>

