Topic: Revision of N3702: Introducing an optional


Author: tomaszkam@gmail.com
Date: Sat, 21 Sep 2013 13:32:58 -0700 (PDT)
Raw View
------=_Part_2291_22691497.1379795578584
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

The paper has the same drawback as the first version of the my not_fn=20
proposal. It will not work if the second argument is rvalue reference for=
=20
move only type (ex. unique_ptr or jsut class object). Example:

std::men_fn(&C::f. std:make_unique<C>());

The solutions would be to change wording to:

template<class R, class T, class ObjT, class =E2 EURO | Arg>=20

                            unspecified mem_fn(R T::* pm, ObjT&& obj);


**

*//Here introduce names OjbTD for std::decay_t<ObjT> and objd for object=20
constructed from std::forward<ObjT>(obj);
*

*
*

*Requires: *std::is_constructible<ObjTD, ObjT>::value is true.


*Returns:** A simple call wrapper (20.10.1) *fn* such that the expression *=
*fn(a1,=20
...., aN)** is equivalent to **INVOKE(pm, <del>obj</del> <ins>objd</ins>,=20
a1,=E2 EURO |aN)**.*

**


*Throws: Nothing unless construction of *objd* throws.*

*Remarks: **//Info that returned object should be moveable and copyable if=
=20
ObjTD is copyable.**
*
For a detailed wording you may reference bind wording or my proposal=20
https://github.com/tomaszkam/proposals/blob/master/A%20proposal%20to%20add%=
20a%20generalized%20callable%20negator.html

W dniu sobota, 21 wrze=B6nia 2013 21:01:21 UTC+2 u=BFytkownik Mikhail Semen=
ov=20
napisa=B3:
>
> The revised version has an improved implementation, which allows to pass=
=20
> objects, pointers to objects and smart pointers as the second parameter t=
o=20
> mem_fn.=20
>

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_2291_22691497.1379795578584
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The paper has the same drawback as the first version of th=
e my not_fn proposal. It will not work if the second argument is rvalue ref=
erence for move only type (ex. unique_ptr or jsut class object). Example:<b=
r><br>std::men_fn(&amp;C::f. std:make_unique&lt;C&gt;());<br><br>The soluti=
ons would be to change wording to:<br><br><p class=3D"MsoNormal" style=3D"m=
argin-top:0cm;margin-right:46.8pt;margin-bottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><span styl=
e=3D"font-size:11.0pt;font-family:Consolas">template&lt;class R, class T,
class ObjT, class =E2&euro;&brvbar; Arg&gt; </span></p>

<p class=3D"MsoNormal" style=3D"margin-top:0cm;margin-right:46.8pt;margin-b=
ottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><span styl=
e=3D"font-size:11.0pt;font-family:Consolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
unspecified mem_fn(R T::* pm, ObjT&amp;&amp; obj);</span></p>

<p class=3D"MsoNormal" style=3D"margin-top:0cm;margin-right:46.8pt;margin-b=
ottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><br><i><sp=
an style=3D"font-size:11.0pt"></span></i></p><p class=3D"MsoNormal" style=
=3D"margin-top:0cm;margin-right:46.8pt;margin-bottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><i><span s=
tyle=3D"font-size:11.0pt">//Here introduce names OjbTD for std::decay_t&lt;=
ObjT&gt; and objd for object constructed from std::forward&lt;ObjT&gt;(obj)=
;<br></span></i></p><p class=3D"MsoNormal" style=3D"margin-top:0cm;margin-r=
ight:46.8pt;margin-bottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><i><span s=
tyle=3D"font-size:11.0pt"><br></span></i></p>

<p class=3D"MsoNormal" style=3D"margin-top:0cm;margin-right:46.8pt;margin-b=
ottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><i><span s=
tyle=3D"font-size:11.0pt">Requires: </span></i><span style=3D"font-size:
11.0pt;font-family:Consolas">std::is_constructible&lt;ObjTD, ObjT&gt;::valu=
e</span><span style=3D"font-size:11.0pt;
font-family:Consolas"></span> is true.</p><p class=3D"MsoNormal" style=3D"m=
argin-top:0cm;margin-right:46.8pt;margin-bottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><br></p><p=
 class=3D"MsoNormal" style=3D"margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><strong><i=
><span style=3D"font-size:11.0pt;line-height:115%;font-family:&quot;Times N=
ew Roman&quot;,&quot;serif&quot;">Returns:</span></i></strong><strong><span=
 style=3D"font-size:11.0pt;line-height:115%;font-family:&quot;Times New Rom=
an&quot;,&quot;serif&quot;;
font-weight:normal"> A simple call wrapper (20.10.1) </span></strong><span =
class=3D"IntenseQuoteChar"><span style=3D"font-size:11.0pt;line-height:115%=
;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">fn</span></span>=
<strong><span style=3D"font-size:11.0pt;line-height:115%;font-family:&quot;=
Times New Roman&quot;,&quot;serif&quot;;
font-weight:normal"> such that the expression </span></strong><strong><span=
 style=3D"font-size:11.0pt;line-height:115%;font-family:&quot;Times New Rom=
an&quot;,&quot;serif&quot;">fn(a1,
...., aN)</span></strong><strong><span style=3D"font-size:11.0pt;line-height=
:115%;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-weight:norma=
l"> is equivalent to </span></strong><strong><span style=3D"font-size:11.0p=
t;line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot=
;">INVOKE(pm, &lt;del&gt;obj&lt;/del&gt; &lt;ins&gt;objd&lt;/ins&gt;, a1,=
=E2&euro;&brvbar;aN)</span></strong><strong><span style=3D"font-size:11.0pt=
;line-height:
115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-weight:=
normal">.</span></strong></p><p class=3D"MsoNormal" style=3D"margin-top:0cm=
;margin-right:46.8pt;margin-bottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><strong><s=
pan style=3D"font-size:11.0pt;line-height:
115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-weight:=
normal"></span></strong></p><p class=3D"MsoNormal" style=3D"margin-top:0cm;=
margin-right:46.8pt;margin-bottom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal"><br></p><p=
 class=3D"MsoNormal" style=3D"margin-left:14.2pt"><strong><strong><strong><=
i><span style=3D"font-size:11.0pt;line-height:115%;font-family:&quot;Times =
New Roman&quot;,&quot;serif&quot;">Throws:
</span></i><strong><span style=3D"font-size:11.0pt;line-height:115%;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;font-weight:norma=
l">Nothing unless construction of </span></strong></strong></strong></stron=
g><span style=3D"font-size:11.0pt;line-height:
115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">objd</span>=
<strong><strong><strong><strong><span style=3D"font-size:11.0pt;line-height=
:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;
font-weight:normal"> throws</span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
>.</span></strong></strong></strong></strong></p><p class=3D"MsoNormal" sty=
le=3D"margin-left:14.2pt"><strong><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
>Remarks: </span></strong><i><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
>//Info that returned </span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
>objec</span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
>t should be moveable and copyable if ObjTD is copyable.</span></i><strong>=
<span style=3D"font-size:11.0pt;
line-height:115%;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"=
><br></span></strong></p>For a detailed wording you may reference bind word=
ing or my proposal <a href=3D"https://github.com/tomaszkam/proposals/blob/m=
aster/A%20proposal%20to%20add%20a%20generalized%20callable%20negator.html">=
https://github.com/tomaszkam/proposals/blob/master/A%20proposal%20to%20add%=
20a%20generalized%20callable%20negator.html</a><br><br>W dniu sobota, 21 wr=
ze=B6nia 2013 21:01:21 UTC+2 u=BFytkownik Mikhail Semenov napisa=B3:<blockq=
uote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-lef=
t: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">The revised version =
has an&nbsp;improved implementation, which allows to pass objects, pointers=
 to objects and smart pointers as&nbsp;the second parameter to mem_fn. </di=
v></blockquote><br></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_2291_22691497.1379795578584--

.


Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Sun, 22 Sep 2013 06:10:02 -0700 (PDT)
Raw View
------=_Part_167_21824788.1379855402808
Content-Type: multipart/alternative;
 boundary="----=_Part_168_25729025.1379855402808"

------=_Part_168_25729025.1379855402808
Content-Type: text/plain; charset=ISO-8859-1

Tomasz,
Well spotted.  I have put a revised version, which includes the support for
unique pointers and reference wrappers for the second parameter.

Mikhail.



--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_168_25729025.1379855402808
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr"><div>Tomasz,<br></div><div>Well spotted.&nbsp; I have put a revised version, which includes the support for unique pointers and reference wrappers for the second parameter.</div><div>&nbsp;</div><div>Mikhail.</div><div><br>&nbsp;</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />

------=_Part_168_25729025.1379855402808--
------=_Part_167_21824788.1379855402808
Content-Type: text/html; charset=windows-1252; name=mem_fn_revised.htm
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=mem_fn_revised.htm
X-Attachment-Id: 29220093-7f3d-4606-8009-1401d0061ac4
Content-ID: <29220093-7f3d-4606-8009-1401d0061ac4>

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindows-125=
2">
<meta name=3DGenerator content=3D"Microsoft Word 14 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
=09{font-family:Wingdings;
=09panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
=09{font-family:SimSun;
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:"Cambria Math";
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Cambria;
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Calibri;
=09panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
=09{font-family:Verdana;
=09panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
=09{font-family:"Anonymous Pro";
=09panose-1:2 6 6 9 3 2 2 0 5 4;}
@font-face
=09{font-family:"Segoe UI";
=09panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
=09{font-family:"\@SimSun";
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:Consolas;
=09panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
=09{font-family:"Trebuchet MS";
=09panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
=09{font-family:"Arial Rounded MT Bold";
=09panose-1:2 15 7 4 3 5 4 3 2 4;}
@font-face
=09{font-family:LMMono10-Regular;
=09panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
=09{font-family:LMRoman10-Regular;
=09panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
=09{margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
h1
=09{mso-style-link:"Heading 1 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:16.0pt;
=09font-family:"Verdana","sans-serif";}
h2
=09{mso-style-link:"Heading 2 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:15.0pt;
=09font-family:"Times New Roman","serif";}
h3
=09{mso-style-link:"Heading 3 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:13.0pt;
=09font-family:"Cambria","serif";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
=09{mso-style-link:"Header Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
=09{mso-style-link:"Footer Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
=09{color:blue;
=09text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
=09{color:purple;
=09text-decoration:underline;}
strong
=09{font-family:"Calibri","sans-serif";}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
=09{margin:0cm;
=09margin-bottom:.0001pt;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
=09{margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:36.0pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoQuote, li.MsoQuote, div.MsoQuote
=09{mso-style-link:"Quote Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Trebuchet MS","sans-serif";
=09color:black;
=09font-style:italic;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
=09{mso-style-link:"Intense Quote Char";
=09margin-top:10.0pt;
=09margin-right:46.8pt;
=09margin-bottom:14.0pt;
=09margin-left:46.8pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Arial Rounded MT Bold","sans-serif";
=09font-weight:bold;}
span.MsoIntenseEmphasis
=09{font-family:"Trebuchet MS","sans-serif";
=09color:windowtext;
=09font-weight:bold;
=09font-style:normal;}
span.Heading1Char
=09{mso-style-name:"Heading 1 Char";
=09mso-style-link:"Heading 1";
=09font-family:"Verdana","sans-serif";
=09font-weight:bold;}
span.Heading2Char
=09{mso-style-name:"Heading 2 Char";
=09mso-style-link:"Heading 2";
=09font-family:"Times New Roman","serif";
=09font-weight:bold;}
span.Heading3Char
=09{mso-style-name:"Heading 3 Char";
=09mso-style-link:"Heading 3";
=09font-family:"Cambria","serif";
=09font-weight:bold;}
span.HeaderChar
=09{mso-style-name:"Header Char";
=09mso-style-link:Header;
=09font-family:"Times New Roman","serif";}
span.FooterChar
=09{mso-style-name:"Footer Char";
=09mso-style-link:Footer;
=09font-family:"Times New Roman","serif";}
span.QuoteChar
=09{mso-style-name:"Quote Char";
=09mso-style-link:Quote;
=09font-family:"Trebuchet MS","sans-serif";
=09color:black;
=09font-style:italic;}
span.IntenseQuoteChar
=09{mso-style-name:"Intense Quote Char";
=09mso-style-link:"Intense Quote";
=09font-family:"Arial Rounded MT Bold","sans-serif";
=09font-weight:bold;}
p.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparag=
raphcxspfirst
=09{mso-style-name:msolistparagraphcxspfirst;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:0cm;
=09margin-left:36.0pt;
=09margin-bottom:.0001pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistpar=
agraphcxspmiddle
=09{mso-style-name:msolistparagraphcxspmiddle;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:0cm;
=09margin-left:36.0pt;
=09margin-bottom:.0001pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagra=
phcxsplast
=09{mso-style-name:msolistparagraphcxsplast;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:36.0pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.ecxmsonormal, li.ecxmsonormal, div.ecxmsonormal
=09{mso-style-name:ecxmsonormal;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:16.2pt;
=09margin-left:0cm;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
=09{mso-style-name:msochpdefault;
=09margin-right:0cm;
=09margin-left:0cm;
=09font-size:10.0pt;
=09font-family:"Calibri","sans-serif";}
span.unsafesenderemail1
=09{mso-style-name:unsafesenderemail1;}
..MsoChpDefault
=09{font-size:10.0pt;
=09font-family:"Calibri","sans-serif";}
@page WordSection1
=09{size:595.3pt 841.9pt;
=09margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
=09{page:WordSection1;}
 /* List Definitions */
 ol
=09{margin-bottom:0cm;}
ul
=09{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=3DEN-GB link=3Dblue vlink=3Dpurple>

<div class=3DWordSection1>

<table class=3DMsoNormalTable border=3D0 cellspacing=3D0 cellpadding=3D0 wi=
dth=3D619
 style=3D'width:464.25pt;border-collapse:collapse'>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Document number:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'></td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Date:</span></p>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Revises:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>2013-09-22</span></p>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>N3702</span></p>
  </td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Project:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Programming Language C++, Librar=
y
  Working Group</span></p>
  </td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Reply-to:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Mikhail Semenov&lt;<span
  class=3Dunsafesenderemail1><span style=3D'color:black'>mikhailsemenov1957=
@gmail.com</span></span>&gt;</span></p>
  </td>
 </tr>
</table>

<h1>&nbsp;</h1>

<h1 align=3Dcenter style=3D'text-align:center'><span style=3D'font-size:15.=
0pt;
line-height:115%'>Introducing an optional parameter for </span><strong><spa=
n
style=3D'font-size:15.0pt;line-height:115%'>mem_fn</span></strong><span
style=3D'font-size:15.0pt;line-height:115%'>, which allows to bind an objec=
t to
its member function</span></h1>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>1.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Introduction</h2>

<p class=3DMsoNormal>When a member function is used as a parameter to anoth=
er
function (the latter is usually called a <b><i>functional</i></b>) it is of=
ten
necessary to provide the corresponding class object as a parameter as well.=
 But
functionals, like for example an integral, are often written to accept one
global function. In cases when a member function and an object are needed, =
it
is necessary to bind them together,&nbsp; so that the result can be supplie=
d to
the corresponding functional as one parameter. Let us consider the followin=
g
functional <b>integrate </b>(it can be part of&nbsp; a library):&nbsp;</p>

<p class=3DMsoNormal><strong><span lang=3DFR>double
integrate(std::function&lt;double(double, double, double, double, double)&g=
t;
f,</span></strong></p>

<p class=3DMsoNormal><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;
double x1, double x2, double y1, double y2, double z1, double z2,&nbsp; dou=
ble
a1, double a2, double b1, double b2)&nbsp;;</span></strong></p>

<p class=3DMsoNormal>We need to call <b>integrate</b> with&nbsp; the
parameterized function <b>fa</b>, which is defined as a member of the class=
 <b>A</b>:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><str=
ong>class
A</strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><str=
ong>{</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; double p;</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>public:</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; A(double p1):p(p1) {}</s=
trong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; void set_param(double p1=
)
{&nbsp; p =3D p1; }</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; double fa(double x, doub=
le
y, double z, double a, double b);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>};</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>&nbsp;</p>

<p class=3DMsoNormal>The member-variable&nbsp; <b>p</b> is a &quot;hidden&q=
uot;
parameter of the function <b>fa</b>. We create an object:</p>

<p class=3Decxmsonormal style=3D'background:white'><strong><span style=3D'f=
ont-size:
11.0pt'>A a(5.0);</span></strong></p>

<p class=3Decxmsonormal style=3D'background:white'>If we want to call <b>in=
tegrate</b>
with <b>a.fa</b>&nbsp; we have three options:</p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong><span style=3D'font-weight:normal'>(1)</span></strong><stron=
g><span
style=3D'font-size:7.0pt;font-family:"Times New Roman","serif"'>&nbsp;&nbsp=
; </span>double
r =3D </strong><strong><span style=3D'font-size:10.5pt;font-family:"Segoe U=
I","sans-serif";
color:black'>&nbsp;</span>integrate(std::bind(&amp;A::fa, &amp;a, _1, _2, _=
3,
_4, _5), x1, x2, y1,y2, z1, z2,&nbsp;&nbsp; </strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;background:white'><strong>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
a1, a2, b1, b2);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;</strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong><span style=3D'font-weight:normal'>(2)</span></strong><stron=
g><span
style=3D'font-size:7.0pt;font-family:"Times New Roman","serif";font-weight:=
normal'>&nbsp;&nbsp;
</span></strong><span style=3D'font-size:10.5pt;font-family:"Segoe UI","san=
s-serif";
color:black'>&nbsp;</span><strong>double r =3D integrate</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</strong><strong><span lang=3DFR>([&amp;a](double x, double y, double z, do=
uble
a, double b) { return a.fa(x, y, z, a, b);},&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);&nbsp;</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></strong><strong><span
style=3D'font-weight:normal'>(3)</span>&nbsp;&nbsp; </strong><strong><span
style=3D'font-weight:normal'>define a global function (a wrapper), which we=
 will
use as a&nbsp; parameter to the function </span>integrate</strong><strong><=
span
style=3D'font-weight:normal'>:</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;
double f(double x, double y, double z, double a, double b) { return
a.fa(x,y,z,a,b); }</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
=85</strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double r =
=3D
integrate(f, x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </stro=
ng></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>In all these examples, if the function <b>fa</b> had more
parameters we would have to write even a longer statement. </p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>&nbsp;</p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>It would be much more convenient to be able to write
something like this:</p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
line-height:150%;background:white'><strong>double r =3D integrate(<i>some_b=
inder</i>(&amp;A::fa,
&amp;a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);&nbsp;</strong></p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>which looks more simple and clearer</span></strong><str=
ong><span
style=3D'font-family:SimSun;font-weight:normal'>.</span></strong></p>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>2.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Proposal</h2>

<p class=3DMsoNormal>The proposal is to allow <b>mem_fn</b> to accept a sec=
ond,
optional parameter. The full definition is as follows (the first option is =
the
same as in <b>N3690, </b>section<b> 20.10.10</b>):</p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:Consolas'>template&lt;class R, class T&=
gt;
unspecified mem_fn(R T::* pm);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Returns:</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> A simple call wrapper (20.10.1) </span></strong><stron=
g><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> such that the expression </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>fn(t, a2, ..., aN)</span></span><str=
ong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is equivalent to </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>INVOKE (pm, t, a2, ..., aN)</span></=
span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> (20.10.2). </span></strong><span class=3DIntenseQuoteC=
har><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn
</span></span><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>shall have a nest=
ed
type </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-siz=
e:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>result_type</span><=
/span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> that is a synonym for the return type of </span></stro=
ng><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> when </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define two nested types named </span></strong><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>argument_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>result_type</span><=
/strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>cv</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> </span></strong><strong><span style=3D'font-size:11.0p=
t;
line-height:115%;font-family:"Times New Roman","serif"'>T*</span></strong><=
strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></strong>=
<strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function with <i>cv-</i>qualifi=
er </span></strong><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>cv</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and taking no arguments, where </span></strong><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>&nbsp; is </span></strong><span class=3DIntenseQuoteCha=
r><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define three nested types named </span></strong><=
span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>first_argument_type</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, </span></strong><span class=3DIntenseQuoteChar><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>second_argument_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, and </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif"'>cv</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>&nbsp;
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T*</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T1</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><span class=3DIntenseQuoteChar><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function with </span></strong><=
span
class=3DQuoteChar><b><span style=3D'font-size:11.0pt;line-height:115%;font-=
family:
"Times New Roman","serif"'>cv-</span></b></span><strong><span style=3D'font=
-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>qualifier
</span></strong><span class=3DIntenseQuoteChar><i><span style=3D'font-size:=
11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>cv</span></i></span=
><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and taking one argument of type </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T1</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Throws:
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>Nothing</span></s=
trong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Trebuchet MS","sans=
-serif";
font-weight:normal'>.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>template&lt;class R, class =
T,
class ObjT, class =85 Arg&gt; </span></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
unspecified mem_fn(R T::* pm, ObjT obj);</span></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><i><spa=
n
style=3D'font-size:11.0pt'>&nbsp;</span></i></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:0cm;margin-bottom=
:0cm;
margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal;text-autospace:
none'><b><i><span style=3D'font-size:11.0pt'>Requires: </span></i></b><span
style=3D'font-size:11.0pt'>The type<b> </b></span><b><span style=3D'font-si=
ze:11.0pt'>ObjTD,
</span></b><span style=3D'font-size:11.0pt'>which is <b>std::decay&lt;</b><=
/span><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>ObjT&gt;::type</span></b><s=
pan
style=3D'font-size:11.0pt;font-family:Consolas'>,<b> </b></span><span
style=3D'font-size:11.0pt'>shall be </span><b><span style=3D'font-size:11.0=
pt;
font-family:Consolas'>MoveConstructible</span></b><span style=3D'font-size:=
11.0pt;
font-family:Consolas'> </span><span style=3D'font-size:11.0pt'>and </span><=
b><span
style=3D'font-size:11.0pt'>is_constructible&lt;</span></b><b><span
style=3D'font-size:11.0pt'> ObjTD</span></b><b><span style=3D'font-size:11.=
0pt'>, </span></b><b><span
style=3D'font-size:11.0pt'>ObjT</span></b><b><span style=3D'font-size:11.0p=
t'>&gt;::value</span></b><span
style=3D'font-size:10.0pt;font-family:LMMono10-Regular'> </span><span
style=3D'font-size:11.0pt'>shall be true</span><span style=3D'font-size:10.=
0pt;
font-family:LMMono10-Regular'>. </span><span style=3D'font-size:11.0pt'>An =
object
</span><strong><span style=3D'font-size:11.0pt;font-family:"Times New Roman=
","serif"'>objd</span></strong><span
style=3D'font-size:11.0pt'> =A0of type <b>ObjTD </b>is constructed from <b>=
obj</b>
during =A0the function evaluation.</span></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'>&nbsp;</p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Returns:</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> A simple call wrapper (20.10.1) </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>fn</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> such that the expression </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn(a1,
...., aN)</span></strong><strong><span style=3D'font-size:11.0pt;line-height=
:115%;
font-family:"Times New Roman","serif";font-weight:normal'> is equivalent to=
 </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>INVOKE(pm,
objv, a1,=85aN)</span></strong><strong><span style=3D'font-size:11.0pt;line=
-height:
115%;font-family:"Times New Roman","serif";font-weight:normal'>, where </sp=
an></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objv</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is the value derived =A0from </span></strong><strong><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objd
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>of type</span></s=
trong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>
ObjTD</span></strong><strong><span style=3D'font-size:11.0pt;line-height:11=
5%;
font-family:"Times New Roman","serif";font-weight:normal'>, according to th=
e rules
explained below</span></strong><strong><span style=3D'font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>.</span></strong></=
p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define one nested type named </span></strong><str=
ong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as a synonym for </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'> </span></i></spa=
n><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>&nbsp;is </span></strong><span class=3DIntenseQuoteChar=
><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type, when </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function</span></strong><strong=
><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>which is taking n=
o
arguments.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define two nested types named </span></strong><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>argument_type
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>and </span></stro=
ng><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>T1</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></strong>=
<strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-family:"Times New Roman","seri=
f"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function taking&nbsp; one argum=
ent
of type </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-=
family:
"Times New Roman","serif"'>T1</span></span><strong><span style=3D'font-size=
:11.0pt;
line-height:115%;font-family:"Times New Roman","serif";font-weight:normal'>=
,
where </span></strong><span class=3DIntenseQuoteChar><i><span style=3D'font=
-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></=
i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define three nested types named </span></strong><=
span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>first_argument_type</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, </span></strong><span class=3DIntenseQuoteChar><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>second_argument_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, and </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T1</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T2</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><span class=3DIntenseQuoteChar><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function taking two arguments o=
f
types </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-si=
ze:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T1</span></span><sp=
an
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'> and&nbsp; </span=
></span><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T2</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
value of </span></strong><strong><span style=3D'font-size:11.0pt;line-heigh=
t:
115%;font-family:"Times New Roman","serif"'>objv</span></strong><strong><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is derived from </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objd
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>according to the =
following
rules:</span></strong></p>

<p class=3DMsoListParagraph style=3D'margin-left:33.0pt;text-indent:-18.0pt=
'><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-seri=
f"'>=97<span
style=3D'font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span></sp=
an><span
style=3D'font-size:11.0pt;line-height:115%'>if =A0<b>ObjTD </b>is <b>refere=
nce_wrapper&lt;T&gt;</b>,
the value will be <b>objd.get()</b> of type <b>T&amp;</b>;</span></p>

<p class=3DMsoListParagraph style=3D'margin-left:33.0pt;text-indent:-18.0pt=
'><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-seri=
f"'>=97<span
style=3D'font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span></sp=
an><span
style=3D'font-size:11.0pt;line-height:115%'>otherwise, the value will be <b=
>objd </b>=A0and
its type is <b>ObjTD <i>cv</i> &amp;</b>, where <b><i>cv</i></b> is the <i>=
cv</i>-qualifier
=A0of the member function <b>pm</b>.</span></p>

<p class=3DMsoListParagraph style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Throws:
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>Nothing unless th=
e construction
of </span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%=
;
font-family:"Times New Roman","serif"'>objd</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> throws</span></strong><strong><span style=3D'font-size=
:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>.</span></strong></=
p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>The second option means that the object and the member
function will be bound together.&nbsp; Using this feature we can now write =
the
following code (the class and the function used here were explained in the
introduction):</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>double x =3D 1.0;</span><=
/strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>double sum =3D 0.0;</span=
></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>for (int i =3D 0; i &lt; =
10; i++)</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>{</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; a.set_param(=
x);</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; sum +=3D int=
egrate(mem_fn(&amp;A::fa,
&amp;a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); // summing up ten values<=
/span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; x +=3D 0.1;<=
/span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>}</span></strong></p>

<h2>Examples</h2>

<h3><u>Example 1.</u></h3>

<p class=3DMsoNormal>Here is a sample program, which shows the application
of&nbsp; <b>mem_fn</b> to simple member functions, and also its use with a
shared pointer&nbsp; as the second parameter:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>cla=
ss A2</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pro=
tected:</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 int
i;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pub=
lic:=A0=A0=A0
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
A2(int k):i(k) {}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
get()const -&gt;int { return i;}=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
getv() volatile -&gt;int { return i;}=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
get_plus100() const volatile -&gt;int { return i+100;}=A0=A0=A0=A0=A0 </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
set(int v)-&gt;void { i =3D v;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
inc(int g)-&gt;int&amp; { i+=3Dg; return i;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
incp(int&amp; g)-&gt;int&amp; { g+=3Di; return g;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
f8 (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) const -=
&gt;
int</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 {</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0=A0=A0=A0=A0
return i+a1+a2+a3+a4+a5+a6+a7+a8;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
}=A0=A0=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>};<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>cla=
ss A3:
public A2</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{=
=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pub=
lic:=A0=A0=A0
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
A3(int k):A2(k) {}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
get()const -&gt;int { return i*i;}=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
get3()const -&gt;int { return i*i*i;}=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>};<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>int
main()</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 A2
a(11);=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
get2 =3D std::mem_fn(&amp;A2::get,a);=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;for a get2: &quot; &lt;&lt; get2() &lt;&lt;
std::endl;=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 {</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0=A0=A0=A0=A0
A2 b(25);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0=A0=A0=A0=A0
get2 =3D std::mem_fn(&amp;A2::get, b);=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
}=A0=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;for b get2: &quot; &lt;&lt; get2() &lt;&lt;
std::endl;=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
a_get1 =3D std::mem_fn(&amp;A2::get);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
a_get_plus100 =3D std::mem_fn(&amp;A2::get_plus100,a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;get1: &quot; &lt;&lt; a_get1(&amp;a) &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a_get_plus100: &quot; &lt;&lt;=A0 a_get_plus100()
&lt;&lt; std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
 =A0=A0auto
set1 =3D std::mem_fn(&amp;A2::set, &amp;a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::shared_ptr&lt;A2&gt; sh_a(new A2(22));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
inc =3D std::mem_fn(&amp;A2::inc, sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
incp =3D std::mem_fn(&amp;A2::incp, sh_a); </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 std::unique_ptr&lt;A2&gt;
u_a(new A2(22));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
u_inc =3D std::mem_fn(&amp;A2::inc, std::move(u_a));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b><b><span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>int
ux =3D 5;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>=A0=A0=A0
int u_k =3D u_inc(ux);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>=A0=A0=A0
</span></b><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:=
"Anonymous Pro"'>std::cout
&lt;&lt; &quot;unique u_k: &quot; &lt;&lt;=A0 u_k &lt;&lt; std::endl;</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
af8=A0 =3D std::mem_fn(&amp;A2::f8,sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
b_af8 =3D std::bind(&amp;A2::f8, sh_a, _1, _2, _3, _4, _5, _6, _7, _8);=A0=
=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
set1(15);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a.get():&quot; &lt;&lt; a.get() &lt;&lt; std::endl=
;=A0=A0=A0
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
sh_get=A0 =3D std::mem_fn(&amp;A2::get,sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;sh_get:&quot; &lt;&lt; sh_get() &lt;&lt; std::endl=
;=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 int x
=3D 5;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 int k
=3D inc(x);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
int&amp; k2 =3D incp(x);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 k2 *=3D
7;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a.get():&quot; &lt;&lt; a.get() &lt;&lt;
std::endl;=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;k: &quot; &lt;&lt; k &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;x: &quot; &lt;&lt; x &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;af8(1,2,3,4,5,6,7,8): &quot; &lt;&lt;
af8(1,2,3,4,5,6,7,8) &lt;&lt; std::endl;=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 std::cout
&lt;&lt; &quot;b_af8(1,2,3,4,5,6,7,8): &quot; &lt;&lt; b_af8(1,2,3,4,5,6,7,=
8)
&lt;&lt; std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
volatile A2 av(45);=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
getv2 =3D std::mem_fn(&amp;A2::getv,&amp;av);=A0=A0=A0=A0=A0=A0 </span></b>=
</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;volatile getv2:&quot; &lt;&lt; getv2() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 const
A2 ac(7);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
getc =3D std::mem_fn(&amp;A2::get,ac);=A0=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;getc: &quot; &lt;&lt; getc() &lt;&lt; std::endl;</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 A3
a3(5);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
getv3 =3D std::mem_fn(&amp;A2::getv,a3);=A0=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 std::cout
&lt;&lt; &quot;getv3: &quot; &lt;&lt; getv3() &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
a3_A2get =3D std::mem_fn(&amp;A2::get,&amp;a3);=A0=A0=A0=A0=A0=A0 </span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a3_A2get: &quot; &lt;&lt; a3_A2get() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
a3_A2getv =3D std::mem_fn(&amp;A2::getv,&amp;a3);=A0=A0=A0=A0=A0=A0 </span>=
</b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a3_A2getv: &quot; &lt;&lt; a3_A2getv() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
a3_get =3D std::mem_fn(&amp;A3::get,&amp;a3);=A0=A0=A0=A0=A0=A0 </span></b>=
</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a3_get: &quot; &lt;&lt; a3_get() &lt;&lt; std::end=
l;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
a3_get1 =3D std::mem_fn(&amp;A3::get3,&amp;a3);=A0=A0=A0=A0=A0=A0 </span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;a3_get1: &quot; &lt;&lt; a3_get1() &lt;&lt;
std::endl;=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
r_get =3D std::mem_fn(&amp;A2::get,std::ref(ac));=A0=A0=A0=A0=A0=A0 </span>=
</b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0
std::cout &lt;&lt; &quot;r_get: &quot; &lt;&lt; r_get() &lt;&lt; std::endl;=
 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 const
A2&amp; ref_a2 =3D ac;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 auto
ref_get =3D=A0 std::mem_fn(&amp;A2::get,ref_a2);=A0=A0=A0=A0=A0=A0 </span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>std::cout
&lt;&lt; &quot;ref_get: &quot; &lt;&lt; ref_get() &lt;&lt; std::endl;</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>}</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal>This program will print:</p>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>for a get2: 11</span></span></h=
3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>for b get2: 25</span></span></h=
3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>get1: 11</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a_get_plus100: 111</span></span=
></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
lang=3DFR style=3D'font-size:12.0pt;line-height:115%'>unique u_k: 27</span>=
</span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
lang=3DFR style=3D'font-size:12.0pt;line-height:115%'>a.get():15</span></sp=
an></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>sh_get:22</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a.get():15</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>k: 27</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>x: 224</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>af8(1,2,3,4,5,6,7,8): 63</span>=
</span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>b_af8(1,2,3,4,5,6,7,8): 63</spa=
n></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>volatile getv2:45</span></span>=
</h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>getc: 7</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>getv3: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_A2get: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_A2getv: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_get: 25</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_get1: 125</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>r_get: 7</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>ref_get: 7 </span></span></h3>

<h3><span class=3DMsoIntenseEmphasis><u>Example 2.</u></span></h3>

<p class=3DMsoNormal>This program&nbsp; shows how to apply <b>mem_fn</b> to=
&nbsp;
overloaded member functions:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;iostream&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;functional&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;vector&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>class
B</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
double x;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; y;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>public:</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>&nbsp;&nbsp;&nbsp;
B(double x1):x(x1),y(3) </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>&nbsp;&nbsp;&nbsp;
</span></strong><strong><span style=3D'font-size:11.0pt;font-family:"Anonym=
ous Pro"'>{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[0] =3D 1.5;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[1] =3D 2.7;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[2] =3D 4.9;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; add_vector(std::vector&lt;double&gt;&amp;&amp; z)=
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;move&quot; &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; <=
/span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
z[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return std::move(z);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; add_vector(const std::vector&lt;double&gt;&amp; z=
)
const</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;copy&quot; &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; <=
/span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; c(z);&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
c[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return c;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
void add_vector(std::vector&lt;double&gt;&amp; z)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;out&quot; &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
z[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>};</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>int
main()</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>{&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
B b(3.5);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v(3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[0] =3D 10.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[1] =3D 100.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[2] =3D 1000.0;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_copy =3D std::mem_fn(static_cast&lt;std::vector&lt;double=
&gt;(B::*)(const
std::vector&lt;double&gt;&amp;) const&gt;(&amp;B::add_vector), &amp;b); </s=
pan></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v1 =3D b_add_vector_copy(v); </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v.size(): &quot; &lt;&lt; v.size() &lt;&lt; std::e=
ndl;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v1: &quot; &lt;&lt; v1[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_move =3D
std::mem_fn(static_cast&lt;std::vector&lt;double&gt;(B::*)(std::vector&lt;d=
ouble&gt;&amp;&amp;)&gt;(&amp;B::add_vector),&amp;b);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v2 =3D b_add_vector_move(std::move(v));</span></s=
trong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v.size(): &quot; &lt;&lt; v.size() &lt;&lt; std::e=
ndl;
// v size is now 0</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v2: &quot; &lt;&lt; v2[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v3(3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[0] =3D 10.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[1] =3D 100.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[2] =3D 1000.0;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_ref =3D
std::mem_fn(static_cast&lt;void(B::*)(std::vector&lt;double&gt;&amp;)&gt;(&=
amp;B::add_vector),&amp;b);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
b_add_vector_ref(v3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v3: &quot; &lt;&lt; v3[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>This program will print:</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>cop=
y</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v.s=
ize():
3</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:
1004.9</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>mov=
e</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v.s=
ize():
0</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:
1004.9</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>out=
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:
1004.9</span></strong></p>

<p class=3DMsoNormal>&nbsp;</p>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>3.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Implementation</h2>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>namespace =
std</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;_P&amp;,_SIG _T&amp;&gt;::value, _=
SIG
_T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
static_cast&lt;_SIG _T&amp;&gt;(x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef2(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;typename _P::element_type&amp;, _S=
IG
_T&amp;&gt;::value, _SIG _T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
static_cast&lt;_SIG _T&amp;&gt;(*x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef3(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;_P, _SIG _T*&gt;::value, _SIG
_T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0_getRef=
 ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
*static_cast&lt;_SIG _T*&gt;(x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef4(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;typename _P::result_type&amp;, _SI=
G
_T&amp;&gt;::value, _SIG _T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
static_cast&lt;_SIG _T&amp;&gt;(x.get());\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate2(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R, class _Arg1, class _Arg2, class ... _Arg&gt;\=
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate2
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typename
std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
</span></b><b><span
lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>_R (_T::*f1)(_Arg=
1,
_Arg2, _Arg ... ) </span></b><b><span style=3D'font-size:10.0pt;font-family=
:Consolas'>_SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>public:\</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef
_Arg1 first_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef
_Arg2 second_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef _R
return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_delegate2
## _NAME(_R (_T::*_fx)(_Arg1, _Arg2, _Arg ... ) _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_R
operator()(_Arg1 _x1, _Arg2 _x2, _Arg ...=A0 _x) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0=
=A0=A0=A0=A0 return
(_getRef ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1),
std::forward&lt;_Arg2&gt;(_x2), std::forward&lt;_Arg&gt;(_x) ...);\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R, class _Arg1&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate1
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typename
std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
</span></b><b><span
lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>_R (_T::*f1)(_Arg=
1)
_SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
=A0=A0=A0 </span></b><b><span
style=3D'font-size:10.0pt;font-family:Consolas'>typedef _Arg1 argument_type=
;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef _R
return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_delegate1
## _NAME(_R (_T::*_fx)(_Arg1) _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_R
operator()(_Arg1 _x1) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0=
=A0=A0=A0=A0 return
(_getRef=A0 ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1));\</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate0(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate0
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typename
std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
</span></b><b><span
lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>_R (_T::*f1)() _S=
IG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
=A0=A0=A0 </span></b><b><span
style=3D'font-size:10.0pt;font-family:Consolas'>typedef _R return_type;\</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_delegate0
## _NAME(_R (_T::*_fx)() _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_R
operator()() _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0=
=A0=A0=A0=A0 return
(_getRef=A0 ## _NAME(f1, _obj).*f1)();\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_param_delegate1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R, class _Arg1, class ... _Arg&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class
_one_p_delegate1 ## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
=A0=A0=A0 _R
(_T::*f1)(_Arg1, _Arg ... ) _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>public:\</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef _SIG
_T* first_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef
_Arg1 second_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef _R
return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0
_one_p_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg ... ) _SIG):f1(_fx)\</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0
template&lt;class _OBJECT&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_R
operator()(_OBJECT _obj,_Arg1 _x1, _Arg ...=A0 _x) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0=
=A0=A0=A0=A0 return
(_getRef=A0 ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1),
std::forward&lt;_Arg&gt;(_x) ...);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_param_delegate0(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class
_one_p_delegate0 ## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
=A0=A0=A0 _R
(_T::*f1)() _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
=A0=A0=A0 </span></b><b><span
style=3D'font-size:10.0pt;font-family:Consolas'>typedef _SIG _T* argument_t=
ype;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
typedef _R
return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0
_one_p_delegate0 ## _NAME(_R (_T::*_fx)() _SIG):f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0
template&lt;class _OBJECT&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
_R
operator()(_OBJECT _obj) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0=
=A0=A0=A0=A0 return
(_getRef=A0 ## _NAME(f1, _obj).*f1)();\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro2(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R, class _Arg1, class _Arg2, class ... _Arg&gt;\<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate2=
 ##
_NAME&lt;_OBJECT,_T,_R,_Arg1, _Arg2, _Arg ... </span></b><b><span lang=3DFR
style=3D'font-size:10.0pt;font-family:Consolas'>&gt; mem_fn(_R (_T::*_f)(_A=
rg1, _Arg2,
_Arg ... ) </span></b><b><span style=3D'font-size:10.0pt;font-family:Consol=
as'>_SIG,
_OBJECT&amp;&amp; _obj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
_delegate2 ## _NAME &lt;_OBJECT,_T,_R, _Arg1, _Arg2, _Arg ... &gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro1(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R, class _Arg1&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate1=
 ##
_NAME&lt;_OBJECT,_T,_R,_Arg1&gt; mem_fn(_R (_T::*_f)(_Arg1) _SIG,
_OBJECT&amp;&amp; _obj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
_delegate1 ## _NAME &lt;_OBJECT,_T,_R, _Arg1&gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro0(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate0=
 ##
_NAME&lt;_OBJECT,_T,_R&gt; mem_fn(_R (_T::*_f)() _SIG, _OBJECT&amp;&amp; _o=
bj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
_delegate0 ## _NAME &lt;_OBJECT,_T,_R&gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_p_mem_fn_macro1(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R, class _Arg1, class ... _Arg&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_del=
egate1
## _NAME&lt;_T,_R,_Arg1, _Arg ... </span></b><b><span lang=3DFR style=3D'fo=
nt-size:
10.0pt;font-family:Consolas'>&gt; mem_fn(_R (_T::*_f)(_Arg1, _Arg ... ) </s=
pan></b><b><span
style=3D'font-size:10.0pt;font-family:Consolas'>_SIG)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
_one_p_delegate1 ## _NAME &lt;_T,_R,_Arg1, _Arg ... &gt;(_f);\</span></b></=
p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_p_mem_fn_macro0(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_del=
egate0
## _NAME&lt;_T,_R&gt; mem_fn(_R (_T::*_f)() _SIG)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
_one_p_delegate0 ## _NAME &lt;_T,_R&gt;(_f);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'>&nbsp;</p>

</div>

</body>

</html>

------=_Part_167_21824788.1379855402808--

.


Author: tomaszkam@gmail.com
Date: Sun, 22 Sep 2013 06:25:02 -0700 (PDT)
Raw View
------=_Part_243_30512498.1379856302865
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

W dniu niedziela, 22 wrze=B6nia 2013 15:10:02 UTC+2 u=BFytkownik Mikhail=20
Semenov napisa=B3:
>
> Tomasz,
> Well spotted.  I have put a revised version, which includes the support=
=20
> for unique pointers and reference wrappers for the second parameter.
> =20
> Mikhail. =20
>
There spelling mistake in the singature: the *ObjT *obj should become* **Ob=
jT&&=20
obj.*

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_243_30512498.1379856302865
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">W dniu niedziela, 22 wrze=B6nia 2013 15:10:02 UTC+2 u=BFyt=
kownik Mikhail Semenov napisa=B3:<blockquote class=3D"gmail_quote" style=3D=
"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex=
;"><div dir=3D"ltr"><div>Tomasz,<br></div><div>Well spotted.&nbsp; I have p=
ut a revised version, which includes the support for unique pointers and re=
ference wrappers for the second parameter.</div><div>&nbsp;</div><div>Mikha=
il.&nbsp; <br></div></div></blockquote><div>There spelling mistake in the s=
ingature: the <b><span style=3D"font-size:11.0pt;font-family:Consolas">ObjT=
 </span></b><span style=3D"font-size:11.0pt;font-family:Consolas">obj shoul=
d become</span><b><span style=3D"font-size:11.0pt;font-family:Consolas"> </=
span></b><b><span style=3D"font-size:11.0pt;font-family:Consolas">ObjT&amp;=
&amp; obj.</span></b></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_243_30512498.1379856302865--

.


Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Sun, 22 Sep 2013 06:46:50 -0700 (PDT)
Raw View
------=_Part_7_1231733.1379857610536
Content-Type: multipart/alternative;
 boundary="----=_Part_8_17889945.1379857610536"

------=_Part_8_17889945.1379857610536
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

Revised proposal: support for a unique pointer and reference wrapper as a=
=20
second parameter is added. The second parameter can be move-constructible=
=20
now.
=20

On Saturday, September 21, 2013 9:32:58 PM UTC+1, toma...@gmail.com wrote:

> The paper has the same drawback as the first version of the my not_fn=20
> proposal. It will not work if the second argument is rvalue reference for=
=20
> move only type (ex. unique_ptr or jsut class object). Example:
>
> std::men_fn(&C::f. std:make_unique<C>());
>
> The solutions would be to change wording to:
>
> template<class R, class T, class ObjT, class =E2 EURO | Arg>=20
>
>                             unspecified mem_fn(R T::* pm, ObjT&& obj);
>
>
> **
>
> *//Here introduce names OjbTD for std::decay_t<ObjT> and objd for object=
=20
> constructed from std::forward<ObjT>(obj);
> *
>
> *
> *
>
> *Requires: *std::is_constructible<ObjTD, ObjT>::value is true.
>
>
> *Returns:** A simple call wrapper (20.10.1) *fn* such that the expression=
=20
> **fn(a1, ..., aN)** is equivalent to **INVOKE(pm, <del>obj</del>=20
> <ins>objd</ins>, a1,=E2 EURO |aN)**.*
>
> **
>
>
> *Throws: Nothing unless construction of *objd* throws.*
>
> *Remarks: **//Info that returned object should be moveable and copyable=
=20
> if ObjTD is copyable.**
> *
> For a detailed wording you may reference bind wording or my proposal=20
> https://github.com/tomaszkam/proposals/blob/master/A%20proposal%20to%20ad=
d%20a%20generalized%20callable%20negator.html
>
> W dniu sobota, 21 wrze=B6nia 2013 21:01:21 UTC+2 u=BFytkownik Mikhail Sem=
enov=20
> napisa=B3:
>>
>> The revised version has an improved implementation, which allows to pass=
=20
>> objects, pointers to objects and smart pointers as the second parameter =
to=20
>> mem_fn.=20
>>
>
>

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_8_17889945.1379857610536
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Revised proposal: support for a unique pointer and re=
ference wrapper as a second parameter is added. The second parameter can be=
 move-constructible now.</div><div>&nbsp;</div><div><br>On Saturday, Septem=
ber 21, 2013 9:32:58 PM UTC+1, toma...@gmail.com wrote:</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; =
border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-=
style: solid;"><div dir=3D"ltr">The paper has the same drawback as the firs=
t version of the my not_fn proposal. It will not work if the second argumen=
t is rvalue reference for move only type (ex. unique_ptr or jsut class obje=
ct). Example:<br><br>std::men_fn(&amp;C::f. std:make_unique&lt;C&gt;());<br=
><br>The solutions would be to change wording to:<br><br><p class=3D"MsoNor=
mal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-height: normal;"><span st=
yle=3D"font-family: Consolas; font-size: 11pt;">template&lt;class R, class =
T,
class ObjT, class =E2&euro;&brvbar; Arg&gt; </span></p>

<p class=3D"MsoNormal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-height:=
 normal;"><span style=3D"font-family: Consolas; font-size: 11pt;">&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
unspecified mem_fn(R T::* pm, ObjT&amp;&amp; obj);</span></p>

<p class=3D"MsoNormal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-height:=
 normal;"><br><i><span style=3D"font-size: 11pt;"></span></i></p><p class=
=3D"MsoNormal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-height: normal;=
"><i><span style=3D"font-size: 11pt;">//Here introduce names OjbTD for std:=
:decay_t&lt;ObjT&gt; and objd for object constructed from std::forward&lt;O=
bjT&gt;(obj);<br></span></i></p><p class=3D"MsoNormal" style=3D"margin: 0cm=
 46.8pt 0pt 14.2pt; line-height: normal;"><i><span style=3D"font-size: 11pt=
;"><br></span></i></p>

<p class=3D"MsoNormal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-height:=
 normal;"><i><span style=3D"font-size: 11pt;">Requires: </span></i><span st=
yle=3D"font-family: Consolas; font-size: 11pt;">std::is_constructible&lt;Ob=
jTD, ObjT&gt;::value</span><span style=3D"font-family: Consolas; font-size:=
 11pt;"></span> is true.</p><p class=3D"MsoNormal" style=3D"margin: 0cm 46.=
8pt 0pt 14.2pt; line-height: normal;"><br></p><p class=3D"MsoNormal" style=
=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-height: normal;"><strong><i><span s=
tyle=3D'line-height: 115%; font-family: "Times New Roman","serif"; font-siz=
e: 11pt;'>Returns:</span></i></strong><strong><span style=3D'line-height: 1=
15%; font-family: "Times New Roman","serif"; font-size: 11pt; font-weight: =
normal;'> A simple call wrapper (20.10.1) </span></strong><span><span style=
=3D'line-height: 115%; font-family: "Times New Roman","serif"; font-size: 1=
1pt;'>fn</span></span><strong><span style=3D'line-height: 115%; font-family=
: "Times New Roman","serif"; font-size: 11pt; font-weight: normal;'> such t=
hat the expression </span></strong><strong><span style=3D'line-height: 115%=
; font-family: "Times New Roman","serif"; font-size: 11pt;'>fn(a1,
...., aN)</span></strong><strong><span style=3D'line-height: 115%; font-fami=
ly: "Times New Roman","serif"; font-size: 11pt; font-weight: normal;'> is e=
quivalent to </span></strong><strong><span style=3D'line-height: 115%; font=
-family: "Times New Roman","serif"; font-size: 11pt;'>INVOKE(pm, &lt;del&gt=
;obj&lt;/del&gt; &lt;ins&gt;objd&lt;/ins&gt;, a1,=E2&euro;&brvbar;aN)</span=
></strong><strong><span style=3D'line-height: 115%; font-family: "Times New=
 Roman","serif"; font-size: 11pt; font-weight: normal;'>.</span></strong></=
p><p class=3D"MsoNormal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-heigh=
t: normal;"><strong><span style=3D'line-height: 115%; font-family: "Times N=
ew Roman","serif"; font-size: 11pt; font-weight: normal;'></span></strong><=
/p><p class=3D"MsoNormal" style=3D"margin: 0cm 46.8pt 0pt 14.2pt; line-heig=
ht: normal;"><br></p><p class=3D"MsoNormal" style=3D"margin-left: 14.2pt;">=
<strong><strong><strong><i><span style=3D'line-height: 115%; font-family: "=
Times New Roman","serif"; font-size: 11pt;'>Throws:
</span></i><strong><span style=3D'line-height: 115%; font-family: "Times Ne=
w Roman","serif"; font-size: 11pt; font-weight: normal;'>Nothing unless con=
struction of </span></strong></strong></strong></strong><span style=3D'line=
-height: 115%; font-family: "Times New Roman","serif"; font-size: 11pt;'>ob=
jd</span><strong><strong><strong><strong><span style=3D'line-height: 115%; =
font-family: "Times New Roman","serif"; font-size: 11pt; font-weight: norma=
l;'> throws</span><span style=3D'line-height: 115%; font-family: "Times New=
 Roman","serif"; font-size: 11pt;'>.</span></strong></strong></strong></str=
ong></p><p class=3D"MsoNormal" style=3D"margin-left: 14.2pt;"><strong><span=
 style=3D'line-height: 115%; font-family: "Times New Roman","serif"; font-s=
ize: 11pt;'>Remarks: </span></strong><i><span style=3D'line-height: 115%; f=
ont-family: "Times New Roman","serif"; font-size: 11pt;'></span><span style=
=3D'line-height: 115%; font-family: "Times New Roman","serif"; font-size: 1=
1pt;'></span><span style=3D'line-height: 115%; font-family: "Times New Roma=
n","serif"; font-size: 11pt;'></span><span style=3D'line-height: 115%; font=
-family: "Times New Roman","serif"; font-size: 11pt;'>//Info that returned =
</span><span style=3D'line-height: 115%; font-family: "Times New Roman","se=
rif"; font-size: 11pt;'></span><span style=3D'line-height: 115%; font-famil=
y: "Times New Roman","serif"; font-size: 11pt;'>objec</span><span style=3D'=
line-height: 115%; font-family: "Times New Roman","serif"; font-size: 11pt;=
'>t should be moveable and copyable if ObjTD is copyable.</span></i><strong=
><span style=3D'line-height: 115%; font-family: "Times New Roman","serif"; =
font-size: 11pt;'><br></span></strong></p>For a detailed wording you may re=
ference bind wording or my proposal <a href=3D"https://github.com/tomaszkam=
/proposals/blob/master/A%20proposal%20to%20add%20a%20generalized%20callable=
%20negator.html" target=3D"_blank">https://github.com/tomaszkam/<wbr>propos=
als/blob/master/A%<wbr>20proposal%20to%20add%20a%<wbr>20generalized%20calla=
ble%<wbr>20negator.html</a><br><br>W dniu sobota, 21 wrze=B6nia 2013 21:01:=
21 UTC+2 u=BFytkownik Mikhail Semenov napisa=B3:<blockquote class=3D"gmail_=
quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-c=
olor: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;=
"><div dir=3D"ltr">The revised version has an&nbsp;improved implementation,=
 which allows to pass objects, pointers to objects and smart pointers as&nb=
sp;the second parameter to mem_fn. </div></blockquote><br></div></blockquot=
e></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_8_17889945.1379857610536--
------=_Part_7_1231733.1379857610536
Content-Type: text/html; charset=windows-1252; name=mem_fn_revised.htm
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=mem_fn_revised.htm
X-Attachment-Id: f91b1932-c0f1-43ef-824b-3e55f4847a7a
Content-ID: <f91b1932-c0f1-43ef-824b-3e55f4847a7a>

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindows-125=
2">
<meta name=3DGenerator content=3D"Microsoft Word 14 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
=09{font-family:SimSun;
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:"Cambria Math";
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Cambria;
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Calibri;
=09panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
=09{font-family:Verdana;
=09panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
=09{font-family:"Anonymous Pro";
=09panose-1:2 6 6 9 3 2 2 0 5 4;}
@font-face
=09{font-family:"Segoe UI";
=09panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
=09{font-family:"\@SimSun";
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:Consolas;
=09panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
=09{font-family:"Trebuchet MS";
=09panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
=09{font-family:"Arial Rounded MT Bold";
=09panose-1:2 15 7 4 3 5 4 3 2 4;}
@font-face
=09{font-family:LMMono10-Regular;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
=09{margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
h1
=09{mso-style-link:"Heading 1 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:16.0pt;
=09font-family:"Verdana","sans-serif";}
h2
=09{mso-style-link:"Heading 2 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:15.0pt;
=09font-family:"Times New Roman","serif";}
h3
=09{mso-style-link:"Heading 3 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:13.0pt;
=09font-family:"Cambria","serif";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
=09{mso-style-link:"Header Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
=09{mso-style-link:"Footer Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
=09{color:blue;
=09text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
=09{color:purple;
=09text-decoration:underline;}
strong
=09{font-family:"Calibri","sans-serif";}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
=09{margin:0cm;
=09margin-bottom:.0001pt;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
=09{margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:36.0pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoQuote, li.MsoQuote, div.MsoQuote
=09{mso-style-link:"Quote Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Trebuchet MS","sans-serif";
=09color:black;
=09font-style:italic;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
=09{mso-style-link:"Intense Quote Char";
=09margin-top:10.0pt;
=09margin-right:46.8pt;
=09margin-bottom:14.0pt;
=09margin-left:46.8pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Arial Rounded MT Bold","sans-serif";
=09font-weight:bold;}
span.MsoIntenseEmphasis
=09{font-family:"Trebuchet MS","sans-serif";
=09color:windowtext;
=09font-weight:bold;
=09font-style:normal;}
span.Heading1Char
=09{mso-style-name:"Heading 1 Char";
=09mso-style-link:"Heading 1";
=09font-family:"Verdana","sans-serif";
=09font-weight:bold;}
span.Heading2Char
=09{mso-style-name:"Heading 2 Char";
=09mso-style-link:"Heading 2";
=09font-family:"Times New Roman","serif";
=09font-weight:bold;}
span.Heading3Char
=09{mso-style-name:"Heading 3 Char";
=09mso-style-link:"Heading 3";
=09font-family:"Cambria","serif";
=09font-weight:bold;}
span.HeaderChar
=09{mso-style-name:"Header Char";
=09mso-style-link:Header;
=09font-family:"Times New Roman","serif";}
span.FooterChar
=09{mso-style-name:"Footer Char";
=09mso-style-link:Footer;
=09font-family:"Times New Roman","serif";}
span.QuoteChar
=09{mso-style-name:"Quote Char";
=09mso-style-link:Quote;
=09font-family:"Trebuchet MS","sans-serif";
=09color:black;
=09font-style:italic;}
span.IntenseQuoteChar
=09{mso-style-name:"Intense Quote Char";
=09mso-style-link:"Intense Quote";
=09font-family:"Arial Rounded MT Bold","sans-serif";
=09font-weight:bold;}
p.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparag=
raphcxspfirst
=09{mso-style-name:msolistparagraphcxspfirst;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:0cm;
=09margin-left:36.0pt;
=09margin-bottom:.0001pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistpar=
agraphcxspmiddle
=09{mso-style-name:msolistparagraphcxspmiddle;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:0cm;
=09margin-left:36.0pt;
=09margin-bottom:.0001pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagra=
phcxsplast
=09{mso-style-name:msolistparagraphcxsplast;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:36.0pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.ecxmsonormal, li.ecxmsonormal, div.ecxmsonormal
=09{mso-style-name:ecxmsonormal;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:16.2pt;
=09margin-left:0cm;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
=09{mso-style-name:msochpdefault;
=09margin-right:0cm;
=09margin-left:0cm;
=09font-size:10.0pt;
=09font-family:"Calibri","sans-serif";}
span.unsafesenderemail1
=09{mso-style-name:unsafesenderemail1;}
..MsoChpDefault
=09{font-size:10.0pt;
=09font-family:"Calibri","sans-serif";}
@page WordSection1
=09{size:595.3pt 841.9pt;
=09margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
=09{page:WordSection1;}
-->
</style>

</head>

<body lang=3DEN-GB link=3Dblue vlink=3Dpurple>

<div class=3DWordSection1>

<table class=3DMsoNormalTable border=3D0 cellspacing=3D0 cellpadding=3D0 wi=
dth=3D619
 style=3D'width:464.25pt;border-collapse:collapse'>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Document number:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'></td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Date:</span></p>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Revises:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>2013-09-22</span></p>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>N3702</span></p>
  </td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Project:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Programming Language C++, Librar=
y
  Working Group</span></p>
  </td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Reply-to:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Mikhail Semenov&lt;<span
  class=3Dunsafesenderemail1><span style=3D'color:black'>mikhailsemenov1957=
@gmail.com</span></span>&gt;</span></p>
  </td>
 </tr>
</table>

<h1>&nbsp;</h1>

<h1 align=3Dcenter style=3D'text-align:center'><span style=3D'font-size:15.=
0pt;
line-height:115%'>Introducing an optional parameter for </span><strong><spa=
n
style=3D'font-size:15.0pt;line-height:115%'>mem_fn</span></strong><span
style=3D'font-size:15.0pt;line-height:115%'>, which allows to bind an objec=
t to
its member function</span></h1>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>1.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Introduction</h2>

<p class=3DMsoNormal>When a member function is used as a parameter to anoth=
er
function (the latter is usually called a <b><i>functional</i></b>) it is of=
ten
necessary to provide the corresponding class object as a parameter as well.=
 But
functionals, like for example an integral, are often written to accept one
global function. In cases when a member function and an object are needed, =
it
is necessary to bind them together,&nbsp; so that the result can be supplie=
d to
the corresponding functional as one parameter. Let us consider the followin=
g
functional <b>integrate </b>(it can be part of&nbsp; a library):&nbsp;</p>

<p class=3DMsoNormal><strong><span lang=3DFR>double
integrate(std::function&lt;double(double, double, double, double, double)&g=
t;
f,</span></strong></p>

<p class=3DMsoNormal><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;
double x1, double x2, double y1, double y2, double z1, double z2,&nbsp; dou=
ble
a1, double a2, double b1, double b2)&nbsp;;</span></strong></p>

<p class=3DMsoNormal>We need to call <b>integrate</b> with&nbsp; the
parameterized function <b>fa</b>, which is defined as a member of the class=
 <b>A</b>:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><str=
ong>class
A</strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><str=
ong>{</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; double p;</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>public:</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; A(double p1):p(p1) {}</s=
trong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; void set_param(double p1=
)
{&nbsp; p =3D p1; }</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; double fa(double x, doub=
le
y, double z, double a, double b);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>};</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>&nbsp;</p>

<p class=3DMsoNormal>The member-variable&nbsp; <b>p</b> is a &quot;hidden&q=
uot;
parameter of the function <b>fa</b>. We create an object:</p>

<p class=3Decxmsonormal style=3D'background:white'><strong><span style=3D'f=
ont-size:
11.0pt'>A a(5.0);</span></strong></p>

<p class=3Decxmsonormal style=3D'background:white'>If we want to call <b>in=
tegrate</b>
with <b>a.fa</b>&nbsp; we have three options:</p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong><span style=3D'font-weight:normal'>(1)</span></strong><stron=
g><span
style=3D'font-size:7.0pt;font-family:"Times New Roman","serif"'>&nbsp;&nbsp=
; </span>double
r =3D </strong><strong><span style=3D'font-size:10.5pt;font-family:"Segoe U=
I","sans-serif";
color:black'>&nbsp;</span>integrate(std::bind(&amp;A::fa, &amp;a, _1, _2, _=
3,
_4, _5), x1, x2, y1,y2, z1, z2,&nbsp;&nbsp; </strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;background:white'><strong>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
a1, a2, b1, b2);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;</strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong><span style=3D'font-weight:normal'>(2)</span></strong><stron=
g><span
style=3D'font-size:7.0pt;font-family:"Times New Roman","serif";font-weight:=
normal'>&nbsp;&nbsp;
</span></strong><span style=3D'font-size:10.5pt;font-family:"Segoe UI","san=
s-serif";
color:black'>&nbsp;</span><strong>double r =3D integrate</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</strong><strong><span lang=3DFR>([&amp;a](double x, double y, double z, do=
uble
a, double b) { return a.fa(x, y, z, a, b);},&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);&nbsp;</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></strong><strong><span
style=3D'font-weight:normal'>(3)</span>&nbsp;&nbsp; </strong><strong><span
style=3D'font-weight:normal'>define a global function (a wrapper), which we=
 will
use as a&nbsp; parameter to the function </span>integrate</strong><strong><=
span
style=3D'font-weight:normal'>:</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;
double f(double x, double y, double z, double a, double b) { return
a.fa(x,y,z,a,b); }</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
=85</strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double r =
=3D
integrate(f, x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </stro=
ng></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>In all these examples, if the function <b>fa</b> had more
parameters we would have to write even a longer statement. </p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>&nbsp;</p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>It would be much more convenient to be able to write
something like this:</p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
line-height:150%;background:white'><strong>double r =3D integrate(<i>some_b=
inder</i>(&amp;A::fa,
&amp;a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);&nbsp;</strong></p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>which looks more simple and clearer</span></strong><str=
ong><span
style=3D'font-family:SimSun;font-weight:normal'>.</span></strong></p>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>2.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Proposal</h2>

<p class=3DMsoNormal>The proposal is to allow <b>mem_fn</b> to accept a sec=
ond,
optional parameter. The full definition is as follows (the first option is =
the
same as in <b>N3690, </b>section<b> 20.10.10</b>):</p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:Consolas'>template&lt;class R, class T&=
gt;
unspecified mem_fn(R T::* pm);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Returns:</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> A simple call wrapper (20.10.1) </span></strong><stron=
g><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> such that the expression </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>fn(t, a2, ..., aN)</span></span><str=
ong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is equivalent to </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>INVOKE (pm, t, a2, ..., aN)</span></=
span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> (20.10.2). </span></strong><span class=3DIntenseQuoteC=
har><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn
</span></span><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>shall have a nest=
ed
type </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-siz=
e:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>result_type</span><=
/span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> that is a synonym for the return type of </span></stro=
ng><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> when </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define two nested types named </span></strong><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>argument_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>result_type</span><=
/strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>cv</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> </span></strong><strong><span style=3D'font-size:11.0p=
t;
line-height:115%;font-family:"Times New Roman","serif"'>T*</span></strong><=
strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></strong>=
<strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function with <i>cv-</i>qualifi=
er </span></strong><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>cv</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and taking no arguments, where </span></strong><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>&nbsp; is </span></strong><span class=3DIntenseQuoteCha=
r><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define three nested types named </span></strong><=
span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>first_argument_type</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, </span></strong><span class=3DIntenseQuoteChar><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>second_argument_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, and </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif"'>cv</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>&nbsp;
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T*</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T1</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><span class=3DIntenseQuoteChar><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function with </span></strong><=
span
class=3DQuoteChar><b><span style=3D'font-size:11.0pt;line-height:115%;font-=
family:
"Times New Roman","serif"'>cv-</span></b></span><strong><span style=3D'font=
-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>qualifier
</span></strong><span class=3DIntenseQuoteChar><i><span style=3D'font-size:=
11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>cv</span></i></span=
><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and taking one argument of type </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T1</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Throws:
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>Nothing</span></s=
trong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Trebuchet MS","sans=
-serif";
font-weight:normal'>.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>template&lt;class R, class =
T,
class ObjT, class </span></b><b><span style=3D'font-size:8.0pt;font-family:=
Consolas'>.
.. .</span></b><b><span style=3D'font-size:11.0pt;font-family:Consolas'> Arg=
&gt; </span></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
unspecified mem_fn(R T::* pm, ObjT&amp;&amp; obj);</span></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><i><spa=
n
style=3D'font-size:11.0pt'>&nbsp;</span></i></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:0cm;margin-bottom=
:0cm;
margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal;text-autospace:
none'><b><i><span style=3D'font-size:11.0pt'>Requires: </span></i></b><span
style=3D'font-size:11.0pt'>The type<b> ObjTD, </b>which is <b>std::decay&lt=
;</b></span><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>ObjT&gt;::type</span></b><s=
pan
style=3D'font-size:11.0pt;font-family:Consolas'>,<b> </b></span><span
style=3D'font-size:11.0pt'>shall be </span><b><span style=3D'font-size:11.0=
pt;
font-family:Consolas'>MoveConstructible</span></b><span style=3D'font-size:=
11.0pt;
font-family:Consolas'> </span><span style=3D'font-size:11.0pt'>and <b>is_co=
nstructible&lt;
ObjTD, ObjT&gt;::value</b></span><span style=3D'font-size:10.0pt;font-famil=
y:
LMMono10-Regular'> </span><span style=3D'font-size:11.0pt'>shall be true</s=
pan><span
style=3D'font-size:10.0pt;font-family:LMMono10-Regular'>. </span><span
style=3D'font-size:11.0pt'>An object <strong><span style=3D'font-family:"Ti=
mes New Roman","serif"'>objd</span></strong>
&nbsp;of type <b>ObjTD </b>is constructed from <b>obj</b> during &nbsp;the
function evaluation.</span></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'>&nbsp;</p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Returns:</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> A simple call wrapper (20.10.1) </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>fn</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> such that the expression </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn(a1,
...., aN)</span></strong><strong><span style=3D'font-size:11.0pt;line-height=
:115%;
font-family:"Times New Roman","serif";font-weight:normal'> is equivalent to=
 </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>INVOKE(pm,
objv, a1,=85aN)</span></strong><strong><span style=3D'font-size:11.0pt;line=
-height:
115%;font-family:"Times New Roman","serif";font-weight:normal'>, where </sp=
an></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objv</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is the value derived &nbsp;from </span></strong><stron=
g><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objd
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>of type</span></s=
trong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>
ObjTD</span></strong><strong><span style=3D'font-size:11.0pt;line-height:11=
5%;
font-family:"Times New Roman","serif";font-weight:normal'>, according to th=
e
rules explained below</span></strong><strong><span style=3D'font-size:11.0p=
t;
line-height:115%;font-family:"Times New Roman","serif"'>.</span></strong></=
p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define one nested type named </span></strong><str=
ong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as a synonym for </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'> </span></i></spa=
n><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>&nbsp;is </span></strong><span class=3DIntenseQuoteChar=
><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type, when </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function</span></strong><strong=
><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>which is taking n=
o
arguments.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define two nested types named </span></strong><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>argument_type
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>and </span></stro=
ng><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>T1</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></strong>=
<strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-family:"Times New Roman","seri=
f"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function taking&nbsp; one argum=
ent
of type </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-=
family:
"Times New Roman","serif"'>T1</span></span><strong><span style=3D'font-size=
:11.0pt;
line-height:115%;font-family:"Times New Roman","serif";font-weight:normal'>=
,
where </span></strong><span class=3DIntenseQuoteChar><i><span style=3D'font=
-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></=
i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define three nested types named </span></strong><=
span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>first_argument_type</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, </span></strong><span class=3DIntenseQuoteChar><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>second_argument_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, and </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T1</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T2</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><span class=3DIntenseQuoteChar><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function taking two arguments o=
f
types </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-si=
ze:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T1</span></span><sp=
an
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'> and&nbsp; </span=
></span><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T2</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
value of </span></strong><strong><span style=3D'font-size:11.0pt;line-heigh=
t:
115%;font-family:"Times New Roman","serif"'>objv</span></strong><strong><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is derived from </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objd
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>according to the
following rules:</span></strong></p>

<p class=3DMsoListParagraph style=3D'margin-left:33.0pt;text-indent:-18.0pt=
'><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-seri=
f"'>=97</span><span
style=3D'font-size:7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>if &nbsp;<b>ObjTD </b>is <b>ref=
erence_wrapper&lt;T&gt;</b>,
the value will be <b>objd.get()</b> of type <b>T&amp;</b>;</span></p>

<p class=3DMsoListParagraph style=3D'margin-left:33.0pt;text-indent:-18.0pt=
'><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-seri=
f"'>=97</span><span
style=3D'font-size:7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>otherwise, the value will be <b=
>objd </b>&nbsp;and
its type is <b>ObjTD <i>cv</i> &amp;</b>, where <b><i>cv</i></b> is the <i>=
cv</i>-qualifier
&nbsp;of the member function <b>pm</b>.</span></p>

<p class=3DMsoListParagraph style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Throws:
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>Nothing unless th=
e
construction of </span></strong><strong><span style=3D'font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>objd</span></strong=
><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> throws</span></strong><strong><span style=3D'font-size=
:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>.</span></strong></=
p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>The second option means that the object and the member
function will be bound together.&nbsp; Using this feature we can now write =
the
following code (the class and the function used here were explained in the
introduction):</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>double x =3D 1.0;</span><=
/strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>double sum =3D 0.0;</span=
></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>for (int i =3D 0; i &lt; =
10; i++)</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>{</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; a.set_param(=
x);</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; sum +=3D
integrate(mem_fn(&amp;A::fa, &amp;a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b=
2);
// summing up ten values</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; x +=3D 0.1;<=
/span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>}</span></strong></p>

<h2>Examples</h2>

<h3><u>Example 1.</u></h3>

<p class=3DMsoNormal>Here is a sample program, which shows the application
of&nbsp; <b>mem_fn</b> to simple member functions, and also its use with a
shared pointer&nbsp; as the second parameter:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>cla=
ss A2</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pro=
tected:</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int i;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pub=
lic:&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A2(int k):i(k) {}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get()const -&gt;int { return i;}&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getv() volatile -&gt;int { return i;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get_plus100() const volatile -&gt;int { return
i+100;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto set(int v)-&gt;void { i =3D v;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto inc(int g)-&gt;int&amp; { i+=3Dg; return i;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto incp(int&amp; g)-&gt;int&amp; { g+=3Di; return g;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto f8 (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) co=
nst
-&gt; int</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
{</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return i+a1+a2+a3+a4+a5+a6+a7+a8;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>};<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>cla=
ss A3:
public A2</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{&n=
bsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pub=
lic:&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A3(int k):A2(k) {}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get()const -&gt;int { return i*i;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get3()const -&gt;int { return i*i*i;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>};<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>int
main()</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A2 a(11);&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get2 =3D std::mem_fn(&amp;A2::get,a);&nbsp;&nbsp;&nbsp; </span></b></p=
>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;for a get2: &quot; &lt;&lt; get2() &lt;&lt;
std::endl;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
{</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
A2 b(25);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
get2 =3D std::mem_fn(&amp;A2::get,
b);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;for b get2: &quot; &lt;&lt; get2() &lt;&lt;
std::endl;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a_get1 =3D std::mem_fn(&amp;A2::get);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a_get_plus100 =3D std::mem_fn(&amp;A2::get_plus100,a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;get1: &quot; &lt;&lt; a_get1(&amp;a) &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a_get_plus100: &quot; &lt;&lt;&nbsp; a_get_plus100=
()
&lt;&lt; std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;
&nbsp;&nbsp;auto set1 =3D std::mem_fn(&amp;A2::set, &amp;a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::shared_ptr&lt;A2&gt; sh_a(new A2(22));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto inc =3D std::mem_fn(&amp;A2::inc, sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto incp =3D std::mem_fn(&amp;A2::incp, sh_a); </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::unique_ptr&lt;A2&gt; u_a(new A2(22));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto u_inc =3D std::mem_fn(&amp;A2::inc, std::move(u_a));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:11.0pt;line-height:115%;
font-family:"Anonymous Pro"'>int ux =3D 5;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>&nbsp;&nbsp;&nbsp;
int u_k =3D u_inc(ux);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:=
"Anonymous Pro"'>std::cout
&lt;&lt; &quot;unique u_k: &quot; &lt;&lt;&nbsp; u_k &lt;&lt; std::endl;</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto af8&nbsp; =3D std::mem_fn(&amp;A2::f8,sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto b_af8 =3D std::bind(&amp;A2::f8, sh_a, _1, _2, _3, _4, _5, _6, _7,
_8);&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
set1(15);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a.get():&quot; &lt;&lt; a.get() &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto sh_get&nbsp; =3D std::mem_fn(&amp;A2::get,sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;sh_get:&quot; &lt;&lt; sh_get() &lt;&lt;
std::endl;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int x =3D 5;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int k =3D inc(x);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int&amp; k2 =3D incp(x);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
k2 *=3D 7;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a.get():&quot; &lt;&lt; a.get() &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;k: &quot; &lt;&lt; k &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;x: &quot; &lt;&lt; x &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;af8(1,2,3,4,5,6,7,8): &quot; &lt;&lt;
af8(1,2,3,4,5,6,7,8) &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;b_af8(1,2,3,4,5,6,7,8): &quot; &lt;&lt; b_af8(1,2,=
3,4,5,6,7,8)
&lt;&lt; std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
volatile A2 av(45);&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getv2 =3D
std::mem_fn(&amp;A2::getv,&amp;av);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;volatile getv2:&quot; &lt;&lt; getv2() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
const A2 ac(7);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getc =3D std::mem_fn(&amp;A2::get,ac);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;getc: &quot; &lt;&lt; getc() &lt;&lt; std::endl;</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A3 a3(5);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getv3 =3D std::mem_fn(&amp;A2::getv,a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;getv3: &quot; &lt;&lt; getv3() &lt;&lt; std::endl;=
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_A2get =3D
std::mem_fn(&amp;A2::get,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_A2get: &quot; &lt;&lt; a3_A2get() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_A2getv =3D
std::mem_fn(&amp;A2::getv,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_A2getv: &quot; &lt;&lt; a3_A2getv() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_get =3D
std::mem_fn(&amp;A3::get,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_get: &quot; &lt;&lt; a3_get() &lt;&lt; std::end=
l;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_get1 =3D
std::mem_fn(&amp;A3::get3,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_get1: &quot; &lt;&lt; a3_get1() &lt;&lt;
std::endl;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto r_get =3D
std::mem_fn(&amp;A2::get,std::ref(ac));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;r_get: &quot; &lt;&lt; r_get() &lt;&lt; std::endl;=
 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
const A2&amp; ref_a2 =3D ac;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto ref_get =3D&nbsp;
std::mem_fn(&amp;A2::get,ref_a2);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>std::cout
&lt;&lt; &quot;ref_get: &quot; &lt;&lt; ref_get() &lt;&lt; std::endl;</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>}</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal>This program will print:</p>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>for a get2: 11</span></span></h=
3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>for b get2: 25</span></span></h=
3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>get1: 11</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a_get_plus100: 111</span></span=
></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
lang=3DFR style=3D'font-size:12.0pt;line-height:115%'>unique u_k: 27</span>=
</span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
lang=3DFR style=3D'font-size:12.0pt;line-height:115%'>a.get():15</span></sp=
an></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>sh_get:22</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a.get():15</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>k: 27</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>x: 224</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>af8(1,2,3,4,5,6,7,8): 63</span>=
</span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>b_af8(1,2,3,4,5,6,7,8): 63</spa=
n></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>volatile getv2:45</span></span>=
</h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>getc: 7</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>getv3: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_A2get: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_A2getv: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_get: 25</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_get1: 125</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>r_get: 7</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>ref_get: 7 </span></span></h3>

<h3><span class=3DMsoIntenseEmphasis><u>Example 2.</u></span></h3>

<p class=3DMsoNormal>This program&nbsp; shows how to apply <b>mem_fn</b> to=
&nbsp;
overloaded member functions:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;iostream&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;functional&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;vector&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>class
B</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
double x;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; y;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>public:</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>&nbsp;&nbsp;&nbsp;
B(double x1):x(x1),y(3) </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>&nbsp;&nbsp;&nbsp;
</span></strong><strong><span style=3D'font-size:11.0pt;font-family:"Anonym=
ous Pro"'>{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[0] =3D 1.5;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[1] =3D 2.7;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[2] =3D 4.9;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; add_vector(std::vector&lt;double&gt;&amp;&amp; z)=
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;move&quot; &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; <=
/span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
z[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return std::move(z);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; add_vector(const std::vector&lt;double&gt;&amp; z=
)
const</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;copy&quot; &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; <=
/span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; c(z);&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
c[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return c;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
void add_vector(std::vector&lt;double&gt;&amp; z)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;out&quot; &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
z[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>};</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>int
main()</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>{&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
B b(3.5);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v(3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[0] =3D 10.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[1] =3D 100.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[2] =3D 1000.0;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_copy =3D
std::mem_fn(static_cast&lt;std::vector&lt;double&gt;(B::*)(const
std::vector&lt;double&gt;&amp;) const&gt;(&amp;B::add_vector), &amp;b); </s=
pan></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v1 =3D b_add_vector_copy(v); </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v.size(): &quot; &lt;&lt; v.size() &lt;&lt; std::e=
ndl;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v1: &quot; &lt;&lt; v1[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_move =3D std::mem_fn(static_cast&lt;std::vector&lt;double=
&gt;(B::*)(std::vector&lt;double&gt;&amp;&amp;)&gt;(&amp;B::add_vector),&am=
p;b);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v2 =3D b_add_vector_move(std::move(v));</span></s=
trong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v.size(): &quot; &lt;&lt; v.size() &lt;&lt; std::e=
ndl;
// v size is now 0</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v2: &quot; &lt;&lt; v2[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v3(3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[0] =3D 10.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[1] =3D 100.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[2] =3D 1000.0;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_ref =3D
std::mem_fn(static_cast&lt;void(B::*)(std::vector&lt;double&gt;&amp;)&gt;(&=
amp;B::add_vector),&amp;b);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
b_add_vector_ref(v3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v3: &quot; &lt;&lt; v3[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>This program will print:</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>cop=
y</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v.s=
ize():
3</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:
1004.9</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>mov=
e</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v.s=
ize():
0</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:
1004.9</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>out=
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:
1004.9</span></strong></p>

<p class=3DMsoNormal>&nbsp;</p>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>3.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Implementation</h2>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>namespace =
std</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;_P&amp;,_SIG _T&amp;&gt;::value, _=
SIG
_T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##=
 _NAME(_R
(_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return static_cast&lt;_SIG _T&amp;&gt;(x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef2(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;typename _P::element_type&amp;, _S=
IG
_T&amp;&gt;::value, _SIG _T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return static_cast&lt;_SIG _T&amp;&gt;(*x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef3(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;_P, _SIG _T*&gt;::value, _SIG
_T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;_get=
Ref ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return *static_cast&lt;_SIG _T*&gt;(x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef4(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;typename _P::result_type&amp;, _SI=
G
_T&amp;&gt;::value, _SIG _T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return static_cast&lt;_SIG _T&amp;&gt;(x.get());\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate2(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R, class _Arg1, class _Arg2, class ... _Arg&gt;\=
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate2
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typename std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consola=
s'>_R
(_T::*f1)(_Arg1, _Arg2, _Arg ... ) </span></b><b><span style=3D'font-size:1=
0.0pt;
font-family:Consolas'>_SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>public:\</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _Arg1 first_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _Arg2 second_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_delegate2 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg2, _Arg ... ) _SIG,
_OBJECT1&amp;&amp; _obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)=
\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_Arg1 _x1, _Arg2 _x2, _Arg ...&nbsp; _x) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1),
std::forward&lt;_Arg2&gt;(_x2), std::forward&lt;_Arg&gt;(_x) ...);\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R, class _Arg1&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate1
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typename std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consola=
s'>_R
(_T::*f1)(_Arg1) _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typedef=
 _Arg1
argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1) _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_Arg1 _x1) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1=
));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define _t=
wo_param_delegate0(_SIG,
_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate0
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typename std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consola=
s'>_R
(_T::*f1)() _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typedef=
 _R
return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_delegate0 ## _NAME(_R (_T::*_fx)() _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()() _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)();\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_param_delegate1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R, class _Arg1, class ... _Arg&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class
_one_p_delegate1 ## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
_R (_T::*f1)(_Arg1, _Arg ... ) _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>public:\</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _SIG _T* first_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _Arg1 second_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_one_p_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg ... ) _SIG):f1(_fx)\</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
template&lt;class _OBJECT&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_OBJECT _obj,_Arg1 _x1, _Arg ...&nbsp; _x) _SIG\</span></b></=
p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1=
),
std::forward&lt;_Arg&gt;(_x) ...);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_param_delegate0(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class
_one_p_delegate0 ## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
_R (_T::*f1)() _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typedef=
 _SIG
_T* argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_one_p_delegate0 ## _NAME(_R (_T::*_fx)() _SIG):f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
template&lt;class _OBJECT&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_OBJECT _obj) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)();\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro2(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R, class _Arg1, class _Arg2, class ... _Arg&gt;\<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate2=
 ##
_NAME&lt;_OBJECT,_T,_R,_Arg1, _Arg2, _Arg ... &gt; mem_fn(_R (_T::*_f)(_Arg=
1,
_Arg2, _Arg ... ) _SIG, _OBJECT&amp;&amp; _obj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _delegate2 ## _NAME &lt;_OBJECT,_T,_R, _Arg1, _Arg2, _Arg ... &gt;(_=
f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro1(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R, class _Arg1&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate1=
 ##
_NAME&lt;_OBJECT,_T,_R,_Arg1&gt; mem_fn(_R (_T::*_f)(_Arg1) _SIG,
_OBJECT&amp;&amp; _obj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _delegate1 ## _NAME &lt;_OBJECT,_T,_R, _Arg1&gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro0(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate0=
 ##
_NAME&lt;_OBJECT,_T,_R&gt; mem_fn(_R (_T::*_f)() _SIG, _OBJECT&amp;&amp; _o=
bj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _delegate0 ## _NAME &lt;_OBJECT,_T,_R&gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_p_mem_fn_macro1(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R, class _Arg1, class ... _Arg&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_del=
egate1
## _NAME&lt;_T,_R,_Arg1, _Arg ... </span></b><b><span lang=3DFR style=3D'fo=
nt-size:
10.0pt;font-family:Consolas'>&gt; mem_fn(_R (_T::*_f)(_Arg1, _Arg ... ) </s=
pan></b><b><span
style=3D'font-size:10.0pt;font-family:Consolas'>_SIG)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _one_p_delegate1 ## _NAME &lt;_T,_R,_Arg1, _Arg ... &gt;(_f);\</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_p_mem_fn_macro0(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_del=
egate0
## _NAME&lt;_T,_R&gt; mem_fn(_R (_T::*_f)() _SIG)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _one_p_delegate0 ## _NAME &lt;_T,_R&gt;(_f);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'>&nbsp;</p>

</div>

</body>

</html>

------=_Part_7_1231733.1379857610536--

.


Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Thu, 26 Sep 2013 12:42:11 -0700 (PDT)
Raw View
------=_Part_55_10639468.1380224531699
Content-Type: multipart/alternative;
 boundary="----=_Part_56_5975095.1380224531699"

------=_Part_56_5975095.1380224531699
Content-Type: text/plain; charset=ISO-8859-1

Revised proposal: support for a unique pointer and reference wrapper as a
second parameter is added, including a reference to a shared pointer. The
second parameter is move-constructible.


--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_56_5975095.1380224531699
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr"><div>Revised proposal: support for a unique pointer and reference wrapper as a second parameter is added, including a reference to a shared pointer. The second parameter&nbsp;is move-constructible.</div><div>&nbsp;</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />

------=_Part_56_5975095.1380224531699--
------=_Part_55_10639468.1380224531699
Content-Type: text/html; charset=windows-1252; name=mem_fn_revised.htm
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=mem_fn_revised.htm
X-Attachment-Id: a4f0db63-c719-42a7-bcef-f8a4d127c741
Content-ID: <a4f0db63-c719-42a7-bcef-f8a4d127c741>

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindows-125=
2">
<meta name=3DGenerator content=3D"Microsoft Word 14 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
=09{font-family:SimSun;
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:"Cambria Math";
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Cambria;
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:Calibri;
=09panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
=09{font-family:Verdana;
=09panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
=09{font-family:"Anonymous Pro";
=09panose-1:2 6 6 9 3 2 2 0 5 4;}
@font-face
=09{font-family:"Segoe UI";
=09panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
=09{font-family:"\@SimSun";
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:Consolas;
=09panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
=09{font-family:"Trebuchet MS";
=09panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
=09{font-family:"Arial Rounded MT Bold";
=09panose-1:2 15 7 4 3 5 4 3 2 4;}
@font-face
=09{font-family:LMMono10-Regular;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
=09{margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
h1
=09{mso-style-link:"Heading 1 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:16.0pt;
=09font-family:"Verdana","sans-serif";}
h2
=09{mso-style-link:"Heading 2 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:15.0pt;
=09font-family:"Times New Roman","serif";}
h3
=09{mso-style-link:"Heading 3 Char";
=09margin-top:12.0pt;
=09margin-right:0cm;
=09margin-bottom:3.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09page-break-after:avoid;
=09font-size:13.0pt;
=09font-family:"Cambria","serif";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
=09{mso-style-link:"Header Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
=09{mso-style-link:"Footer Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
=09{color:blue;
=09text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
=09{color:purple;
=09text-decoration:underline;}
strong
=09{font-family:"Calibri","sans-serif";}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
=09{margin:0cm;
=09margin-bottom:.0001pt;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
=09{margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:36.0pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.MsoQuote, li.MsoQuote, div.MsoQuote
=09{mso-style-link:"Quote Char";
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:0cm;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Trebuchet MS","sans-serif";
=09color:black;
=09font-style:italic;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
=09{mso-style-link:"Intense Quote Char";
=09margin-top:10.0pt;
=09margin-right:46.8pt;
=09margin-bottom:14.0pt;
=09margin-left:46.8pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Arial Rounded MT Bold","sans-serif";
=09font-weight:bold;}
span.MsoIntenseEmphasis
=09{font-family:"Trebuchet MS","sans-serif";
=09color:windowtext;
=09font-weight:bold;
=09font-style:normal;}
span.Heading1Char
=09{mso-style-name:"Heading 1 Char";
=09mso-style-link:"Heading 1";
=09font-family:"Verdana","sans-serif";
=09font-weight:bold;}
span.Heading2Char
=09{mso-style-name:"Heading 2 Char";
=09mso-style-link:"Heading 2";
=09font-family:"Times New Roman","serif";
=09font-weight:bold;}
span.Heading3Char
=09{mso-style-name:"Heading 3 Char";
=09mso-style-link:"Heading 3";
=09font-family:"Cambria","serif";
=09font-weight:bold;}
span.HeaderChar
=09{mso-style-name:"Header Char";
=09mso-style-link:Header;
=09font-family:"Times New Roman","serif";}
span.FooterChar
=09{mso-style-name:"Footer Char";
=09mso-style-link:Footer;
=09font-family:"Times New Roman","serif";}
span.QuoteChar
=09{mso-style-name:"Quote Char";
=09mso-style-link:Quote;
=09font-family:"Trebuchet MS","sans-serif";
=09color:black;
=09font-style:italic;}
span.IntenseQuoteChar
=09{mso-style-name:"Intense Quote Char";
=09mso-style-link:"Intense Quote";
=09font-family:"Arial Rounded MT Bold","sans-serif";
=09font-weight:bold;}
p.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparag=
raphcxspfirst
=09{mso-style-name:msolistparagraphcxspfirst;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:0cm;
=09margin-left:36.0pt;
=09margin-bottom:.0001pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistpar=
agraphcxspmiddle
=09{mso-style-name:msolistparagraphcxspmiddle;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:0cm;
=09margin-left:36.0pt;
=09margin-bottom:.0001pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagra=
phcxsplast
=09{mso-style-name:msolistparagraphcxsplast;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:8.0pt;
=09margin-left:36.0pt;
=09line-height:115%;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.ecxmsonormal, li.ecxmsonormal, div.ecxmsonormal
=09{mso-style-name:ecxmsonormal;
=09margin-top:0cm;
=09margin-right:0cm;
=09margin-bottom:16.2pt;
=09margin-left:0cm;
=09font-size:12.0pt;
=09font-family:"Times New Roman","serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
=09{mso-style-name:msochpdefault;
=09margin-right:0cm;
=09margin-left:0cm;
=09font-size:10.0pt;
=09font-family:"Calibri","sans-serif";}
span.unsafesenderemail1
=09{mso-style-name:unsafesenderemail1;}
..MsoChpDefault
=09{font-size:10.0pt;
=09font-family:"Calibri","sans-serif";}
@page WordSection1
=09{size:595.3pt 841.9pt;
=09margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
=09{page:WordSection1;}
-->
</style>

</head>

<body lang=3DEN-GB link=3Dblue vlink=3Dpurple>

<div class=3DWordSection1>

<table class=3DMsoNormalTable border=3D0 cellspacing=3D0 cellpadding=3D0 wi=
dth=3D619
 style=3D'width:464.25pt;border-collapse:collapse'>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Document number:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'></td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Date:</span></p>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Revises:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>2013-09-26</span></p>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>N3702</span></p>
  </td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Project:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Programming Language C++, Librar=
y
  Working Group</span></p>
  </td>
 </tr>
 <tr>
  <td width=3D123 valign=3Dtop style=3D'width:92.4pt;padding:0cm 0cm 0cm 0c=
m'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Reply-to:</span></p>
  </td>
  <td width=3D496 style=3D'width:371.85pt;padding:0cm 0cm 0cm 0cm'>
  <p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:
  normal'><span style=3D'font-size:10.0pt'>Mikhail Semenov&lt;<span
  class=3Dunsafesenderemail1><span style=3D'color:black'>mikhailsemenov1957=
@gmail.com</span></span>&gt;</span></p>
  </td>
 </tr>
</table>

<h1>&nbsp;</h1>

<h1 align=3Dcenter style=3D'text-align:center'><span style=3D'font-size:15.=
0pt;
line-height:115%'>Introducing an optional parameter for </span><strong><spa=
n
style=3D'font-size:15.0pt;line-height:115%'>mem_fn</span></strong><span
style=3D'font-size:15.0pt;line-height:115%'>, which allows to bind an objec=
t to
its member function</span></h1>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>1.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Introduction</h2>

<p class=3DMsoNormal>When a member function is used as a parameter to anoth=
er
function (the latter is usually called a <b><i>functional</i></b>) it is of=
ten
necessary to provide the corresponding class object as a parameter as well.=
 But
functionals, like for example an integral, are often written to accept one
global function. In cases when a member function and an object are needed, =
it
is necessary to bind them together,&nbsp; so that the result can be supplie=
d to
the corresponding functional as one parameter. Let us consider the followin=
g
functional <b>integrate </b>(it can be part of&nbsp; a library):&nbsp;</p>

<p class=3DMsoNormal><strong><span lang=3DFR>double
integrate(std::function&lt;double(double, double, double, double, double)&g=
t;
f,</span></strong></p>

<p class=3DMsoNormal><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;
double x1, double x2, double y1, double y2, double z1, double z2,&nbsp; dou=
ble
a1, double a2, double b1, double b2)&nbsp;;</span></strong></p>

<p class=3DMsoNormal>We need to call <b>integrate</b> with&nbsp; the
parameterized function <b>fa</b>, which is defined as a member of the class=
 <b>A</b>:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><str=
ong>class
A</strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><str=
ong>{</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; double p;</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>public:</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; A(double p1):p(p1) {}</s=
trong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; void set_param(double p1=
)
{&nbsp; p =3D p1; }</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp; double fa(double x, doub=
le
y, double z, double a, double b);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>};</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>&nbsp;</p>

<p class=3DMsoNormal>The member-variable&nbsp; <b>p</b> is a &quot;hidden&q=
uot;
parameter of the function <b>fa</b>. We create an object:</p>

<p class=3Decxmsonormal style=3D'background:white'><strong><span style=3D'f=
ont-size:
11.0pt'>A a(5.0);</span></strong></p>

<p class=3Decxmsonormal style=3D'background:white'>If we want to call <b>in=
tegrate</b>
with <b>a.fa</b>&nbsp; we have three options:</p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong><span style=3D'font-weight:normal'>(1)</span></strong><stron=
g><span
style=3D'font-size:7.0pt;font-family:"Times New Roman","serif"'>&nbsp;&nbsp=
; </span>double
r =3D </strong><strong><span style=3D'font-size:10.5pt;font-family:"Segoe U=
I","sans-serif";
color:black'>&nbsp;</span>integrate(std::bind(&amp;A::fa, &amp;a, _1, _2, _=
3,
_4, _5), x1, x2, y1,y2, z1, z2,&nbsp;&nbsp; </strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;background:white'><strong>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
a1, a2, b1, b2);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;</strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong><span style=3D'font-weight:normal'>(2)</span></strong><stron=
g><span
style=3D'font-size:7.0pt;font-family:"Times New Roman","serif";font-weight:=
normal'>&nbsp;&nbsp;
</span></strong><span style=3D'font-size:10.5pt;font-family:"Segoe UI","san=
s-serif";
color:black'>&nbsp;</span><strong>double r =3D integrate</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</strong><strong><span lang=3DFR>([&amp;a](double x, double y, double z, do=
uble
a, double b) { return a.fa(x, y, z, a, b);},&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);&nbsp;</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></strong><strong><span
style=3D'font-weight:normal'>(3)</span>&nbsp;&nbsp; </strong><strong><span
style=3D'font-weight:normal'>define a global function (a wrapper), which we=
 will
use as a&nbsp; parameter to the function </span>integrate</strong><strong><=
span
style=3D'font-weight:normal'>:</span></strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;
double f(double x, double y, double z, double a, double b) { return
a.fa(x,y,z,a,b); }</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
=85</strong></p>

<p class=3Decxmsonormal style=3D'margin-top:0cm;margin-right:0cm;margin-bot=
tom:
0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;background=
:
white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double r =
=3D
integrate(f, x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);</strong></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </stro=
ng></p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>In all these examples, if the function <b>fa</b> had more
parameters we would have to write even a longer statement. </p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>&nbsp;</p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'>It would be much more convenient to be able to write
something like this:</p>

<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
line-height:150%;background:white'><strong>double r =3D integrate(<i>some_b=
inder</i>(&amp;A::fa,
&amp;a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);&nbsp;</strong></p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>which looks more simple and clearer</span></strong><str=
ong><span
style=3D'font-family:SimSun;font-weight:normal'>.</span></strong></p>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>2.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Proposal</h2>

<p class=3DMsoNormal>The proposal is to allow <b>mem_fn</b> to accept a sec=
ond,
optional parameter. The full definition is as follows (the first option is =
the
same as in <b>N3690, </b>section<b> 20.10.10</b>):</p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:Consolas'>template&lt;class R, class T&=
gt;
unspecified mem_fn(R T::* pm);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Returns:</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> A simple call wrapper (20.10.1) </span></strong><stron=
g><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> such that the expression </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>fn(t, a2, ..., aN)</span></span><str=
ong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is equivalent to </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>INVOKE (pm, t, a2, ..., aN)</span></=
span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> (20.10.2). </span></strong><span class=3DIntenseQuoteC=
har><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn
</span></span><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>shall have a nest=
ed
type </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-siz=
e:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>result_type</span><=
/span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> that is a synonym for the return type of </span></stro=
ng><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> when </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define two nested types named </span></strong><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>argument_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>result_type</span><=
/strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>cv</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> </span></strong><strong><span style=3D'font-size:11.0p=
t;
line-height:115%;font-family:"Times New Roman","serif"'>T*</span></strong><=
strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></strong>=
<strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function with <i>cv-</i>qualifi=
er </span></strong><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>cv</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and taking no arguments, where </span></strong><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>&nbsp; is </span></strong><span class=3DIntenseQuoteCha=
r><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define three nested types named </span></strong><=
span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>first_argument_type</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, </span></strong><span class=3DIntenseQuoteChar><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>second_argument_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, and </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif"'>cv</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>&nbsp;
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T*</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T1</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><span class=3DIntenseQuoteChar><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function with </span></strong><=
span
class=3DQuoteChar><b><span style=3D'font-size:11.0pt;line-height:115%;font-=
family:
"Times New Roman","serif"'>cv-</span></b></span><strong><span style=3D'font=
-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>qualifier
</span></strong><span class=3DIntenseQuoteChar><i><span style=3D'font-size:=
11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>cv</span></i></span=
><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and taking one argument of type </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T1</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Throws:
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>Nothing</span></s=
trong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Trebuchet MS","sans=
-serif";
font-weight:normal'>.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>template&lt;class R, class =
T,
class ObjT&gt; unspecified mem_fn(R T::* pm, ObjT&amp;&amp; obj);</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'><b><i><spa=
n
style=3D'font-size:11.0pt'>&nbsp;</span></i></b></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:0cm;margin-bottom=
:0cm;
margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal;text-autospace:
none'><b><i><span style=3D'font-size:11.0pt'>Requires: </span></i></b><span
style=3D'font-size:11.0pt'>The type<b> ObjTD, </b>which is <b>std::decay&lt=
;</b></span><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>ObjT&gt;::type</span></b><s=
pan
style=3D'font-size:11.0pt;font-family:Consolas'>,<b> </b></span><span
style=3D'font-size:11.0pt'>shall be </span><b><span style=3D'font-size:11.0=
pt;
font-family:Consolas'>MoveConstructible</span></b><span style=3D'font-size:=
11.0pt;
font-family:Consolas'> </span><span style=3D'font-size:11.0pt'>and <b>is_co=
nstructible&lt;
ObjTD, ObjT&gt;::value</b></span><span style=3D'font-size:10.0pt;font-famil=
y:
LMMono10-Regular'> </span><span style=3D'font-size:11.0pt'>shall be true</s=
pan><span
style=3D'font-size:10.0pt;font-family:LMMono10-Regular'>. </span><span
style=3D'font-size:11.0pt'>An object <strong><span style=3D'font-family:"Ti=
mes New Roman","serif"'>objd</span></strong>
&nbsp;of type <b>ObjTD </b>is constructed from <b>obj</b> during &nbsp;the
function evaluation.</span></p>

<p class=3DMsoNormal style=3D'margin-top:0cm;margin-right:46.8pt;margin-bot=
tom:
0cm;margin-left:14.2pt;margin-bottom:.0001pt;line-height:normal'>&nbsp;</p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Returns:</span></i></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> A simple call wrapper (20.10.1) </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>fn</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> such that the expression </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>fn(a1,
...., aN)</span></strong><strong><span style=3D'font-size:11.0pt;line-height=
:115%;
font-family:"Times New Roman","serif";font-weight:normal'> is equivalent to=
 </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>INVOKE(pm,
objv, a1,=85aN)</span></strong><strong><span style=3D'font-size:11.0pt;line=
-height:
115%;font-family:"Times New Roman","serif";font-weight:normal'>, where </sp=
an></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objv</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is the value derived &nbsp;from </span></strong><stron=
g><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objd
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>of type</span></s=
trong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>
ObjTD</span></strong><strong><span style=3D'font-size:11.0pt;line-height:11=
5%;
font-family:"Times New Roman","serif";font-weight:normal'>, according to th=
e
rules explained below</span></strong><strong><span style=3D'font-size:11.0p=
t;
line-height:115%;font-family:"Times New Roman","serif"'>.</span></strong></=
p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define one nested type named </span></strong><str=
ong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as a synonym for </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><span
class=3DIntenseQuoteChar><i><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'> </span></i></spa=
n><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>&nbsp;is </span></strong><span class=3DIntenseQuoteChar=
><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type, when </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function</span></strong><strong=
><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>which is taking n=
o
arguments.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define two nested types named </span></strong><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>argument_type
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>and </span></stro=
ng><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>T1</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><strong><span style=3D'font-size:1=
1.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></strong>=
<strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-family:"Times New Roman","seri=
f"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function taking&nbsp; one argum=
ent
of type </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-=
family:
"Times New Roman","serif"'>T1</span></span><strong><span style=3D'font-size=
:11.0pt;
line-height:115%;font-family:"Times New Roman","serif";font-weight:normal'>=
,
where </span></strong><span class=3DIntenseQuoteChar><i><span style=3D'font=
-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif"'>Ret</span></=
i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
simple call wrapper shall define three nested types named </span></strong><=
span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>first_argument_type</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, </span></strong><span class=3DIntenseQuoteChar><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>second_argument_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, and </span></strong><span class=3DIntenseQuoteChar><s=
pan
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>result_type</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> as synonyms for </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T1</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,
</span></strong><span class=3DIntenseQuoteChar><span style=3D'font-size:11.=
0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T2</span></span><st=
rong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>,</span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> and </span></strong><span class=3DIntenseQuoteChar><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, respectively, when </span></strong><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is a pointer to member function taking two arguments o=
f
types </span></strong><span class=3DIntenseQuoteChar><span style=3D'font-si=
ze:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>T1</span></span><sp=
an
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'> and&nbsp; </span=
></span><span
class=3DIntenseQuoteChar><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif"'>T2</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>, where </span></strong><span class=3DIntenseQuoteChar>=
<i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Ret</span></i></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is </span></strong><span class=3DIntenseQuoteChar><spa=
n
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>pm</span></span><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'>=92s return type.</span></strong></p>

<p class=3DMsoNormal style=3D'margin-left:14.2pt'><strong><span style=3D'fo=
nt-size:
11.0pt;line-height:115%;font-family:"Times New Roman","serif";font-weight:n=
ormal'>The
value of </span></strong><strong><span style=3D'font-size:11.0pt;line-heigh=
t:
115%;font-family:"Times New Roman","serif"'>objv</span></strong><strong><sp=
an
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> is derived from </span></strong><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>objd
</span></strong><strong><span style=3D'font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";font-weight:normal'>according to the
following rules:</span></strong></p>

<p class=3DMsoListParagraph style=3D'margin-left:33.0pt;text-indent:-18.0pt=
'><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-seri=
f"'>=97</span><span
style=3D'font-size:7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>if &nbsp;<b>ObjTD </b>is <b>ref=
erence_wrapper&lt;T&gt;</b>,
the value will be <b>objd.get()</b> of type <b>T&amp;</b>;</span></p>

<p class=3DMsoListParagraph style=3D'margin-left:33.0pt;text-indent:-18.0pt=
'><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-seri=
f"'>=97</span><span
style=3D'font-size:7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>otherwise, the value will be <b=
>objd </b>&nbsp;and
its type is <b>ObjTD <i>cv</i> &amp;</b>, where <b><i>cv</i></b> is the <i>=
cv</i>-qualifier
&nbsp;of the member function <b>pm</b>.</span></p>

<p class=3DMsoListParagraph style=3D'margin-left:14.2pt'><strong><i><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif"'>Throws:
</span></i></strong><strong><span style=3D'font-size:11.0pt;line-height:115=
%;
font-family:"Times New Roman","serif";font-weight:normal'>Nothing unless th=
e
construction of </span></strong><strong><span style=3D'font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>objd</span></strong=
><strong><span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Times New Roman","s=
erif";
font-weight:normal'> throws</span></strong><strong><span style=3D'font-size=
:11.0pt;
line-height:115%;font-family:"Times New Roman","serif"'>.</span></strong></=
p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>The second option means that the object and the member
function will be bound together.&nbsp; Using this feature we can now write =
the
following code (the class and the function used here were explained in the
introduction):</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>double x =3D 1.0;</span><=
/strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>double sum =3D 0.0;</span=
></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>for (int i =3D 0; i &lt; =
10; i++)</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>{</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; a.set_param(=
x);</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; sum +=3D
integrate(mem_fn(&amp;A::fa, &amp;a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b=
2);
// summing up ten values</span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>&nbsp;&nbsp; x +=3D 0.1;<=
/span></strong></p>

<p class=3DMsoQuote style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-h=
eight:
normal'><strong><span style=3D'font-style:normal'>}</span></strong></p>

<h2>Examples</h2>

<h3><u>Example 1.</u></h3>

<p class=3DMsoNormal>Here is a sample program, which shows the application
of&nbsp; <b>mem_fn</b> to simple member functions, and also its use with a
shared pointer&nbsp; as the second parameter:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>cla=
ss A2</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pro=
tected:</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int i;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pub=
lic:&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A2(int k):i(k) {}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get()const -&gt;int { return i;}&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getv() volatile -&gt;int { return i;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get_plus100() const volatile -&gt;int { return
i+100;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto set(int v)-&gt;void { i =3D v;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto inc(int g)-&gt;int&amp; { i+=3Dg; return i;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto incp(int&amp; g)-&gt;int&amp; { g+=3Di; return g;}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto f8 (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) co=
nst
-&gt; int</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
{</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return i+a1+a2+a3+a4+a5+a6+a7+a8;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>};<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>cla=
ss A3:
public A2</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{&n=
bsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>pub=
lic:&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A3(int k):A2(k) {}</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get()const -&gt;int { return i*i;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get3()const -&gt;int { return i*i*i;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>};<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>int
main()</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>{</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A2 a(11);&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto get2 =3D std::mem_fn(&amp;A2::get,a);&nbsp;&nbsp;&nbsp; </span></b></p=
>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;for a get2: &quot; &lt;&lt; get2() &lt;&lt;
std::endl;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
{</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
A2 b(25);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
get2 =3D std::mem_fn(&amp;A2::get,
b);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;for b get2: &quot; &lt;&lt; get2() &lt;&lt;
std::endl;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a_get1 =3D std::mem_fn(&amp;A2::get);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a_get_plus100 =3D std::mem_fn(&amp;A2::get_plus100,a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;get1: &quot; &lt;&lt; a_get1(&amp;a) &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a_get_plus100: &quot; &lt;&lt;&nbsp; a_get_plus100=
()
&lt;&lt; std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;
&nbsp;&nbsp;auto set1 =3D std::mem_fn(&amp;A2::set, &amp;a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::shared_ptr&lt;A2&gt; sh_a(new A2(22));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto inc =3D std::mem_fn(&amp;A2::inc, sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto incp =3D std::mem_fn(&amp;A2::incp, sh_a); </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::unique_ptr&lt;A2&gt; u_a(new A2(22));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto u_inc =3D std::mem_fn(&amp;A2::inc, std::move(u_a));</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:11.0pt;line-height:115%;
font-family:"Anonymous Pro"'>int ux =3D 5;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>&nbsp;&nbsp;&nbsp;
int u_k =3D u_inc(ux);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
lang=3DFR style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous=
 Pro"'>&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:=
"Anonymous Pro"'>std::cout
&lt;&lt; &quot;unique u_k: &quot; &lt;&lt;&nbsp; u_k &lt;&lt; std::endl;</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto af8&nbsp; =3D std::mem_fn(&amp;A2::f8,sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto b_af8 =3D std::bind(&amp;A2::f8, sh_a, _1, _2, _3, _4, _5, _6, _7,
_8);&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
set1(15);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a.get():&quot; &lt;&lt; a.get() &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto sh_get&nbsp; =3D std::mem_fn(&amp;A2::get,sh_a);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;sh_get:&quot; &lt;&lt; sh_get() &lt;&lt;
std::endl;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int x =3D 5;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int k =3D inc(x);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
int&amp; k2 =3D incp(x);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
k2 *=3D 7;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a.get():&quot; &lt;&lt; a.get() &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;k: &quot; &lt;&lt; k &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;x: &quot; &lt;&lt; x &lt;&lt; std::endl;</span></b=
></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;af8(1,2,3,4,5,6,7,8): &quot; &lt;&lt; af8(1,2,3,4,=
5,6,7,8)
&lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;b_af8(1,2,3,4,5,6,7,8): &quot; &lt;&lt;
b_af8(1,2,3,4,5,6,7,8) &lt;&lt; std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
volatile A2 av(45);&nbsp;&nbsp;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getv2 =3D
std::mem_fn(&amp;A2::getv,&amp;av);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;volatile getv2:&quot; &lt;&lt; getv2() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
const A2 ac(7);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getc =3D std::mem_fn(&amp;A2::get,ac);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;getc: &quot; &lt;&lt; getc() &lt;&lt; std::endl;</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
A3 a3(5);</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto getv3 =3D std::mem_fn(&amp;A2::getv,a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;getv3: &quot; &lt;&lt; getv3() &lt;&lt; std::endl;=
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_A2get =3D
std::mem_fn(&amp;A2::get,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_A2get: &quot; &lt;&lt; a3_A2get() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_A2getv =3D
std::mem_fn(&amp;A2::getv,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_A2getv: &quot; &lt;&lt; a3_A2getv() &lt;&lt;
std::endl;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_get =3D std::mem_fn(&amp;A3::get,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_get: &quot; &lt;&lt; a3_get() &lt;&lt; std::end=
l;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto a3_get1 =3D
std::mem_fn(&amp;A3::get3,&amp;a3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;a3_get1: &quot; &lt;&lt; a3_get1() &lt;&lt;
std::endl;&nbsp; </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto r_get =3D std::mem_fn(&amp;A2::get,std::ref(ac));&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;r_get: &quot; &lt;&lt; r_get() &lt;&lt; std::endl;=
 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
const A2&amp; ref_a2 =3D ac;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;&nbsp;&nbsp;
auto ref_get =3D&nbsp;
std::mem_fn(&amp;A2::get,ref_a2);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </spa=
n></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>std::cout
&lt;&lt; &quot;ref_get: &quot; &lt;&lt; ref_get() &lt;&lt; std::endl;</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>&nbsp;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>auto
rsh_get =3D std::mem_fn(&amp;A2::get,std::ref(sh_a));=A0=A0=A0 =A0=A0=A0</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>=A0=
=A0=A0 std::cout
&lt;&lt; &quot;rsh_get: &quot; &lt;&lt; rsh_get() &lt;&lt; std::endl;=A0=A0=
=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>=A0=A0=A0
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>A2*
pa =3D &amp;a;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>auto
rp_get =3D std::mem_fn(&amp;A2::get,std::ref(pa));=A0=A0=A0=A0=A0=A0 </span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;text-=
indent:
24.0pt'><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:"An=
onymous Pro"'>std::cout
&lt;&lt; &quot;rp_get: &quot; &lt;&lt; rp_get() &lt;&lt; std::endl;=A0=A0=
=A0 =A0=A0=A0=A0=A0=A0=A0=A0 </span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>}</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt'><b><=
span
style=3D'font-size:11.0pt;line-height:115%;font-family:"Anonymous Pro"'>&nb=
sp;</span></b></p>

<p class=3DMsoNormal>This program will print:</p>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>for a get2: 11</span></span></h=
3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>for b get2: 25</span></span></h=
3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>get1: 11</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a_get_plus100: 111</span></span=
></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
lang=3DFR style=3D'font-size:12.0pt;line-height:115%'>unique u_k: 27</span>=
</span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
lang=3DFR style=3D'font-size:12.0pt;line-height:115%'>a.get():15</span></sp=
an></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>sh_get:22</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a.get():15</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>k: 27</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>x: 224</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>af8(1,2,3,4,5,6,7,8): 63</span>=
</span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>b_af8(1,2,3,4,5,6,7,8): 63</spa=
n></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>volatile getv2:45</span></span>=
</h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>getc: 7</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>getv3: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_A2get: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_A2getv: 5</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_get: 25</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>a3_get1: 125</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>r_get: 7</span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span class=3DMsoIntenseEmph=
asis><span
style=3D'font-size:12.0pt;line-height:115%'>ref_get: 7 </span></span></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span style=3D'font-size:12.=
0pt;
line-height:115%;font-family:"Trebuchet MS","sans-serif"'>rsh_get: 27</span=
></h3>

<h3 style=3D'margin:0cm;margin-bottom:.0001pt'><span style=3D'font-size:12.=
0pt;
line-height:115%;font-family:"Trebuchet MS","sans-serif"'>rp_get: 15</span>=
</h3>

<h3><span class=3DMsoIntenseEmphasis><u>Example 2.</u></span></h3>

<p class=3DMsoNormal>This program&nbsp; shows how to apply <b>mem_fn</b> to=
&nbsp;
overloaded member functions:</p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;iostream&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;functional&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"'>#in=
clude
&lt;vector&gt;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>class
B</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
double x;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; y;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>public:</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>&nbsp;&nbsp;&nbsp;
B(double x1):x(x1),y(3) </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span lang=3DFR style=3D'font-size:11.0pt;font-family:"Anon=
ymous Pro"'>&nbsp;&nbsp;&nbsp;
</span></strong><strong><span style=3D'font-size:11.0pt;font-family:"Anonym=
ous Pro"'>{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[0] =3D 1.5;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[1] =3D 2.7;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
y[2] =3D 4.9;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; add_vector(std::vector&lt;double&gt;&amp;&amp; z)=
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;move&quot; &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; <=
/span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
z[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return std::move(z);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; add_vector(const std::vector&lt;double&gt;&amp; z=
)
const</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;copy&quot; &lt;&lt; std::endl;&nbsp;&nbsp;&nbsp; <=
/span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; c(z);&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
c[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return c;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
void add_vector(std::vector&lt;double&gt;&amp; z)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;out&quot; &lt;&lt;
std::endl;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
z[i] +=3D y[i];</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>};</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>int
main()</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>{&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
B b(3.5);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v(3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[0] =3D 10.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[1] =3D 100.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v[2] =3D 1000.0;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_copy =3D std::mem_fn(static_cast&lt;std::vector&lt;double=
&gt;(B::*)(const
std::vector&lt;double&gt;&amp;) const&gt;(&amp;B::add_vector), &amp;b); </s=
pan></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v1 =3D b_add_vector_copy(v); </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v.size(): &quot; &lt;&lt; v.size() &lt;&lt; std::e=
ndl;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v1: &quot; &lt;&lt; v1[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_move =3D
std::mem_fn(static_cast&lt;std::vector&lt;double&gt;(B::*)(std::vector&lt;d=
ouble&gt;&amp;&amp;)&gt;(&amp;B::add_vector),&amp;b);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v2 =3D b_add_vector_move(std::move(v));</span></s=
trong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v.size(): &quot; &lt;&lt; v.size() &lt;&lt; std::e=
ndl;
// v size is now 0</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v2: &quot; &lt;&lt; v2[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
std::vector&lt;double&gt; v3(3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[0] =3D 10.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[1] =3D 100.0;</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
v3[2] =3D 1000.0;&nbsp;&nbsp;&nbsp; </span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
auto b_add_vector_ref =3D
std::mem_fn(static_cast&lt;void(B::*)(std::vector&lt;double&gt;&amp;)&gt;(&=
amp;B::add_vector),&amp;b);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
b_add_vector_ref(v3);</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
for (int i =3D 0; i &lt; 3; i++)</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
{</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
std::cout &lt;&lt; &quot;v3: &quot; &lt;&lt; v3[i] &lt;&lt; std::endl;</spa=
n></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;&nbsp;&nbsp;
}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>}</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-size:11.0pt;font-family:"Anonymous Pro"=
'>&nbsp;</span></strong></p>

<p class=3DMsoNormal><strong><span style=3D'font-family:"Times New Roman","=
serif";
font-weight:normal'>This program will print:</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>cop=
y</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v.s=
ize():
3</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v1:
1004.9</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>mov=
e</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v.s=
ize():
0</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v2:
1004.9</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>out=
</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:=
 11.5</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:=
 102.7</span></strong></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><strong><span style=3D'font-family:"Trebuchet MS","sans-serif"'>v3:
1004.9</span></strong></p>

<p class=3DMsoNormal>&nbsp;</p>

<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>3.<span style=3D'font-=
size:
7.0pt;line-height:115%'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Implementation</h2>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>namespace =
std</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;_P&amp;,_SIG _T&amp;&gt;::value, _=
SIG
_T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
static_cast&lt;_SIG _T&amp;&gt;(x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef2(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;typename _P::element_type&amp;, _S=
IG
_T&amp;&gt;::value, _SIG _T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
static_cast&lt;_SIG _T&amp;&gt;(*x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef3(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;_P, _SIG _T*&gt;::value, _SIG
_T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0_getRef=
 ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
*static_cast&lt;_SIG _T*&gt;(x);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_getRef4(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template
&lt;class _P, class _R, class _T, class ... _A&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typename
std::enable_if&lt;std::is_convertible&lt;typename _P::type::element_type&am=
p;,
_SIG _T&amp;&gt;::value, _SIG _T&amp;&gt;::type \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef ##
_NAME(_R (_T::*f)(_A ...) _SIG, _P&amp; x)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>=A0=A0=A0 =
return
static_cast&lt;_SIG _T&amp;&gt;(*(x.get()));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef1(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef2(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef3(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(,=
_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(c=
onst,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(c=
onst
volatile,_const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_getRef4(v=
olatile,_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate2(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R, class _Arg1, class _Arg2, class ... _Arg&gt;\=
</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate2
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typename std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consola=
s'>_R
(_T::*f1)(_Arg1, _Arg2, _Arg ... ) </span></b><b><span style=3D'font-size:1=
0.0pt;
font-family:Consolas'>_SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>public:\</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _Arg1 first_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _Arg2 second_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_delegate2 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg2, _Arg ... ) _SIG,
_OBJECT1&amp;&amp; _obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)=
\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_Arg1 _x1, _Arg2 _x2, _Arg ...&nbsp; _x) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1),
std::forward&lt;_Arg2&gt;(_x2), std::forward&lt;_Arg&gt;(_x) ...);\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate2(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R, class _Arg1&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate1
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typename std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consola=
s'>_R
(_T::*f1)(_Arg1) _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typedef=
 _Arg1
argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1) _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_Arg1 _x1) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1=
));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_two_param_delegate0(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT1, class _T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class _del=
egate0
## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typename std::decay&lt;_OBJECT1&gt;::type _obj;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
</span></b><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consola=
s'>_R
(_T::*f1)() _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typedef=
 _R
return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_delegate0 ## _NAME(_R (_T::*_fx)() _SIG, _OBJECT1&amp;&amp;
_obj1):_obj(std::forward&lt;_OBJECT1&gt;(_obj1)),f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()() _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)();\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_two_param=
_delegate0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_param_delegate1(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R, class _Arg1, class ... _Arg&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class
_one_p_delegate1 ## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
_R (_T::*f1)(_Arg1, _Arg ... ) _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>public:\</=
span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _SIG _T* first_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _Arg1 second_argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_one_p_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg ... ) _SIG):f1(_fx)\</s=
pan></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
template&lt;class _OBJECT&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_OBJECT _obj,_Arg1 _x1, _Arg ...&nbsp; _x) _SIG\</span></b></=
p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)(std::forward&lt;_Arg1&gt;(_x1=
),
std::forward&lt;_Arg&gt;(_x) ...);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_param_delegate0(_SIG, _NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>class
_one_p_delegate0 ## _NAME\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
_R (_T::*f1)() _SIG;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
public:\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span lang=3DFR style=3D'font-size:10.0pt;font-family:Consolas'>=
&nbsp;&nbsp;&nbsp;
</span></b><b><span style=3D'font-size:10.0pt;font-family:Consolas'>typedef=
 _SIG
_T* argument_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
typedef _R return_type;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_one_p_delegate0 ## _NAME(_R (_T::*_fx)() _SIG):f1(_fx)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
} \</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>\</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
template&lt;class _OBJECT&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
_R operator()(_OBJECT _obj) _SIG\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
{\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return (_getRef&nbsp; ## _NAME(f1, _obj).*f1)();\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
}\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>};</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(const,
_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_param=
_delegate0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro2(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R, class _Arg1, class _Arg2, class ... _Arg&gt;\<=
/span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate2=
 ##
_NAME&lt;_OBJECT,_T,_R,_Arg1, _Arg2, _Arg ... &gt; mem_fn(_R (_T::*_f)(_Arg=
1, _Arg2,
_Arg ... ) _SIG, _OBJECT&amp;&amp; _obj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _delegate2 ## _NAME &lt;_OBJECT,_T,_R, _Arg1, _Arg2, _Arg ... &gt;(_=
f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro2(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro1(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R, class _Arg1&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate1=
 ##
_NAME&lt;_OBJECT,_T,_R,_Arg1&gt; mem_fn(_R (_T::*_f)(_Arg1) _SIG,
_OBJECT&amp;&amp; _obj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _delegate1 ## _NAME &lt;_OBJECT,_T,_R, _Arg1&gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_mem_fn_macro0(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_OBJECT, class _T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_delegate0=
 ##
_NAME&lt;_OBJECT,_T,_R&gt; mem_fn(_R (_T::*_f)() _SIG, _OBJECT&amp;&amp; _o=
bj)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _delegate0 ## _NAME &lt;_OBJECT,_T,_R&gt;(_f,
std::forward&lt;_OBJECT&gt;(_obj));\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_mem_fn_ma=
cro0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_p_mem_fn_macro1(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R, class _Arg1, class ... _Arg&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_del=
egate1
## _NAME&lt;_T,_R,_Arg1, _Arg ... </span></b><b><span lang=3DFR style=3D'fo=
nt-size:
10.0pt;font-family:Consolas'>&gt; mem_fn(_R (_T::*_f)(_Arg1, _Arg ... ) </s=
pan></b><b><span
style=3D'font-size:10.0pt;font-family:Consolas'>_SIG)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _one_p_delegate1 ## _NAME &lt;_T,_R,_Arg1, _Arg ... &gt;(_f);\</span=
></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro1(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>#define
_one_p_mem_fn_macro0(_SIG,_NAME)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>template&l=
t;class
_T, class _R&gt;\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_del=
egate0
## _NAME&lt;_T,_R&gt; mem_fn(_R (_T::*_f)() _SIG)\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>{\</span><=
/b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;&nbs=
p;&nbsp;
return _one_p_delegate0 ## _NAME &lt;_T,_R&gt;(_f);\</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(,_simple)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(const,_const)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(const
volatile, _const_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>_one_p_mem=
_fn_macro0(volatile,
_volatile)</span></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>&nbsp;</sp=
an></b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'>}</span></=
b></p>

<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'>&nbsp;</p>

</div>

</body>

</html>

------=_Part_55_10639468.1380224531699--

.


Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sat, 28 Sep 2013 23:26:18 -0500
Raw View
Thanks for the proposals. The Library Evolution group in Chicago
reviewed mem_fn and concluded that it's generally not worth extending
the callable wrappers, and that users should just use lambdas in
nearly all cases. C++14's generic lambdas with variadic captures make
this an even better tradeoff (note, I didn't compile this):

 double r = integrate
              ([&a](const auto&... args) { return a.fa(args...);},
                 x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);

http://wiki.edg.com/twiki/bin/view/Wg21chicago2013/N3702

On Thu, Sep 26, 2013 at 2:42 PM, Mikhail Semenov
<mikhailsemenov1957@gmail.com> wrote:
> Revised proposal: support for a unique pointer and reference wrapper as a
> second parameter is added, including a reference to a shared pointer. The
> second parameter is move-constructible.
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.

--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Sun, 29 Sep 2013 00:36:38 -0700 (PDT)
Raw View
------=_Part_1277_2243154.1380440198531
Content-Type: text/plain; charset=ISO-8859-1

It can be done even better:
*#define memb_delegate(_a, _f)\*
*  [&(_a)](auto&& ... _args) { return
(_a)._f(std::forward<decltype(_args)>(_args)...);}*

This can be used like this:
*double r = integrate(member_delegate(a, fa),  x1, x2, y1, y2, z1, z2, a1,
a2, b1, b2);*

(I haven't compiled it either).

I works with various parameters.

I have mentioned it a couple of times during discussions.

By the way, I don't have access to twiki and failed to register.



On Sunday, September 29, 2013 5:26:18 AM UTC+1, Jeffrey Yasskin wrote:

> Thanks for the proposals. The Library Evolution group in Chicago
> reviewed mem_fn and concluded that it's generally not worth extending
> the callable wrappers, and that users should just use lambdas in
> nearly all cases. C++14's generic lambdas with variadic captures make
> this an even better tradeoff (note, I didn't compile this):
>
>  double r = integrate
>               ([&a](const auto&... args) { return a.fa(args...);},
>                  x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);
>
> http://wiki.edg.com/twiki/bin/view/Wg21chicago2013/N3702
>
> On Thu, Sep 26, 2013 at 2:42 PM, Mikhail Semenov
> <mikhailse...@gmail.com <javascript:>> wrote:
> > Revised proposal: support for a unique pointer and reference wrapper as
> a
> > second parameter is added, including a reference to a shared pointer.
> The
> > second parameter is move-constructible.
> >
> >
> > --
> >
> > ---
> > You received this message because you are subscribed to the Google
> Groups
> > "ISO C++ Standard - Future Proposals" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to std-proposal...@isocpp.org <javascript:>.
> > To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>
> > Visit this group at
> > http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1277_2243154.1380440198531
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>It can be done even better:</div><div><strong>#define=
 memb_delegate(_a, _f)\</strong></div><div><strong>&nbsp; [&amp;(_a)](auto&=
amp;&amp; ... _args) { return (_a)._f(std::forward&lt;decltype(_args)&gt;(_=
args)...);}</strong> </div><div>&nbsp;</div><div>This can be used like this=
:</div><div><strong>double r =3D integrate(member_delegate(a, fa),&nbsp; x1=
, x2, y1, y2, z1, z2, a1, a2, b1, b2);</strong></div><div>&nbsp;</div><div>=
(I haven't compiled it either).</div><div>&nbsp;</div><div>I works with var=
ious parameters. </div><div>&nbsp;</div><div>I have mentioned it a couple o=
f times during discussions.</div><div>&nbsp;</div><div>By the way, I don't =
have access to twiki and failed to register.</div><div>&nbsp;</div><div>&nb=
sp;</div><div><br>On Sunday, September 29, 2013 5:26:18 AM UTC+1, Jeffrey Y=
asskin wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0=
px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bor=
der-left-width: 1px; border-left-style: solid;">Thanks for the proposals. T=
he Library Evolution group in Chicago
<br>reviewed mem_fn and concluded that it's generally not worth extending
<br>the callable wrappers, and that users should just use lambdas in
<br>nearly all cases. C++14's generic lambdas with variadic captures make
<br>this an even better tradeoff (note, I didn't compile this):
<br>
<br>&nbsp;double r =3D integrate
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ([&amp;a](const auto&a=
mp;... args) { return a.fa(args...);},
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x1, x2, y=
1, y2, z1, z2, a1, a2, b1, b2);
<br>
<br><a href=3D"http://wiki.edg.com/twiki/bin/view/Wg21chicago2013/N3702" ta=
rget=3D"_blank">http://wiki.edg.com/twiki/bin/<wbr>view/Wg21chicago2013/N37=
02</a>
<br>
<br>On Thu, Sep 26, 2013 at 2:42 PM, Mikhail Semenov
<br>&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
19bXdx5Ta8AJ">mikhailse...@gmail.com</a>&gt; wrote:
<br>&gt; Revised proposal: support for a unique pointer and reference wrapp=
er as a
<br>&gt; second parameter is added, including a reference to a shared point=
er. The
<br>&gt; second parameter is move-constructible.
<br>&gt;
<br>&gt;
<br>&gt; --
<br>&gt;
<br>&gt; ---
<br>&gt; You received this message because you are subscribed to the Google=
 Groups
<br>&gt; "ISO C++ Standard - Future Proposals" group.
<br>&gt; To unsubscribe from this group and stop receiving emails from it, =
send an
<br>&gt; email to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-=
mailto=3D"19bXdx5Ta8AJ">std-proposal...@<wbr>isocpp.org</a>.
<br>&gt; To post to this group, send email to <a href=3D"javascript:" targe=
t=3D"_blank" gdf-obfuscated-mailto=3D"19bXdx5Ta8AJ">std-pr...@isocpp.org</a=
>.
<br>&gt; Visit this group at
<br>&gt; <a href=3D"http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/" target=3D"_blank">http://groups.google.com/a/<wbr>isocpp.org/group/std=
-<wbr>proposals/</a>.
<br></blockquote></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1277_2243154.1380440198531--

.


Author: tomaszkam@gmail.com
Date: Sun, 29 Sep 2013 05:17:56 -0700 (PDT)
Raw View
------=_Part_89_22566674.1380457076201
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable



W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+2 u=BFytkownik Jeffrey=20
Yasskin napisa=B3:
>
> Thanks for the proposals. The Library Evolution group in Chicago=20
> reviewed mem_fn and concluded that it's generally not worth extending=20
> the callable wrappers, and that users should just use lambdas in=20
> nearly all cases. C++14's generic lambdas with variadic captures make=20
> this an even better tradeoff (note, I didn't compile this):=20
>
>  double r =3D integrate=20
>               ([&a](const auto&... args) { return a.fa(args...);},=20
>                  x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);=20
>
> To work with any parameter/return (references) type combination, this=20
should be written as:
 double r =3D integrate(
              [&a](auto&&... args) -> decltype(auto)
              { return a.fa(std::forward<decltype(auto)>(args)...); });

Which is pretty less readable and less intent clear than:
 double r =3D integrate(std::mem_fn(&A::a, std::ref(a)));

In my opinion the deifference between this 2 cases may be compared with the=
=20
diference between using
hand-writtern loop versus algorithm.

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_89_22566674.1380457076201
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+=
2 u=BFytkownik Jeffrey Yasskin napisa=B3:<blockquote class=3D"gmail_quote" =
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-l=
eft: 1ex;">Thanks for the proposals. The Library Evolution group in Chicago
<br>reviewed mem_fn and concluded that it's generally not worth extending
<br>the callable wrappers, and that users should just use lambdas in
<br>nearly all cases. C++14's generic lambdas with variadic captures make
<br>this an even better tradeoff (note, I didn't compile this):
<br>
<br>&nbsp;double r =3D integrate
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ([&amp;a](const auto&a=
mp;... args) { return a.fa(args...);},
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x1, x2, y=
1, y2, z1, z2, a1, a2, b1, b2);
<br>
<br></blockquote><div>To work with any parameter/return (references) type c=
ombination, this should be written as:<br><span style=3D"font-family: couri=
er new,monospace;">&nbsp;double r =3D integrate(<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&amp;a](auto&amp;&=
amp;... args) -&gt; decltype(auto)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; { return a.fa(std::forward&lt;decltype(auto)&gt;(args)...); });=
</span><br><br>Which is pretty less readable and less intent clear than:<br=
><span style=3D"font-family: courier new,monospace;">&nbsp;double r =3D int=
egrate(std::mem_fn(&amp;A::a, std::ref(a)));<br><br><font face=3D"arial,san=
s-serif">In my opinion the deifference between this 2 cases may be compared=
 with the diference between using<br>hand-writtern loop versus algorithm.<b=
r></font></span></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_89_22566674.1380457076201--

.


Author: tomaszkam@gmail.com
Date: Sun, 29 Sep 2013 06:06:15 -0700 (PDT)
Raw View
------=_Part_1398_26331576.1380459975373
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable



W dniu niedziela, 29 wrze=B6nia 2013 14:17:56 UTC+2 u=BFytkownik=20
toma...@gmail.com napisa=B3:
>
>
>
> W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+2 u=BFytkownik Jeffrey=
=20
> Yasskin napisa=B3:
>>
>> Thanks for the proposals. The Library Evolution group in Chicago=20
>> reviewed mem_fn and concluded that it's generally not worth extending=20
>> the callable wrappers, and that users should just use lambdas in=20
>> nearly all cases. C++14's generic lambdas with variadic captures make=20
>> this an even better tradeoff (note, I didn't compile this):=20
>>
>>  double r =3D integrate=20
>>               ([&a](const auto&... args) { return a.fa(args...);},=20
>>                  x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);=20
>>
>> To work with any parameter/return (references) type combination, this=20
> should be written as:
>  double r =3D integrate(
>               [&a](auto&&... args) -> decltype(auto)
>               { return a.fa(std::forward<decltype(auto)>(args)...); });
>
> Which is pretty less readable and less intent clear than:
>  double r =3D integrate(std::mem_fn(&A::a, std::ref(a)));
>
> In my opinion the deifference between this 2 cases may be compared with=
=20
> the diference between using
> hand-writtern loop versus algorithm.
>

Also I think that requiring the programmer to use (and obviously know)=20
varidatic templates (lambdas), value-categories (forward) and return type=
=20
deduction=20
to do simple task of binding member function with the object (a.fo) is not=
=20
a good direction if we want to make C++ more friendly.

"Make simple things simple".

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_1398_26331576.1380459975373
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>W dniu niedziela, 29 wrze=B6nia 2013 14:17:56 UTC+=
2 u=BFytkownik toma...@gmail.com napisa=B3:<blockquote class=3D"gmail_quote=
" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding=
-left: 1ex;"><div dir=3D"ltr"><br><br>W dniu niedziela, 29 wrze=B6nia 2013 =
06:26:18 UTC+2 u=BFytkownik Jeffrey Yasskin napisa=B3:<blockquote class=3D"=
gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid=
;padding-left:1ex">Thanks for the proposals. The Library Evolution group in=
 Chicago
<br>reviewed mem_fn and concluded that it's generally not worth extending
<br>the callable wrappers, and that users should just use lambdas in
<br>nearly all cases. C++14's generic lambdas with variadic captures make
<br>this an even better tradeoff (note, I didn't compile this):
<br>
<br>&nbsp;double r =3D integrate
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ([&amp;a](const auto&a=
mp;... args) { return a.fa(args...);},
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x1, x2, y=
1, y2, z1, z2, a1, a2, b1, b2);
<br>
<br></blockquote><div>To work with any parameter/return (references) type c=
ombination, this should be written as:<br><span style=3D"font-family:courie=
r new,monospace">&nbsp;double r =3D integrate(<br>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&amp;a](auto&amp;&am=
p;... args) -&gt; decltype(auto)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbs=
p; &nbsp; { return a.fa(std::forward&lt;decltype(<wbr>auto)&gt;(args)...); =
});</span><br><br>Which is pretty less readable and less intent clear than:=
<br><span style=3D"font-family:courier new,monospace">&nbsp;double r =3D in=
tegrate(std::mem_fn(&amp;A::a, std::ref(a)));<br><br><font face=3D"arial,sa=
ns-serif">In my opinion the deifference between this 2 cases may be compare=
d with the diference between using<br>hand-writtern loop versus algorithm.<=
br></font></span></div></div></blockquote><div><br>Also I think that requir=
ing the programmer to use (and obviously know) varidatic templates (lambdas=
), value-categories (forward) and return type deduction <br>to do simple ta=
sk of binding member function with the object (a.fo) is not a good directio=
n if we want to make C++ more friendly.<br><br>"Make simple things simple".=
<br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1398_26331576.1380459975373--

.


Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Sun, 29 Sep 2013 07:21:36 -0700 (PDT)
Raw View
------=_Part_1527_15706187.1380464496782
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

N3690, page 90, example:
=20

return [=3D](auto&& ... ts) { // OK: ts is a function parameter pack
printer(std::forward<decltype(ts)>(ts)...);

....

=20

The* decltype(ts),* not* decltype(auto),* otherwise the type is not clear.

=20

As for the return *-> decltype(auto)*, it was always optional for lambdas,=
=20
especially it there is one return statement.

=20

=20

=20

=20
=20

On Sunday, September 29, 2013 1:17:56 PM UTC+1, toma...@gmail.com wrote:

>
>
> W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+2 u=BFytkownik Jeffrey=
=20
> Yasskin napisa=B3:
>>
>> Thanks for the proposals. The Library Evolution group in Chicago=20
>> reviewed mem_fn and concluded that it's generally not worth extending=20
>> the callable wrappers, and that users should just use lambdas in=20
>> nearly all cases. C++14's generic lambdas with variadic captures make=20
>> this an even better tradeoff (note, I didn't compile this):=20
>>
>>  double r =3D integrate=20
>>               ([&a](const auto&... args) { return a.fa(args...);},=20
>>                  x1, x2, y1, y2, z1, z2, a1, a2, b1, b2);=20
>>
>> To work with any parameter/return (references) type combination, this=20
> should be written as:
>  double r =3D integrate(
>               [&a](auto&&... args) -> decltype(auto)
>               { return a.fa(std::forward<decltype(auto)>(args)...); });
>
> Which is pretty less readable and less intent clear than:
>  double r =3D integrate(std::mem_fn(&A::a, std::ref(a)));
>
> In my opinion the deifference between this 2 cases may be compared with=
=20
> the diference between using
> hand-writtern loop versus algorithm.
>

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_1527_15706187.1380464496782
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>N3690, page 90, example:</div><div>&nbsp;</div><div><=
font face=3D"LMMono9-Regular" size=3D"1"><font face=3D"LMMono9-Regular" siz=
e=3D"1"><p align=3D"LEFT">return [=3D](auto&amp;&amp; ... ts) { // OK: ts i=
s a function parameter pack<br>printer(std::forward&lt;decltype(ts)&gt;(ts)=
....);<p align=3D"LEFT">...<p align=3D"LEFT">&nbsp;<p align=3D"LEFT">The<str=
ong> decltype(ts),</strong> not<strong> decltype(auto),</strong> otherwise =
the type is not clear.<p align=3D"LEFT">&nbsp;<p align=3D"LEFT">As for the =
return <font face=3D"Courier New"><strong>-&gt; decltype(auto)</strong>, it=
 was always optional for lambdas, especially it there is one return stateme=
nt.</font><br><p align=3D"LEFT">&nbsp;<p align=3D"LEFT">&nbsp;<p align=3D"L=
EFT">&nbsp;</p></font></font><font face=3D"LMMono9-Regular" size=3D"1"><fon=
t face=3D"LMMono9-Regular" size=3D"1"><p>&nbsp;</p></font></font></div><div=
>&nbsp;</div><div><br>On Sunday, September 29, 2013 1:17:56 PM UTC+1, toma.=
...@gmail.com wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin:=
 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204=
); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><br>=
<br>W dniu niedziela, 29 wrze=B6nia 2013 06:26:18 UTC+2 u=BFytkownik Jeffre=
y Yasskin napisa=B3:<blockquote class=3D"gmail_quote" style=3D"margin: 0px =
0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); bo=
rder-left-width: 1px; border-left-style: solid;">Thanks for the proposals. =
The Library Evolution group in Chicago
<br>reviewed mem_fn and concluded that it's generally not worth extending
<br>the callable wrappers, and that users should just use lambdas in
<br>nearly all cases. C++14's generic lambdas with variadic captures make
<br>this an even better tradeoff (note, I didn't compile this):
<br>
<br>&nbsp;double r =3D integrate
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ([&amp;a](const auto&a=
mp;... args) { return a.fa(args...);},
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x1, x2, y=
1, y2, z1, z2, a1, a2, b1, b2);
<br>
<br></blockquote><div>To work with any parameter/return (references) type c=
ombination, this should be written as:<br><span style=3D"font-family: couri=
er new,monospace;">&nbsp;double r =3D integrate(<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&amp;a](auto&amp;&=
amp;... args) -&gt; decltype(auto)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; { return a.fa(std::forward&lt;decltype(<wbr>auto)&gt;(args)...)=
; });</span><br><br>Which is pretty less readable and less intent clear tha=
n:<br><span style=3D"font-family: courier new,monospace;">&nbsp;double r =
=3D integrate(std::mem_fn(&amp;A::a, std::ref(a)));<br><br><font face=3D"ar=
ial,sans-serif">In my opinion the deifference between this 2 cases may be c=
ompared with the diference between using<br>hand-writtern loop versus algor=
ithm.<br></font></span></div></div></blockquote></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1527_15706187.1380464496782--

.


Author: tomaszkam@gmail.com
Date: Sun, 29 Sep 2013 07:35:27 -0700 (PDT)
Raw View
------=_Part_184_33045817.1380465327980
Content-Type: text/plain; charset=ISO-8859-1



> The* decltype(ts),* not* decltype(auto),* otherwise the type is not clear.
>
That was a mistake.

As for the return *-> decltype(auto)*, it was always optional for lambdas,
> especially it there is one return statement=
>
> No, the return ->auto is optional. The return decltype(auto) is necessary
if the wrapped function returns by reference - by default lambda will
deduce return by value.

--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_184_33045817.1380465327980
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><div><font face=3D"LMMono9-Regular" size=3D"1"><font face=3D"LMMon=
o9-Regular" size=3D"1"><p align=3D"LEFT">The<b> decltype(ts),</b> not<b> de=
cltype(auto),</b> otherwise the type is not clear.</p></font></font></div><=
/div></blockquote><div>That was a mistake. <br><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr"><div><font face=3D"LMMono9-Reg=
ular" size=3D"1"><font face=3D"LMMono9-Regular" size=3D"1"><p align=3D"LEFT=
">As for the return <font face=3D"Courier New"><b>-&gt; decltype(auto)</b>,=
 it was always optional for lambdas, especially it there is one return stat=
ement=3D</font></p></font></font><br></div></div></blockquote><div>No, the =
return -&gt;auto is optional. The return decltype(auto) is necessary if the=
 wrapped function returns by reference - by default lambda will deduce retu=
rn by value. <br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_184_33045817.1380465327980--

.


Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Sun, 29 Sep 2013 07:37:33 -0700 (PDT)
Raw View
------=_Part_1564_1507664.1380465453532
Content-Type: text/plain; charset=ISO-8859-1

>Also I think that requiring the programmer to use (and obviously know)
varidatic templates (lambdas), value-categories (forward) and return type
deduction
>to do simple task of binding member function with the object (*a.fo*<http://a.fo/>)
is not a good direction if we want to make C++ more friendly.

>"Make simple things simple".

I agree with this point, the user has to do a lot in various areas:

(1) libraries, they often provide incomplete surrogate for the real product
(binary search does not return the index, you have to use lower_bound
instead, adding extra checks);
(2) a lot was said in literature about istream iterators, which I find are
practically unusable (you have to clear a lot of strange bits,
to start reading again);
(3) trimming is not done easily, you have to write something yourself;
(4) copy and move require a lot of extra writing, why not standardize swap,
and allow move and copy constructors and assignments
to be derived from an empty constructor, a copy constructor and a swap
operator; a lot of ugly and erroneous would be avoided.





--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1564_1507664.1380465453532
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><font color=3D"#9900ff">&gt;Also I think that requiri=
ng the programmer to use (and obviously know) varidatic templates (lambdas)=
, value-categories (forward) and return type deduction <br>&gt;to do simple=
 task of binding member function with the object (</font><a href=3D"http://=
a.fo/" target=3D"_blank"><font color=3D"#9900ff"><u>a.fo</u></font></a><fon=
t color=3D"#9900ff">) is not a good direction if we want to make C++ more f=
riendly.<br><br>&gt;"Make simple things simple".</font></div><div>&nbsp;</d=
iv><div>I agree with this point, the user has to do a lot in various areas:=
</div><div>&nbsp;</div><div>(1) libraries, they often provide incomplete su=
rrogate for the real product</div><div>(binary search does not return&nbsp;=
the index, you have to use lower_bound instead, adding extra checks);</div>=
<div>(2) a lot was said in literature about istream iterators, which I find=
 are practically unusable (you have to clear a lot of strange bits,</div><d=
iv>to start reading again);</div><div>(3) trimming is not done easily, you =
have to write something yourself;</div><div>(4) copy and move require a lot=
 of extra writing, why not standardize swap, and allow move and copy constr=
uctors and assignments</div><div>to be derived from an empty constructor, a=
 copy constructor and a swap operator; a lot of ugly and erroneous would be=
 avoided.</div><div>&nbsp;</div><div>&nbsp;</div><div><br>&nbsp;</div></div=
>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1564_1507664.1380465453532--

.