220 31176 <CABsSThod-n_8xezUMan-GxDTqD=xsxF3gUn+1qiq8nsDTE7BEw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Faisal Vali <faisalv@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Removing forward references ("universal"
 references) from the standard
Date: Sun, 26 Feb 2017 13:32:50 -0600
Lines: 68
Approved: news@gmane.org
Message-ID: <CABsSThod-n_8xezUMan-GxDTqD=xsxF3gUn+1qiq8nsDTE7BEw@mail.gmail.com>
References: <f4a47328-5397-4e93-9453-ddb978256627@isocpp.org>
 <218337af-618b-4136-e864-615d9b153c1e@wanadoo.fr> <CABsSThq-QU6wB_vZJAmO9rsXzXCAwy_swh2JFd3rtS95tM3xZg@mail.gmail.com>
 <CADbh+eSuRMxSDo3ubh4R78Q1_LuYEgnaZ5t0gceSKCk3m3622w@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1488137607 17640 195.159.176.226 (26 Feb 2017 19:33:27 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 26 Feb 2017 19:33:27 +0000 (UTC)
To: "<std-proposals@isocpp.org>" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDKRIXX5YARBAO3ZTCQKGQEDIDJHEY@isocpp.org Sun Feb 26 20:33:22 2017
Return-path: <std-proposals+bncBDDKRIXX5YARBAO3ZTCQKGQEDIDJHEY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f199.google.com ([209.85.192.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDDKRIXX5YARBAO3ZTCQKGQEDIDJHEY@isocpp.org>)
	id 1ci4ZI-0003cm-UB
	for gclcip-std-proposals@m.gmane.org; Sun, 26 Feb 2017 20:33:17 +0100
Original-Received: by mail-pf0-f199.google.com with SMTP id j5sf109377218pfb.3
        for <gclcip-std-proposals@m.gmane.org>; Sun, 26 Feb 2017 11:33:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:reply-to:in-reply-to:references:from:date:message-id
         :subject:to:x-original-sender:x-original-authentication-results
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=2ax3lI+vOmUR34HEoGcGiYucguLjf1/sipOWF5tK1FA=;
        b=RZ4+llhCkVLCE4aRbICQTelZXbhbNezHl3lqqJGIcBam4NcZ/wgwqmUHmIBfm+n8g9
         P9U+6ZlybYu/bKVhjyGBFiSTvDehYWJSO6hR2icE35Z+1sBhS0biwzq7LfGTP3UU/2sv
         z1cZf8ojYWTjRpnvRB33GpoMekjr2Cm1YyvEbwSTbjh9igVHRimMnnu0jXESBnWr4Fnb
         5Ru2aPWEhzd2V2DwQaQWN92wNEywpTSjXCWi2sb2pvIAFM7PLp3cHwk6QKxHLB/wtcjd
         HGrJrqeBDZ82bghVbXg+1pp2bsuwLWN+SpUbWUI+VPt3jpCLsRF2hMJsC1DZ0Yw+6GMF
         GUuA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:reply-to:in-reply-to:references
         :from:date:message-id:subject:to:x-original-sender
         :x-original-authentication-results:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=2ax3lI+vOmUR34HEoGcGiYucguLjf1/sipOWF5tK1FA=;
        b=QAnXgwNi/MtW/sSyILCDbotgCfaecg61ew7IBHjZpK3radutVMnRXPbwspNFmSX13a
         MixYDA94jzJyyScdDsFgMqW+m2/fulsW3KslFTyJ2jHkzbRjDKVhyoxNqVd7LfamaE5/
         zmgU0J9H9gHwVWsYRslQoAcaVjDPO63HVEDF72tiDFZB1xHH+uhBay7wiML93bib4RU3
         +zc/4OocXrLr6YR6CypLFNkepOUmlctZvhGQy4H5vqUhNZ4aslZa5HsZmJfUjV2K5Bzn
         UKRX4yV4ClgghgAEo7+XjpOo84nUbd1hVR7dMXIpBJOGdKCouAfp7ycORxynF+16fB/u
         rB3Q==
X-Gm-Message-State: AMke39lyGEL5OqeNRSGTg3CTxktJOZSW6oOu3BflLLtc0t6l5PF8JvZItz7gh0XToqdyng==
X-Received: by 10.99.123.72 with SMTP id k8mr4850868pgn.110.1488137602361;
        Sun, 26 Feb 2017 11:33:22 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.10.196 with SMTP id 62ls12148596otq.7.gmail; Sun, 26 Feb
 2017 11:33:21 -0800 (PST)
X-Received: by 10.157.43.235 with SMTP id u98mr2055729ota.20.1488137601771;
        Sun, 26 Feb 2017 11:33:21 -0800 (PST)
Original-Received: from mail-ot0-x22d.google.com (mail-ot0-x22d.google.com. [2607:f8b0:4003:c0f::22d])
        by mx.google.com with ESMTPS id l63si5459256oia.176.2017.02.26.11.33.21
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 26 Feb 2017 11:33:21 -0800 (PST)
Received-SPF: pass (google.com: domain of faisalv@gmail.com designates 2607:f8b0:4003:c0f::22d as permitted sender) client-ip=2607:f8b0:4003:c0f::22d;
Original-Received: by mail-ot0-x22d.google.com with SMTP id x10so40680578otb.1
        for <std-proposals@isocpp.org>; Sun, 26 Feb 2017 11:33:21 -0800 (PST)
X-Received: by 10.157.17.8 with SMTP id g8mr6000347ote.251.1488137601384; Sun,
 26 Feb 2017 11:33:21 -0800 (PST)
Original-Received: by 10.157.56.235 with HTTP; Sun, 26 Feb 2017 11:32:50 -0800 (PST)
In-Reply-To: <CADbh+eSuRMxSDo3ubh4R78Q1_LuYEgnaZ5t0gceSKCk3m3622w@mail.gmail.com>
X-Original-Sender: faisalv@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of faisalv@gmail.com
 designates 2607:f8b0:4003:c0f::22d as permitted sender) smtp.mailfrom=faisalv@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:31176
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31176>

On Sun, Feb 26, 2017 at 1:13 PM, Brittany Friedman <fourthgeek@gmail.com> wrote:
>
>
> On Sun, Feb 26, 2017 at 12:57 PM, Faisal Vali <faisalv@gmail.com> wrote:
>>
>>
>> For e.g. instead of writing the following overloads:
>>
>> template<class T> int* f(T&&);  // ugh - be careful, can bind to both r
>> and lval
>> template<class T> char* f(T&);
>>
>> You could write the following:
>>
>> // Write this as if it only handles Rvalues
>> template<class T> struct f {
>>   int *ret;
>>   f(T&& t)  { ret = ... }
>>   operator int*() { return ret; }
>> };
>> template<class T> f(T&) -> f<T&>;
>>
>> // ... likewise for Lvalues
>> template<class T> struct f<T&> {
>>   char *ret;
>>   f(T& t) { ret = ... }
>>   operator char*() { return ret; }
>> };
>>
>> int i;
>> char *lval = f(i);
>> int *rval = f(0);
>>
>> I know what you're thinking, because i'm thinking it too: "C++ - why
>> do you keep sleeping (and with whom ;) through the class on the KISS
>> principle?"
>> -faisal
>
>
> If you think that your 11 lines of code is simpler than the 2 lines of code
> you started with then we have very different definitions of simple.
>

?!?
My sarcastic post and denouement regarding C++ evolution was meant as
an indictment of having to even consider those 11 lines of code (as
opposed to the two) as a potential solution.  (Does having to explain
sarcasm, suggest a failure in one's ability to wield it? I guess, like
C++, the practice of sardonicity isn't as simple as one would like it
to be;)



> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CADbh%2BeSuRMxSDo3ubh4R78Q1_LuYEgnaZ5t0gceSKCk3m3622w%40mail.gmail.com.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CABsSThod-n_8xezUMan-GxDTqD%3DxsxF3gUn%2B1qiq8nsDTE7BEw%40mail.gmail.com.

.
