220 7866 <e16fa175-e5fa-4cd4-8635-9682b89b545c@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: dacamara.cameron@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Proposal to add std::mem_to_fun
Date: Tue, 19 Nov 2013 20:41:15 -0800 (PST)
Lines: 286
Approved: news@gmane.org
Message-ID: <e16fa175-e5fa-4cd4-8635-9682b89b545c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_2561_13557628.1384922475031"
X-Trace: ger.gmane.org 1384922474 20530 80.91.229.3 (20 Nov 2013 04:41:14 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 20 Nov 2013 04:41:14 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC63VLONXYMRB272WCKAKGQEQIXXN4I@isocpp.org Wed Nov 20 05:41:21 2013
Return-path: <std-proposals+bncBC63VLONXYMRB272WCKAKGQEQIXXN4I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f71.google.com ([209.85.220.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC63VLONXYMRB272WCKAKGQEQIXXN4I@isocpp.org>)
	id 1VizbK-0007iM-FE
	for gclcip-std-proposals@m.gmane.org; Wed, 20 Nov 2013 05:41:18 +0100
Original-Received: by mail-pa0-f71.google.com with SMTP id kp14sf6087842pab.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 19 Nov 2013 20:41:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=6GmxszPHYekldt4wAhEaM0dtElB9Y2psxDU4ziLYXlo=;
        b=trxC0GgDik70T48s2vYQyKSUp3SjfaISlmYJzwk9smMW9I+7mNB3UfF/fKQL4Rbveo
         SOBhDqptC2wDFhNXmmjJckFyFGme/087qnavG10DiPgm9d6z3NKg837hcKGIXbxHruTq
         pCvRf/s3GJdcE1QeZ+HSKKaH0isYXQgqF84mSkaqUjhDSWJxZU3kQLV7Sa3G/dITRPWi
         jOXaLdY3HzGHLPsrDaNCvGhRyu3EwumwZyPvmjyZKfKmc1SrJCxU1IM6x00KzfTzqM8c
         2zUxecMzCMz4bI7QYeByYHfdgo/GtDGmN0pFMNK3cR4jR4wkKIMz7VyPBGDsSS5JWod/
         5fCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=6GmxszPHYekldt4wAhEaM0dtElB9Y2psxDU4ziLYXlo=;
        b=BqsqaD5AmAVLkh3v8y+yksX0D1olg4K4lGS5hXMr0Jb/XahKVABcS+QA2UMW6dObr9
         a+7+c+qAByt67hp7BTLUMFcL58HxzzFElZGwJSzxs+CJODyo9C/kOmx0AMhOEK6vUyMZ
         LmBtIBKlF8JVNGx5huyWmb78K26NXUEPIFntrOq/VTIkBePyXB2KevMxMd3qQtvEuLVZ
         V9dxSDKzWPq8GLc2gOrjzY/Q5lLxnwq6Hnb3Kx6p3LHSYCCFt17cKKFjRn8XJTW5wPKu
         ke6QfpcsAkjEDgw6p1wwI7t7TB4S08T5XWPXFm/27XptkN0HvgELvpDhGFVYXksOCP2y
         hRcw==
X-Gm-Message-State: ALoCoQm8xZPos5B5aINroCdzK8uGoNcC798jmhvJo2QMBbNS6h8DVeJwDgN8azxPWgq24J0rsrp+
X-Received: by 10.66.65.109 with SMTP id w13mr11314619pas.21.1384922477159;
        Tue, 19 Nov 2013 20:41:17 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.241.202 with SMTP id wk10ls2012134obc.0.gmail; Tue, 19 Nov
 2013 20:41:15 -0800 (PST)
X-Received: by 10.182.231.227 with SMTP id tj3mr75obc.40.1384922475755;
        Tue, 19 Nov 2013 20:41:15 -0800 (PST)
X-Original-Sender: dacamaracameron@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7866
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7866>

------=_Part_2561_13557628.1384922475031
Content-Type: text/plain; charset=ISO-8859-1

So I noticed browsing <functional> that there is currently not a way to 
create a function object that can return just a member of an object. There 
is a structure that converts a member function into a function object 
callable via the class as an argument (std::mem_fun_t). My question is why 
can't this exist for accessing members of a POD struct or even a class? 
That could be useful for standard algorithms when you need access to a 
specific member but don't wanna write out the lambda for it, eg:

struct Books {
  std::string author;
  std::string title;
};


// all we want is to make a set of titles of books from our library vector
std::set<std::string> uniqTitles;
std::transform(library.begin(), library.end(), std::inserter(uniqTitles,uniqTitles
..end()), 
               [] (const Books& b) -> std::string 
               {
                  return b.title;
               }
); // why can't there be a standard way to just grab the member? 

so really the implementation / interface would look a lot like std::mem_fun:

template <typename T, typename M>
struct mem_to_fun_t {
  M T::*_mem;
  explicit mem_to_fun_t(M T::*mem): _mem(mem) { }
  
  const M& operator()(const T& c) const{return c.*_mem;}
  M& operator()(T& c) {return c.*_mem;}
};


template <typename T, typename M> inline
auto mem_to_fun(M T::*mem) -> mem_to_fun_t<T,M> {
  return mem_to_fun_t<T,M>{mem};
}

it doesn't have to be exactly like this but perhaps a similar 
implementation.

Here is the ideone link if you wanna see how it could be used: 
http://ideone.com/3uoDPV


-- 

--- 
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_2561_13557628.1384922475031
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">So I noticed browsing &lt;functional&gt; that there is cur=
rently not a way to create a function object that can return just a member =
of an object. There is a structure that converts a member function into a f=
unction object callable via the class as an argument (std::mem_fun_t). My q=
uestion is why can't this exist for accessing members of a POD struct or ev=
en a class? That could be useful for standard algorithms when you need acce=
ss to a specific member but don't wanna write out the lambda for it, eg:<br=
><br><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 25=
0); border: 1px solid rgb(187, 187, 187); word-wrap: break-word;"><code cla=
ss=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #008=
;" class=3D"styled-by-prettify">struct</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"s=
tyled-by-prettify">Books</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
&nbsp; std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
::</span><span style=3D"color: #008;" class=3D"styled-by-prettify">string</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> author</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; std</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">string</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> title</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br><br><br></span><span style=3D"color: #800;" class=3D"st=
yled-by-prettify">// all we want is to make a set of titles of books from o=
ur library vector</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"><br>std</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">::</span><span style=3D"color: #008;" class=3D"styled-by-prettify">set<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">std</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">string</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> uniqTitles</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br>std</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">transform</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">library</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">.</span><span style=3D"color: #008;" class=3D"styled-by-prettify">begin<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">(),</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> library</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">end</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">(),</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">inserter</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">uniqTitles</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
uniqTitles</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
..</span><span style=3D"color: #008;" class=3D"styled-by-prettify">end</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">()),</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> <br>&nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">[]</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #606;" class=3D"styled-by-prettify">Books</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> b</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">::</span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">string</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> b</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">.</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">title</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span><span style=3D"color: #800;" class=3D"styled-by=
-prettify">// why can't there be a standard way to just grab the member? </=
span></div></code></div><div><br></div><div>so really the implementation / =
interface would look a lot like std::mem_fun:</div><div><br></div><div><div=
 class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); borde=
r: 1px solid rgb(187, 187, 187); word-wrap: break-word;"><code class=3D"pre=
ttyprint"><div class=3D"subprettyprint"><div class=3D"prettyprint" style=3D=
"background-color: rgb(250, 250, 250); border: 1px solid rgb(187, 187, 187)=
; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #008;" class=3D"styled-by-prettify">template=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> M</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">struct</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 mem_to_fun_t </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&=
nbsp; M T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">:=
:*</span><span style=3D"color: #000;" class=3D"styled-by-prettify">_mem</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">explicit</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> mem_to_fun_t</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">M T</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">::*</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">mem</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">):</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> _mem</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">mem</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>&nbsp; <br>&nbsp; </span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">const</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> M</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">operator</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">()(</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> c</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">const</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">{</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">return</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> c</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">.*</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">_mem</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;}=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp;=
 M</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">operator</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">()(</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> c</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">{</span><span style=3D"color: #008;" class=3D"styled-by-prettify">ret=
urn</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> c</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">.*</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify">_mem</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;}</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">};</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br><br><br></span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">template</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> M</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">inline</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">auto</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> mem_to_fun</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify">M T</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">::*</span><span style=3D"color: #000;" class=3D"styled-by-prettify">mem<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> mem_to_fun_t</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">M</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp=
; </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> mem_to_fun_=
t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify">T</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">M</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&gt;{</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">mem</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">}</span></div></code></div></div></code></div><br></div><div>it does=
n't have to be exactly like this but perhaps a similar implementation.</div=
><div><br></div><div>Here is the ideone link if you wanna see how it could =
be used:&nbsp;<a href=3D"http://ideone.com/3uoDPV">http://ideone.com/3uoDPV=
</a></div><div><br></div><div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_2561_13557628.1384922475031--

.
