220 12753 <ab6d5598-195b-4bad-8cda-e8ae5df29b92@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Sebastian Redl <wasti.redl@gmx.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Placeholder literals
Date: Tue, 9 Sep 2014 15:15:12 -0700 (PDT)
Lines: 67
Approved: news@gmane.org
Message-ID: <ab6d5598-195b-4bad-8cda-e8ae5df29b92@isocpp.org>
References: <570663A9-F617-442F-9B48-5B6E7311AE72@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1235_114525602.1410300912373"
X-Trace: ger.gmane.org 1410300928 31825 80.91.229.3 (9 Sep 2014 22:15:28 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 9 Sep 2014 22:15:28 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD47DAWPX4ARB4PXXWQAKGQEE3GTGKQ@isocpp.org Wed Sep 10 00:15:22 2014
Return-path: <std-proposals+bncBD47DAWPX4ARB4PXXWQAKGQEE3GTGKQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD47DAWPX4ARB4PXXWQAKGQEE3GTGKQ@isocpp.org>)
	id 1XRTgw-0001uV-Tp
	for gclcip-std-proposals@m.gmane.org; Wed, 10 Sep 2014 00:15:15 +0200
Original-Received: by mail-oa0-f72.google.com with SMTP id m1sf86999508oag.11
        for <gclcip-std-proposals@m.gmane.org>; Tue, 09 Sep 2014 15:15:14 -0700 (PDT)
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:in-reply-to:references
         :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=Bxg2IPwln0Y9QYN7mR/ozE6KsYzsHMjg0/vsqZ7q5IM=;
        b=LGCXHgvCUn2ucvU9+E6LjnYlQXdDFSiWhAVWknnD1NxKRTY/qkEHiF0xwaL9Yblydk
         aq8Y4C1eMpPJ9Yh1FWzrkC+sMjYNSicQQJ92n6BwjG9ckiMLKd8OVkUvT5D606epRtSb
         LUQrN0DT4VythZWNY4HqAM2U2pi8HLg6spkPyAWuZ0OG/DHnaLSZUny2LITjy4yv3ar3
         /r6EohYsDtsFWhfnTK9BxoO+bV8ZcJ3LWM6vPXZD5KeMZDcIpz3x07f/ttaEqWCSuhjt
         scGebGnr5hEGmT2Iefi6vm+KGQRMDOwN0InPRXQ31liBhHgtSRA4gbVZ86TMTS2M42dY
         OE+A==
X-Gm-Message-State: ALoCoQnEhuEkmqtCXJ/8QBjAB036gv6SDsMyMHd3m7WVvv3Xz6pqojTJM5mtEn/hwSaBMzuTQWhN
X-Received: by 10.50.112.68 with SMTP id io4mr18484810igb.0.1410300914020;
        Tue, 09 Sep 2014 15:15:14 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.31.180 with SMTP id f49ls1027557qgf.39.gmail; Tue, 09 Sep
 2014 15:15:13 -0700 (PDT)
X-Received: by 10.140.37.39 with SMTP id q36mr74545qgq.10.1410300913122;
        Tue, 09 Sep 2014 15:15:13 -0700 (PDT)
In-Reply-To: <570663A9-F617-442F-9B48-5B6E7311AE72@gmail.com>
X-Original-Sender: wasti.redl@gmx.net
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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:12753
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12753>

------=_Part_1235_114525602.1410300912373
Content-Type: text/plain; charset=UTF-8



On Sunday, August 24, 2014 3:23:00 AM UTC+2, David Krauss wrote:
>
> Why not add literal operator templates returning placeholders?
>
> Compare:
> std::placeholders::_1 // old
> 1param // new
>
>
It's not actually possible to implement that. The placeholders need to 
encode their index in the type (std::is_placeholder<_1> must derive from 
std::integral_constant<int, 1>), and it's not possible to write a function, 
even a constexpr function, that returns different types for different 
arguments, as the operator ""param would have to do in this case.

Sebastian

-- 

--- 
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_1235_114525602.1410300912373
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Sunday, August 24, 2014 3:23:00 AM UTC+2, David=
 Krauss wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div style=3D"wo=
rd-wrap:break-word">Why not add literal operator templates returning placeh=
olders?<div><br></div><div>Compare:</div><div><font face=3D"Courier"><span =
style=3D"white-space:pre">	</span>std::placeholders::_1 // old</font></div>=
<div><font face=3D"Courier"><span style=3D"white-space:pre">	</span>1param =
// new</font></div><br></div></blockquote><div><br>It's not actually possib=
le to implement that. The placeholders need to encode their index in the ty=
pe (std::is_placeholder&lt;_1&gt; must derive from std::integral_constant&l=
t;int, 1&gt;), and it's not possible to write a function, even a constexpr =
function, that returns different types for different arguments, as the oper=
ator ""param would have to do in this case.<br><br>Sebastian<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&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<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_1235_114525602.1410300912373--

.
