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(&C::f. std:make_unique<C>());<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<class R, class T,
class ObjT, class =E2€¦ Arg> </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; &nbs=
p;
unspecified mem_fn(R T::* pm, ObjT&& 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<=
ObjT> and objd for object constructed from std::forward<ObjT>(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<ObjTD, ObjT>::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:"Times N=
ew Roman","serif"">Returns:</span></i></strong><strong><span=
style=3D"font-size:11.0pt;line-height:115%;font-family:"Times New Rom=
an","serif";
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:"Times New Roman","serif"">fn</span></span>=
<strong><span style=3D"font-size:11.0pt;line-height:115%;font-family:"=
Times New Roman","serif";
font-weight:normal"> such that the expression </span></strong><strong><span=
style=3D"font-size:11.0pt;line-height:115%;font-family:"Times New Rom=
an","serif"">fn(a1,
...., aN)</span></strong><strong><span style=3D"font-size:11.0pt;line-height=
:115%;
font-family:"Times New Roman","serif";font-weight:norma=
l"> is equivalent to </span></strong><strong><span style=3D"font-size:11.0p=
t;line-height:115%;font-family:"Times New Roman","serif"=
;">INVOKE(pm, <del>obj</del> <ins>objd</ins>, a1,=
=E2€¦aN)</span></strong><strong><span style=3D"font-size:11.0pt=
;line-height:
115%;font-family:"Times New Roman","serif";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:"Times New Roman","serif";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:"Times =
New Roman","serif"">Throws:
</span></i><strong><span style=3D"font-size:11.0pt;line-height:115%;
font-family:"Times New Roman","serif";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:"Times New Roman","serif"">objd</span>=
<strong><strong><strong><strong><span style=3D"font-size:11.0pt;line-height=
:115%;font-family:"Times New Roman","serif";
font-weight:normal"> throws</span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
>.</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:"Times New Roman","serif""=
>Remarks: </span></strong><i><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
>//Info that returned </span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
></span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
>objec</span><span style=3D"font-size:11.0pt;
line-height:115%;font-family:"Times New Roman","serif""=
>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:"Times New Roman","serif""=
><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 improved implementation, which allows to pass objects, pointers=
to objects and smart pointers as the second parameter to mem_fn. </di=
v></blockquote><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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. I have put a revised version, which includes the support for unique pointers and reference wrappers for the second parameter.</div><div> </div><div>Mikhail.</div><div><br> </div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" 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<<span
class=3Dunsafesenderemail1><span style=3D'color:black'>mikhailsemenov1957=
@gmail.com</span></span>></span></p>
</td>
</tr>
</table>
<h1> </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%'> </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, 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 a library): </p>
<p class=3DMsoNormal><strong><span lang=3DFR>double
integrate(std::function<double(double, double, double, double, double)&g=
t;
f,</span></strong></p>
<p class=3DMsoNormal><strong><span lang=3DFR> =
&nb=
sp;
double x1, double x2, double y1, double y2, double z1, double z2, dou=
ble
a1, double a2, double b1, double b2) ;</span></strong></p>
<p class=3DMsoNormal>We need to call <b>integrate</b> with 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> double p;</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'><strong>public:</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> A(double p1):p(p1) {}</s=
trong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> void set_param(double p1=
)
{ p =3D p1; }</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> 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'> </p>
<p class=3DMsoNormal>The member-variable <b>p</b> is a "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> 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"'>  =
; </span>double
r =3D </strong><strong><span style=3D'font-size:10.5pt;font-family:"Segoe U=
I","sans-serif";
color:black'> </span>integrate(std::bind(&A::fa, &a, _1, _2, _=
3,
_4, _5), x1, x2, y1,y2, z1, z2, </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; &nbs=
p;
a1, a2, b1, b2);</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> </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'>
</span></strong><span style=3D'font-size:10.5pt;font-family:"Segoe UI","san=
s-serif";
color:black'> </span><strong>double r =3D integrate</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> &=
nbsp;
</strong><strong><span lang=3DFR>([&a](double x, double y, double z, do=
uble
a, double b) { return a.fa(x, y, z, a, b);}, =
</span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> &nb=
sp;
x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); </span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> </span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> </=
span></strong><strong><span
style=3D'font-weight:normal'>(3)</span> </strong><strong><span
style=3D'font-weight:normal'>define a global function (a wrapper), which we=
will
use as a 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; &nbs=
p;
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;
=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> 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> </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'> </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>(&A::fa,
&a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); </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%'> </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<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'> 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"'>
</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<class R, class =
T,
class ObjT, class =85 Arg> </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'> &nb=
sp; =
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'> </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<</b><=
/span><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>ObjT>::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<</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'>>::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'> </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'> 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 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 </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"'> </span></sp=
an><span
style=3D'font-size:11.0pt;line-height:115%'>if =A0<b>ObjTD </b>is <b>refere=
nce_wrapper<T></b>,
the value will be <b>objd.get()</b> of type <b>T&</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"'> </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> &</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. 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 < =
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'> 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'> sum +=3D int=
egrate(mem_fn(&A::fa,
&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'> 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 <b>mem_fn</b> to simple member functions, and also its use with a
shared pointer 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 ->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 ->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 ->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)->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)->int& { 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& g)->int& { 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 -=
>
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 ->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 ->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(&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 << "for a get2: " << get2() <<
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(&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 << "for b get2: " << get2() <<
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(&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(&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 << "get1: " << a_get1(&a) <<
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 << "a_get_plus100: " <<=A0 a_get_plus100()
<< 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(&A2::set, &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<A2> 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(&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(&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<A2>
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(&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
<< "unique u_k: " <<=A0 u_k << 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(&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(&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 << "a.get():" << a.get() << 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(&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 << "sh_get:" << sh_get() << 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& 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 << "a.get():" << a.get() <<
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 << "k: " << k << 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 << "x: " << x << 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 << "af8(1,2,3,4,5,6,7,8): " <<
af8(1,2,3,4,5,6,7,8) << 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
<< "b_af8(1,2,3,4,5,6,7,8): " << b_af8(1,2,3,4,5,6,7,=
8)
<< 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(&A2::getv,&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 << "volatile getv2:" << getv2() <<
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(&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 << "getc: " << getc() << 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(&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
<< "getv3: " << getv3() << 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(&A2::get,&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 << "a3_A2get: " << a3_A2get() <<
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(&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 << "a3_A2getv: " << a3_A2getv() <<
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(&A3::get,&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 << "a3_get: " << a3_get() << 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(&A3::get3,&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 << "a3_get1: " << a3_get1() <<
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(&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 << "r_get: " << r_get() << 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& 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(&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
<< "ref_get: " << ref_get() << 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 shows how to apply <b>mem_fn</b> to=
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
<iostream></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
<functional></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
<vector></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"=
'> </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"=
'>
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"=
'>
std::vector<double> 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"'>
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"'>
</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"=
'>
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"=
'>
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"=
'>
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"=
'>
}</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"=
'>
</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"=
'>
std::vector<double> add_vector(std::vector<double>&& 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"=
'>
{ </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"=
'>
std::cout << "move" << std::endl; <=
/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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
}</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"=
'>
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"=
'>
}</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"=
'> </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"=
'> </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"=
'>
std::vector<double> add_vector(const std::vector<double>& 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"=
'>
{ </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"=
'>
std::cout << "copy" << std::endl; <=
/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"=
'>
std::vector<double> c(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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
}</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"=
'>
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"=
'>
}</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"=
'>
void add_vector(std::vector<double>& 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"=
'>
{ </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"=
'>
std::cout << "out" <<
std::endl;  =
; </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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
} </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"=
'>};</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"=
'>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"=
'>{
</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"=
'>
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"=
'>
</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"=
'>
std::vector<double> 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"=
'>
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"=
'>
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"=
'>
v[2] =3D 1000.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"=
'>
</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"=
'>
auto b_add_vector_copy =3D std::mem_fn(static_cast<std::vector<double=
>(B::*)(const
std::vector<double>&) const>(&B::add_vector), &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"=
'>
</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"=
'>
std::vector<double> 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"=
'>
std::cout << "v.size(): " << v.size() << 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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v1: " << v1[i] << 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"=
'>
}</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"=
'>
auto b_add_vector_move =3D
std::mem_fn(static_cast<std::vector<double>(B::*)(std::vector<d=
ouble>&&)>(&B::add_vector),&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"=
'>
std::vector<double> 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"=
'>
std::cout << "v.size(): " << v.size() << 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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v2: " << v2[i] << 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"=
'>
}</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"=
'>
std::vector<double> 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"=
'>
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"=
'>
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"=
'>
v3[2] =3D 1000.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"=
'>
</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"=
'>
auto b_add_vector_ref =3D
std::mem_fn(static_cast<void(B::*)(std::vector<double>&)>(&=
amp;B::add_vector),&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"=
'>
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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v3: " << v3[i] << 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"=
'>
}</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"=
'> </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> </p>
<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>3.<span style=3D'font-=
size:
7.0pt;line-height:115%'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<_P&,_SIG _T&>::value, _=
SIG
_T&>::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& 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<_SIG _T&>(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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<typename _P::element_type&, _S=
IG
_T&>::value, _SIG _T&>::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& 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<_SIG _T&>(*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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<_P, _SIG _T*>::value, _SIG
_T&>::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<_SIG _T*>(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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<typename _P::result_type&, _SI=
G
_T&>::value, _SIG _T&>::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& 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<_SIG _T&>(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'> </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'> </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'> </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'> </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'> </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'> </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>\=
</span></b></p>
<p 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<_OBJECT1>::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&&
_obj1):_obj(std::forward<_OBJECT1>(_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<_Arg1>(_x1),
std::forward<_Arg2>(_x2), std::forward<_Arg>(_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'> </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'> </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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT1>::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&&
_obj1):_obj(std::forward<_OBJECT1>(_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<_Arg1>(_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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT1>::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&&
_obj1):_obj(std::forward<_OBJECT1>(_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'> </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'> </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>\</span></b></p>
<p 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<class _OBJECT>\</span></b></p>
<p 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<_Arg1>(_x1),
std::forward<_Arg>(_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'> </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'> </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>\</span></b></p>
<p 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<class _OBJECT>\</span></b></p>
<p 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'> </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'> </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'> </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>\<=
/span></b></p>
<p 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<_OBJECT,_T,_R,_Arg1, _Arg2, _Arg ... </span></b><b><span lang=3DFR
style=3D'font-size:10.0pt;font-family:Consolas'>> 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&& _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 <_OBJECT,_T,_R, _Arg1, _Arg2, _Arg ... >(_f,
std::forward<_OBJECT>(_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'> </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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT,_T,_R,_Arg1> mem_fn(_R (_T::*_f)(_Arg1) _SIG,
_OBJECT&& _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 <_OBJECT,_T,_R, _Arg1>(_f,
std::forward<_OBJECT>(_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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT,_T,_R> mem_fn(_R (_T::*_f)() _SIG, _OBJECT&& _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 <_OBJECT,_T,_R>(_f,
std::forward<_OBJECT>(_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'> </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'> </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>\</span></b></p>
<p 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<_T,_R,_Arg1, _Arg ... </span></b><b><span lang=3DFR style=3D'fo=
nt-size:
10.0pt;font-family:Consolas'>> 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 <_T,_R,_Arg1, _Arg ... >(_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'> </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'> </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>\</span></b></p>
<p 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<_T,_R> 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 <_T,_R>(_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'> </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'> </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'> </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. I have p=
ut a revised version, which includes the support for unique pointers and re=
ference wrappers for the second parameter.</div><div> </div><div>Mikha=
il. <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&=
& obj.</span></b></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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> </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(&C::f. std:make_unique<C>());<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<class R, class =
T,
class ObjT, class =E2€¦ Arg> </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;"> &nb=
sp; =
&nb=
sp;
unspecified mem_fn(R T::* pm, ObjT&& 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<ObjT> and objd for object constructed from std::forward<O=
bjT>(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<Ob=
jTD, ObjT>::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, <del>=
;obj</del> <ins>objd</ins>, a1,=E2€¦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 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 />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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<<span
class=3Dunsafesenderemail1><span style=3D'color:black'>mikhailsemenov1957=
@gmail.com</span></span>></span></p>
</td>
</tr>
</table>
<h1> </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%'> </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, 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 a library): </p>
<p class=3DMsoNormal><strong><span lang=3DFR>double
integrate(std::function<double(double, double, double, double, double)&g=
t;
f,</span></strong></p>
<p class=3DMsoNormal><strong><span lang=3DFR> =
&nb=
sp;
double x1, double x2, double y1, double y2, double z1, double z2, dou=
ble
a1, double a2, double b1, double b2) ;</span></strong></p>
<p class=3DMsoNormal>We need to call <b>integrate</b> with 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> double p;</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'><strong>public:</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> A(double p1):p(p1) {}</s=
trong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> void set_param(double p1=
)
{ p =3D p1; }</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> 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'> </p>
<p class=3DMsoNormal>The member-variable <b>p</b> is a "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> 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"'>  =
; </span>double
r =3D </strong><strong><span style=3D'font-size:10.5pt;font-family:"Segoe U=
I","sans-serif";
color:black'> </span>integrate(std::bind(&A::fa, &a, _1, _2, _=
3,
_4, _5), x1, x2, y1,y2, z1, z2, </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; &nbs=
p;
a1, a2, b1, b2);</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> </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'>
</span></strong><span style=3D'font-size:10.5pt;font-family:"Segoe UI","san=
s-serif";
color:black'> </span><strong>double r =3D integrate</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> &=
nbsp;
</strong><strong><span lang=3DFR>([&a](double x, double y, double z, do=
uble
a, double b) { return a.fa(x, y, z, a, b);}, =
</span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> &nb=
sp;
x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); </span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> </span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> </=
span></strong><strong><span
style=3D'font-weight:normal'>(3)</span> </strong><strong><span
style=3D'font-weight:normal'>define a global function (a wrapper), which we=
will
use as a 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; &nbs=
p;
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;
=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> 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> </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'> </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>(&A::fa,
&a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); </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%'> </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<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'> 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"'>
</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<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=
> </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'> &nb=
sp; =
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'> </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<=
;</b></span><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>ObjT>::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<
ObjTD, ObjT>::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>
of type <b>ObjTD </b>is constructed from <b>obj</b> during 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'> </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 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'> 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 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 </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%'> </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>if <b>ObjTD </b>is <b>ref=
erence_wrapper<T></b>,
the value will be <b>objd.get()</b> of type <b>T&</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%'> </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>otherwise, the value will be <b=
>objd </b> and
its type is <b>ObjTD <i>cv</i> &</b>, where <b><i>cv</i></b> is the <i>=
cv</i>-qualifier
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. 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 < =
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'> 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'> sum +=3D
integrate(mem_fn(&A::fa, &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'> 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 <b>mem_fn</b> to simple member functions, and also its use with a
shared pointer 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;
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:
</span></b></p>
<p class=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;
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;
auto get()const ->int { 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;
auto getv() volatile ->int { 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;
auto get_plus100() const volatile ->int { return
i+100;} </span></b></p>
<p class=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;
auto set(int v)->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;
auto inc(int g)->int& { 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;
auto incp(int& g)->int& { 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;
</span></b></p>
<p class=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;
auto f8 (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) co=
nst
-> 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;
{</span></b></p>
<p class=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;
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;
} </span></b></p>
<p class=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;
</span></b></p>
<p class=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:
</span></b></p>
<p class=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;
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;
auto get()const ->int { return i*i;} </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;
auto get3()const ->int { return i*i*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"'>};<=
/span></b></p>
<p class=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;
A2 a(11); </span></b></p>
<p class=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;
auto get2 =3D std::mem_fn(&A2::get,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;
std::cout << "for a get2: " << get2() <<
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;
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;
get2 =3D std::mem_fn(&A2::get,
b); </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;
} </span></b></p>
<p class=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;
std::cout << "for b get2: " << get2() <<
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;
auto a_get1 =3D std::mem_fn(&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;
auto a_get_plus100 =3D std::mem_fn(&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;
</span></b></p>
<p class=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;
std::cout << "get1: " << a_get1(&a) <<
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;
std::cout << "a_get_plus100: " << a_get_plus100=
()
<< 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;
auto set1 =3D std::mem_fn(&A2::set, &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;
std::shared_ptr<A2> 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;
auto inc =3D std::mem_fn(&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;
auto incp =3D std::mem_fn(&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;
std::unique_ptr<A2> 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;
auto u_inc =3D std::mem_fn(&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;
</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"'>
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"'>
</span></b><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:=
"Anonymous Pro"'>std::cout
<< "unique u_k: " << u_k << 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;
</span></b></p>
<p class=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;
auto af8 =3D std::mem_fn(&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;
auto b_af8 =3D std::bind(&A2::f8, sh_a, _1, _2, _3, _4, _5, _6, _7,
_8); </span></b></p>
<p class=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; =
&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;
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;
std::cout << "a.get():" << a.get() <<
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;
auto sh_get =3D std::mem_fn(&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;
</span></b></p>
<p class=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;
std::cout << "sh_get:" << sh_get() <<
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;
</span></b></p>
<p class=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;
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;
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;
int& 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;
</span></b></p>
<p class=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;
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;
std::cout << "a.get():" << a.get() <<
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;
std::cout << "k: " << k << 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;
std::cout << "x: " << x << 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;
std::cout << "af8(1,2,3,4,5,6,7,8): " <<
af8(1,2,3,4,5,6,7,8) << 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;
std::cout << "b_af8(1,2,3,4,5,6,7,8): " << b_af8(1,2,=
3,4,5,6,7,8)
<< 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;
volatile A2 av(45); </span></b></p>
<p class=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;
auto getv2 =3D
std::mem_fn(&A2::getv,&av); </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;
std::cout << "volatile getv2:" << getv2() <<
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;
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;
auto getc =3D std::mem_fn(&A2::get,ac); &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;
std::cout << "getc: " << getc() << 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;
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;
</span></b></p>
<p class=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;
auto getv3 =3D std::mem_fn(&A2::getv,a3); =
</span></b></p>
<p class=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;
std::cout << "getv3: " << getv3() << 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;
auto a3_A2get =3D
std::mem_fn(&A2::get,&a3); </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;
std::cout << "a3_A2get: " << a3_A2get() <<
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;
auto a3_A2getv =3D
std::mem_fn(&A2::getv,&a3); </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;
std::cout << "a3_A2getv: " << a3_A2getv() <<
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;
auto a3_get =3D
std::mem_fn(&A3::get,&a3); </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;
std::cout << "a3_get: " << a3_get() << 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;
</span></b></p>
<p class=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;
auto a3_get1 =3D
std::mem_fn(&A3::get3,&a3); </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;
std::cout << "a3_get1: " << a3_get1() <<
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;
auto r_get =3D
std::mem_fn(&A2::get,std::ref(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;
std::cout << "r_get: " << r_get() << 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;
const A2& 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;
auto ref_get =3D
std::mem_fn(&A2::get,ref_a2); </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
<< "ref_get: " << ref_get() << 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 shows how to apply <b>mem_fn</b> to=
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
<iostream></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
<functional></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
<vector></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"=
'> </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"=
'>
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"=
'>
std::vector<double> 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"'>
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"'>
</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"=
'>
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"=
'>
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"=
'>
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"=
'>
}</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"=
'>
</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"=
'>
std::vector<double> add_vector(std::vector<double>&& 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"=
'>
{ </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"=
'>
std::cout << "move" << std::endl; <=
/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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
}</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"=
'>
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"=
'>
}</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"=
'> </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"=
'> </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"=
'>
std::vector<double> add_vector(const std::vector<double>& 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"=
'>
{ </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"=
'>
std::cout << "copy" << std::endl; <=
/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"=
'>
std::vector<double> c(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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
}</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"=
'>
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"=
'>
}</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"=
'>
void add_vector(std::vector<double>& 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"=
'>
{ </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"=
'>
std::cout << "out" <<
std::endl;  =
; </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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
} </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"=
'>};</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"=
'>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"=
'>{
</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"=
'>
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"=
'>
</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"=
'>
std::vector<double> 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"=
'>
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"=
'>
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"=
'>
v[2] =3D 1000.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"=
'>
</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"=
'>
auto b_add_vector_copy =3D
std::mem_fn(static_cast<std::vector<double>(B::*)(const
std::vector<double>&) const>(&B::add_vector), &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"=
'>
</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"=
'>
std::vector<double> 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"=
'>
std::cout << "v.size(): " << v.size() << 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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v1: " << v1[i] << 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"=
'>
}</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"=
'>
auto b_add_vector_move =3D std::mem_fn(static_cast<std::vector<double=
>(B::*)(std::vector<double>&&)>(&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"=
'>
std::vector<double> 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"=
'>
std::cout << "v.size(): " << v.size() << 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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v2: " << v2[i] << 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"=
'>
}</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"=
'>
std::vector<double> 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"=
'>
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"=
'>
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"=
'>
v3[2] =3D 1000.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"=
'>
</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"=
'>
auto b_add_vector_ref =3D
std::mem_fn(static_cast<void(B::*)(std::vector<double>&)>(&=
amp;B::add_vector),&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"=
'>
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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v3: " << v3[i] << 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"=
'>
}</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"=
'> </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> </p>
<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>3.<span style=3D'font-=
size:
7.0pt;line-height:115%'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<_P&,_SIG _T&>::value, _=
SIG
_T&>::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& 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'> &nbs=
p;
return static_cast<_SIG _T&>(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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<typename _P::element_type&, _S=
IG
_T&>::value, _SIG _T&>::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& 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'> &nbs=
p;
return static_cast<_SIG _T&>(*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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<_P, _SIG _T*>::value, _SIG
_T&>::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'> _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'> &nbs=
p;
return *static_cast<_SIG _T*>(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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<typename _P::result_type&, _SI=
G
_T&>::value, _SIG _T&>::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& 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'> &nbs=
p;
return static_cast<_SIG _T&>(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'> </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'> </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'> </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'> </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'> </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'> </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>\=
</span></b></p>
<p 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'> &nbs=
p;
typename std::decay<_OBJECT1>::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'> &nbs=
p;
</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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
_delegate2 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg2, _Arg ... ) _SIG,
_OBJECT1&& _obj1):_obj(std::forward<_OBJECT1>(_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_R operator()(_Arg1 _x1, _Arg2 _x2, _Arg ... _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'> &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'> &nbs=
p;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward<_Arg1>(_x1),
std::forward<_Arg2>(_x2), std::forward<_Arg>(_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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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'> </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'> </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>\</span></b></p>
<p 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'> &nbs=
p;
typename std::decay<_OBJECT1>::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'> &nbs=
p;
</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'>=
</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'> &nbs=
p;
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'> &nbs=
p;
_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1) _SIG, _OBJECT1&&
_obj1):_obj(std::forward<_OBJECT1>(_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_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'> &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'> &nbs=
p;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward<_Arg1>(_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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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>\</span></b></p>
<p 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'> &nbs=
p;
typename std::decay<_OBJECT1>::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'> &nbs=
p;
</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'>=
</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'> &nbs=
p;
_delegate0 ## _NAME(_R (_T::*_fx)() _SIG, _OBJECT1&&
_obj1):_obj(std::forward<_OBJECT1>(_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_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'> &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'> &nbs=
p;
return (_getRef ## _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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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>\</span></b></p>
<p 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'>=
_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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
template<class _OBJECT>\</span></b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_R operator()(_OBJECT _obj,_Arg1 _x1, _Arg ... _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'> &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'> &nbs=
p;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward<_Arg1>(_x1=
),
std::forward<_Arg>(_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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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>\</span></b></p>
<p 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'>=
_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'>=
</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'> &nbs=
p;
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'> &nbs=
p;
_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
template<class _OBJECT>\</span></b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_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'> &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'> &nbs=
p;
return (_getRef ## _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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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'> </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>\<=
/span></b></p>
<p 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<_OBJECT,_T,_R,_Arg1, _Arg2, _Arg ... > mem_fn(_R (_T::*_f)(_Arg=
1,
_Arg2, _Arg ... ) _SIG, _OBJECT&& _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'> &nbs=
p;
return _delegate2 ## _NAME <_OBJECT,_T,_R, _Arg1, _Arg2, _Arg ... >(_=
f,
std::forward<_OBJECT>(_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'> </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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT,_T,_R,_Arg1> mem_fn(_R (_T::*_f)(_Arg1) _SIG,
_OBJECT&& _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'> &nbs=
p;
return _delegate1 ## _NAME <_OBJECT,_T,_R, _Arg1>(_f,
std::forward<_OBJECT>(_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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT,_T,_R> mem_fn(_R (_T::*_f)() _SIG, _OBJECT&& _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'> &nbs=
p;
return _delegate0 ## _NAME <_OBJECT,_T,_R>(_f,
std::forward<_OBJECT>(_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'> </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'> </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>\</span></b></p>
<p 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<_T,_R,_Arg1, _Arg ... </span></b><b><span lang=3DFR style=3D'fo=
nt-size:
10.0pt;font-family:Consolas'>> 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'> &nbs=
p;
return _one_p_delegate1 ## _NAME <_T,_R,_Arg1, _Arg ... >(_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'> </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'> </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>\</span></b></p>
<p 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<_T,_R> 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'> &nbs=
p;
return _one_p_delegate0 ## _NAME <_T,_R>(_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'> </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'> </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'> </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 is move-constructible.</div><div> </div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" 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<<span
class=3Dunsafesenderemail1><span style=3D'color:black'>mikhailsemenov1957=
@gmail.com</span></span>></span></p>
</td>
</tr>
</table>
<h1> </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%'> </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, 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 a library): </p>
<p class=3DMsoNormal><strong><span lang=3DFR>double
integrate(std::function<double(double, double, double, double, double)&g=
t;
f,</span></strong></p>
<p class=3DMsoNormal><strong><span lang=3DFR> =
&nb=
sp;
double x1, double x2, double y1, double y2, double z1, double z2, dou=
ble
a1, double a2, double b1, double b2) ;</span></strong></p>
<p class=3DMsoNormal>We need to call <b>integrate</b> with 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> double p;</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'><strong>public:</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> A(double p1):p(p1) {}</s=
trong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> void set_param(double p1=
)
{ p =3D p1; }</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> 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'> </p>
<p class=3DMsoNormal>The member-variable <b>p</b> is a "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> 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"'>  =
; </span>double
r =3D </strong><strong><span style=3D'font-size:10.5pt;font-family:"Segoe U=
I","sans-serif";
color:black'> </span>integrate(std::bind(&A::fa, &a, _1, _2, _=
3,
_4, _5), x1, x2, y1,y2, z1, z2, </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; &nbs=
p;
a1, a2, b1, b2);</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> </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'>
</span></strong><span style=3D'font-size:10.5pt;font-family:"Segoe UI","san=
s-serif";
color:black'> </span><strong>double r =3D integrate</strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong> &=
nbsp;
</strong><strong><span lang=3DFR>([&a](double x, double y, double z, do=
uble
a, double b) { return a.fa(x, y, z, a, b);}, =
</span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> &nb=
sp;
x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); </span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> </span></strong></p>
<p class=3Decxmsonormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;
background:white'><strong><span lang=3DFR> </=
span></strong><strong><span
style=3D'font-weight:normal'>(3)</span> </strong><strong><span
style=3D'font-weight:normal'>define a global function (a wrapper), which we=
will
use as a 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; &nbs=
p;
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;
=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> 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> </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'> </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>(&A::fa,
&a), x1, x2, y1, y2, z1, z2, a1, a2, b1, b2); </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%'> </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<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'> 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"'>
</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<class R, class =
T,
class ObjT> 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'> </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<=
;</b></span><b><span
style=3D'font-size:11.0pt;font-family:Consolas'>ObjT>::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<
ObjTD, ObjT>::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>
of type <b>ObjTD </b>is constructed from <b>obj</b> during 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'> </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 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'> 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 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 </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%'> </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>if <b>ObjTD </b>is <b>ref=
erence_wrapper<T></b>,
the value will be <b>objd.get()</b> of type <b>T&</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%'> </span>=
<span
style=3D'font-size:11.0pt;line-height:115%'>otherwise, the value will be <b=
>objd </b> and
its type is <b>ObjTD <i>cv</i> &</b>, where <b><i>cv</i></b> is the <i>=
cv</i>-qualifier
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. 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 < =
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'> 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'> sum +=3D
integrate(mem_fn(&A::fa, &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'> 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 <b>mem_fn</b> to simple member functions, and also its use with a
shared pointer 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;
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:
</span></b></p>
<p class=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;
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;
auto get()const ->int { 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;
auto getv() volatile ->int { 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;
auto get_plus100() const volatile ->int { return
i+100;} </span></b></p>
<p class=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;
auto set(int v)->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;
auto inc(int g)->int& { 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;
auto incp(int& g)->int& { 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;
</span></b></p>
<p class=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;
auto f8 (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) co=
nst
-> 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;
{</span></b></p>
<p class=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;
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;
} </span></b></p>
<p class=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;
</span></b></p>
<p class=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:
</span></b></p>
<p class=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;
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;
auto get()const ->int { return i*i;} </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;
auto get3()const ->int { return i*i*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"'>};<=
/span></b></p>
<p class=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;
A2 a(11); </span></b></p>
<p class=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;
auto get2 =3D std::mem_fn(&A2::get,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;
std::cout << "for a get2: " << get2() <<
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;
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;
get2 =3D std::mem_fn(&A2::get,
b); </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;
} </span></b></p>
<p class=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;
std::cout << "for b get2: " << get2() <<
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;
auto a_get1 =3D std::mem_fn(&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;
auto a_get_plus100 =3D std::mem_fn(&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;
</span></b></p>
<p class=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;
std::cout << "get1: " << a_get1(&a) <<
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;
std::cout << "a_get_plus100: " << a_get_plus100=
()
<< 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;
auto set1 =3D std::mem_fn(&A2::set, &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;
std::shared_ptr<A2> 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;
auto inc =3D std::mem_fn(&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;
auto incp =3D std::mem_fn(&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;
std::unique_ptr<A2> 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;
auto u_inc =3D std::mem_fn(&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;
</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"'>
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"'>
</span></b><b><span style=3D'font-size:11.0pt;line-height:115%;font-family:=
"Anonymous Pro"'>std::cout
<< "unique u_k: " << u_k << 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;
</span></b></p>
<p class=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;
auto af8 =3D std::mem_fn(&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;
auto b_af8 =3D std::bind(&A2::f8, sh_a, _1, _2, _3, _4, _5, _6, _7,
_8); </span></b></p>
<p class=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; =
&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;
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;
std::cout << "a.get():" << a.get() <<
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;
auto sh_get =3D std::mem_fn(&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;
</span></b></p>
<p class=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;
std::cout << "sh_get:" << sh_get() <<
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;
</span></b></p>
<p class=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;
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;
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;
int& 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;
</span></b></p>
<p class=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;
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;
std::cout << "a.get():" << a.get() <<
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;
std::cout << "k: " << k << 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;
std::cout << "x: " << x << 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;
std::cout << "af8(1,2,3,4,5,6,7,8): " << af8(1,2,3,4,=
5,6,7,8)
<< 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;
std::cout << "b_af8(1,2,3,4,5,6,7,8): " <<
b_af8(1,2,3,4,5,6,7,8) << 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;
volatile A2 av(45); </span></b></p>
<p class=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;
auto getv2 =3D
std::mem_fn(&A2::getv,&av); </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;
std::cout << "volatile getv2:" << getv2() <<
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;
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;
auto getc =3D std::mem_fn(&A2::get,ac); &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;
std::cout << "getc: " << getc() << 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;
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;
</span></b></p>
<p class=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;
auto getv3 =3D std::mem_fn(&A2::getv,a3); =
</span></b></p>
<p class=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;
std::cout << "getv3: " << getv3() << 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;
auto a3_A2get =3D
std::mem_fn(&A2::get,&a3); </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;
std::cout << "a3_A2get: " << a3_A2get() <<
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;
auto a3_A2getv =3D
std::mem_fn(&A2::getv,&a3); </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;
std::cout << "a3_A2getv: " << a3_A2getv() <<
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;
auto a3_get =3D std::mem_fn(&A3::get,&a3); &=
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;
std::cout << "a3_get: " << a3_get() << 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;
</span></b></p>
<p class=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;
auto a3_get1 =3D
std::mem_fn(&A3::get3,&a3); </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;
std::cout << "a3_get1: " << a3_get1() <<
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;
auto r_get =3D std::mem_fn(&A2::get,std::ref(ac)); &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;
std::cout << "r_get: " << r_get() << 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;
const A2& 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;
auto ref_get =3D
std::mem_fn(&A2::get,ref_a2); </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
<< "ref_get: " << ref_get() << 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"'> </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(&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
<< "rsh_get: " << rsh_get() << 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 &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(&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
<< "rp_get: " << rp_get() << 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 shows how to apply <b>mem_fn</b> to=
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
<iostream></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
<functional></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
<vector></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"=
'> </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"=
'>
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"=
'>
std::vector<double> 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"'>
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"'>
</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"=
'>
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"=
'>
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"=
'>
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"=
'>
}</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"=
'>
</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"=
'>
std::vector<double> add_vector(std::vector<double>&& 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"=
'>
{ </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"=
'>
std::cout << "move" << std::endl; <=
/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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
}</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"=
'>
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"=
'>
}</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"=
'> </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"=
'> </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"=
'>
std::vector<double> add_vector(const std::vector<double>& 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"=
'>
{ </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"=
'>
std::cout << "copy" << std::endl; <=
/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"=
'>
std::vector<double> c(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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
}</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"=
'>
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"=
'>
}</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"=
'>
void add_vector(std::vector<double>& 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"=
'>
{ </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"=
'>
std::cout << "out" <<
std::endl;  =
; </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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
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"=
'>
} </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"=
'>};</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"=
'>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"=
'>{
</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"=
'>
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"=
'>
</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"=
'>
std::vector<double> 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"=
'>
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"=
'>
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"=
'>
v[2] =3D 1000.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"=
'>
</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"=
'>
auto b_add_vector_copy =3D std::mem_fn(static_cast<std::vector<double=
>(B::*)(const
std::vector<double>&) const>(&B::add_vector), &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"=
'>
</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"=
'>
std::vector<double> 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"=
'>
std::cout << "v.size(): " << v.size() << 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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v1: " << v1[i] << 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"=
'>
}</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"=
'>
auto b_add_vector_move =3D
std::mem_fn(static_cast<std::vector<double>(B::*)(std::vector<d=
ouble>&&)>(&B::add_vector),&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"=
'>
std::vector<double> 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"=
'>
std::cout << "v.size(): " << v.size() << 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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v2: " << v2[i] << 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"=
'>
}</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"=
'>
std::vector<double> 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"=
'>
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"=
'>
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"=
'>
v3[2] =3D 1000.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"=
'>
</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"=
'>
auto b_add_vector_ref =3D
std::mem_fn(static_cast<void(B::*)(std::vector<double>&)>(&=
amp;B::add_vector),&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"=
'>
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"=
'>
for (int i =3D 0; i < 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"=
'>
{</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"=
'>
std::cout << "v3: " << v3[i] << 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"=
'>
}</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"=
'> </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> </p>
<h2 style=3D'margin-left:36.0pt;text-indent:-18.0pt'>3.<span style=3D'font-=
size:
7.0pt;line-height:115%'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<_P&,_SIG _T&>::value, _=
SIG
_T&>::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& 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<_SIG _T&>(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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<typename _P::element_type&, _S=
IG
_T&>::value, _SIG _T&>::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& 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<_SIG _T&>(*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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<_P, _SIG _T*>::value, _SIG
_T&>::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<_SIG _T*>(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'> </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
<class _P, class _R, class _T, class ... _A>\</span></b></p>
<p 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<std::is_convertible<typename _P::type::element_type&am=
p;,
_SIG _T&>::value, _SIG _T&>::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& 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<_SIG _T&>(*(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'> </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'> </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'> </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'> </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'> </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'> </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'> &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>\=
</span></b></p>
<p 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'> &nbs=
p;
typename std::decay<_OBJECT1>::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'> &nbs=
p;
</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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
_delegate2 ## _NAME(_R (_T::*_fx)(_Arg1, _Arg2, _Arg ... ) _SIG,
_OBJECT1&& _obj1):_obj(std::forward<_OBJECT1>(_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_R operator()(_Arg1 _x1, _Arg2 _x2, _Arg ... _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'> &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'> &nbs=
p;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward<_Arg1>(_x1),
std::forward<_Arg2>(_x2), std::forward<_Arg>(_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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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'> </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'> </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>\</span></b></p>
<p 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'> &nbs=
p;
typename std::decay<_OBJECT1>::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'> &nbs=
p;
</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'>=
</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'> &nbs=
p;
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'> &nbs=
p;
_delegate1 ## _NAME(_R (_T::*_fx)(_Arg1) _SIG, _OBJECT1&&
_obj1):_obj(std::forward<_OBJECT1>(_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_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'> &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'> &nbs=
p;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward<_Arg1>(_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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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>\</span></b></p>
<p 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'> &nbs=
p;
typename std::decay<_OBJECT1>::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'> &nbs=
p;
</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'>=
</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'> &nbs=
p;
_delegate0 ## _NAME(_R (_T::*_fx)() _SIG, _OBJECT1&&
_obj1):_obj(std::forward<_OBJECT1>(_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_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'> &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'> &nbs=
p;
return (_getRef ## _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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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>\</span></b></p>
<p 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'>=
_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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
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'> &nbs=
p;
_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
template<class _OBJECT>\</span></b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_R operator()(_OBJECT _obj,_Arg1 _x1, _Arg ... _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'> &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'> &nbs=
p;
return (_getRef ## _NAME(f1, _obj).*f1)(std::forward<_Arg1>(_x1=
),
std::forward<_Arg>(_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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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>\</span></b></p>
<p 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'>=
_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'>=
</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'> &nbs=
p;
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'> &nbs=
p;
_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'> &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'> &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'>\</span></=
b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
template<class _OBJECT>\</span></b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> &nbs=
p;
_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'> &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'> &nbs=
p;
return (_getRef ## _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'> &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'>};</span><=
/b></p>
<p class=3DMsoNormal style=3D'margin-bottom:0cm;margin-bottom:.0001pt;line-=
height:
normal'><b><span style=3D'font-size:10.0pt;font-family:Consolas'> </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'> </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'> </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>\<=
/span></b></p>
<p 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<_OBJECT,_T,_R,_Arg1, _Arg2, _Arg ... > mem_fn(_R (_T::*_f)(_Arg=
1, _Arg2,
_Arg ... ) _SIG, _OBJECT&& _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'> &nbs=
p;
return _delegate2 ## _NAME <_OBJECT,_T,_R, _Arg1, _Arg2, _Arg ... >(_=
f,
std::forward<_OBJECT>(_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'> </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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT,_T,_R,_Arg1> mem_fn(_R (_T::*_f)(_Arg1) _SIG,
_OBJECT&& _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'> &nbs=
p;
return _delegate1 ## _NAME <_OBJECT,_T,_R, _Arg1>(_f,
std::forward<_OBJECT>(_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'> </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'> </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>\</span></b></p>
<p 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<_OBJECT,_T,_R> mem_fn(_R (_T::*_f)() _SIG, _OBJECT&& _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'> &nbs=
p;
return _delegate0 ## _NAME <_OBJECT,_T,_R>(_f,
std::forward<_OBJECT>(_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'> </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'> </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>\</span></b></p>
<p 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<_T,_R,_Arg1, _Arg ... </span></b><b><span lang=3DFR style=3D'fo=
nt-size:
10.0pt;font-family:Consolas'>> 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'> &nbs=
p;
return _one_p_delegate1 ## _NAME <_T,_R,_Arg1, _Arg ... >(_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'> </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'> </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>\</span></b></p>
<p 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<_T,_R> 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'> &nbs=
p;
return _one_p_delegate0 ## _NAME <_T,_R>(_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'> </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'> </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'> </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> [&(_a)](auto&=
amp;& ... _args) { return (_a)._f(std::forward<decltype(_args)>(_=
args)...);}</strong> </div><div> </div><div>This can be used like this=
:</div><div><strong>double r =3D integrate(member_delegate(a, fa), x1=
, x2, y1, y2, z1, z2, a1, a2, b1, b2);</strong></div><div> </div><div>=
(I haven't compiled it either).</div><div> </div><div>I works with var=
ious parameters. </div><div> </div><div>I have mentioned it a couple o=
f times during discussions.</div><div> </div><div>By the way, I don't =
have access to twiki and failed to register.</div><div> </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> double r =3D integrate
<br> ([&a](const auto&a=
mp;... args) { return a.fa(args...);},
<br> 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><<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
19bXdx5Ta8AJ">mikhailse...@gmail.com</a>> wrote:
<br>> Revised proposal: support for a unique pointer and reference wrapp=
er as a
<br>> second parameter is added, including a reference to a shared point=
er. The
<br>> second parameter is move-constructible.
<br>>
<br>>
<br>> --
<br>>
<br>> ---
<br>> You received this message because you are subscribed to the Google=
Groups
<br>> "ISO C++ Standard - Future Proposals" group.
<br>> To unsubscribe from this group and stop receiving emails from it, =
send an
<br>> email to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-=
mailto=3D"19bXdx5Ta8AJ">std-proposal...@<wbr>isocpp.org</a>.
<br>> 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>> Visit this group at
<br>> <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 />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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> double r =3D integrate
<br> ([&a](const auto&a=
mp;... args) { return a.fa(args...);},
<br> 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;"> double r =3D integrate(<br>  =
; [&a](auto&&=
amp;... args) -> decltype(auto)<br> &n=
bsp; { return a.fa(std::forward<decltype(auto)>(args)...); });=
</span><br><br>Which is pretty less readable and less intent clear than:<br=
><span style=3D"font-family: courier new,monospace;"> double r =3D int=
egrate(std::mem_fn(&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 />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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> double r =3D integrate
<br> ([&a](const auto&a=
mp;... args) { return a.fa(args...);},
<br> 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"> double r =3D integrate(<br> &=
nbsp; [&a](auto&&am=
p;... args) -> decltype(auto)<br> &nbs=
p; { return a.fa(std::forward<decltype(<wbr>auto)>(args)...); =
});</span><br><br>Which is pretty less readable and less intent clear than:=
<br><span style=3D"font-family:courier new,monospace"> double r =3D in=
tegrate(std::mem_fn(&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 />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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> </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&& ... ts) { // OK: ts i=
s a function parameter pack<br>printer(std::forward<decltype(ts)>(ts)=
....);<p align=3D"LEFT">...<p align=3D"LEFT"> <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"> <p align=3D"LEFT">As for the =
return <font face=3D"Courier New"><strong>-> decltype(auto)</strong>, it=
was always optional for lambdas, especially it there is one return stateme=
nt.</font><br><p align=3D"LEFT"> <p align=3D"LEFT"> <p align=3D"L=
EFT"> </p></font></font><font face=3D"LMMono9-Regular" size=3D"1"><fon=
t face=3D"LMMono9-Regular" size=3D"1"><p> </p></font></font></div><div=
> </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> double r =3D integrate
<br> ([&a](const auto&a=
mp;... args) { return a.fa(args...);},
<br> 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;"> double r =3D integrate(<br>  =
; [&a](auto&&=
amp;... args) -> decltype(auto)<br> &n=
bsp; { return a.fa(std::forward<decltype(<wbr>auto)>(args)...)=
; });</span><br><br>Which is pretty less readable and less intent clear tha=
n:<br><span style=3D"font-family: courier new,monospace;"> double r =
=3D integrate(std::mem_fn(&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 />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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>-> 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 ->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 />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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">>Also I think that requiri=
ng the programmer to use (and obviously know) varidatic templates (lambdas)=
, value-categories (forward) and return type deduction <br>>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>>"Make simple things simple".</font></div><div> </d=
iv><div>I agree with this point, the user has to do a lot in various areas:=
</div><div> </div><div>(1) libraries, they often provide incomplete su=
rrogate for the real product</div><div>(binary search does not return =
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> </div><div> </div><div><br> </div></div=
>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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--
.