220 31608 <DM5PR2201MB151446C188D54CABB6E0FE9C87240@DM5PR2201MB1514.namprd22.prod.outlook.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Walter Heisenbug <walter.heisenbug@outlook.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Allow to access member typedefs of a type from a
 reference type that's referring to that type
Date: Tue, 14 Mar 2017 18:03:02 +0000
Lines: 36
Approved: news@gmane.org
Message-ID: <DM5PR2201MB151446C188D54CABB6E0FE9C87240@DM5PR2201MB1514.namprd22.prod.outlook.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1489514591 9535 195.159.176.226 (14 Mar 2017 18:03:11 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 14 Mar 2017 18:03:11 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBAABBWPAUDDAKGQETAIBHEY@isocpp.org Tue Mar 14 19:03:04 2017
Return-path: <std-proposals+bncBAABBWPAUDDAKGQETAIBHEY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f197.google.com ([209.85.220.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBAABBWPAUDDAKGQETAIBHEY@isocpp.org>)
	id 1cnqmi-0001SD-Nk
	for gclcip-std-proposals@m.gmane.org; Tue, 14 Mar 2017 19:03:01 +0100
Original-Received: by mail-qk0-f197.google.com with SMTP id a189sf272283513qkc.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 14 Mar 2017 11:03:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:thread-topic:thread-index:date:message-id
         :accept-language:content-language:spamdiagnosticoutput
         :spamdiagnosticmetadata:content-transfer-encoding:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=0gCXf5T5ivqmoByJLCXs3+QTiw/Fpfja5KPIOsZr9zg=;
        b=HZPfWJ6/0SersycD33kRGWcnQzVNI4P2EN/yh8Wq6vv+WC4uoZTEP+04cRZ+rRPwmM
         49eJH4UtsXT+Uilia6REfNvGu700MjE+PoCrKbEwzVnTmY85cgy793ijH3gTZkXV1zlm
         ON56WXaWq8P809lck1op1bJ24Ty0UdBP+C2XtKWnTWKBRl9uanAcQzQ3MZGkvZapiq+a
         /MJQyDJSkfaWZ2FV5P/h6h8jg5HxTiUfqLeoUi8Rh1JS2UFTi5cJGsEir+kZcB0+jt+l
     
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:thread-topic:thread-index:date
         :message-id:accept-language:content-language:spamdiagnosticoutput
         :spamdiagnosticmetadata:content-transfer-encoding:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=0gCXf5T5ivqmoByJLCXs3+QTiw/Fpfja5KPIOsZr9zg=;
        b=dJPJPKd56ZSzH53oU9A1pTEx2Ff8lpK4l/s+dwIZVBJi+g3tVhLvD+mKkoj7PvY9Ay
         zpW4oBTvsd/zRkNzfF0O+4/Dv8WPOLIbtV4A98j3f+HilJ3dkWRqh8SAlB+p9hX1XNEt
         r3xgJ9b/Vfkw/2bywPobtqsgQLIwU7a+ljpNysLfrVeJsi6gfHwlKJdLGt8XVJrx8QQV
         XxjLPy4uPXy144VGhLr3ea+1Lp1lu1iET9Xnzc8aDcdmRH0HSbipWzlaIGeN5g6JffM5
 
X-Gm-Message-State: AMke39m6I/lHukRCoolchQ758btIKOXh+D7+6Whd5o+xbPOgK8SPP7xQmRUjcPfnv1jFoA==
X-Received: by 10.200.33.233 with SMTP id 38mr6439970qtz.87.1489514586497;
        Tue, 14 Mar 2017 11:03:06 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.105.8 with SMTP id e8ls2507504itc.3.canary-gmail; Tue, 14
 Mar 2017 11:03:05 -0700 (PDT)
X-Received: by 10.99.98.6 with SMTP id w6mr44645944pgb.223.1489514585035;
        Tue, 14 Mar 2017 11:03:05 -0700 (PDT)
Original-Received: from SNT004-OMC4S31.hotmail.com (snt004-omc4s31.hotmail.com. [65.55.90.234])
        by mx.google.com with ESMTPS id u29si15322497pgn.418.2017.03.14.11.03.04
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Tue, 14 Mar 2017 11:03:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of walter.heisenbug@outlook.com designates 65.55.90.234 as permitted sender) client-ip=65.55.90.234;
Original-Received: from NAM04-BN3-obe.outbound.protection.outlook.com ([65.55.90.201]) by SNT004-OMC4S31.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008);
	 Tue, 14 Mar 2017 11:03:04 -0700
Original-Received: from BN3NAM04FT039.eop-NAM04.prod.protection.outlook.com
 (10.152.92.52) by BN3NAM04HT141.eop-NAM04.prod.protection.outlook.com
 (10.152.92.188) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.10; Tue, 14
 Mar 2017 18:03:03 +0000
Original-Received: from DM5PR2201MB1514.namprd22.prod.outlook.com (10.152.92.53) by
 BN3NAM04FT039.mail.protection.outlook.com (10.152.93.3) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id
 15.1.961.10 via Frontend Transport; Tue, 14 Mar 2017 18:03:03 +0000
Original-Received: from DM5PR2201MB1514.namprd22.prod.outlook.com ([10.174.187.17]) by
 DM5PR2201MB1514.namprd22.prod.outlook.com ([10.174.187.17]) with mapi id
 15.01.0961.021; Tue, 14 Mar 2017 18:03:03 +0000
Thread-Topic: Allow to access member typedefs of a type from a reference type
 that's referring to that type
Thread-Index: AQHSnOvrv0nJLu2EjkSAUhfJAEmlMA==
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:535E67B2D45931315D9CC823B1E66BB6958F17AF7AD25AB2F88CA8B870557D0D;UpperCasedChecksum:259B62F8FD99CFA69D3ABFC794E5E950683907F191E0CD0A91DE3EC6EB760F25;SizeAsReceived:7984;Count:39
x-tmn: [2MkkXJVcEoxU+dOg9edRr8SR22E7NUgr]
x-microsoft-exchange-diagnostics: 1;BN3NAM04HT141;5:65IGxfUsWM1TRJIHFdlzjfF098jRQOkt/CMBD6GyalNbimka3Tvmgs5P2fwgi5iiRkyyNukoaRXicyv8Eq8oJpmtuoNfyfAihekab31Z0++WVrZaVYcDsbcw2R1m1NdxKOmVI6CdiyvPfsXb2Spqag==;24:N9d218Y402u+OtNKisJ45BiE6+Vpr4A1aRTcQFvLx6dh6y6EffeNGBLSuWfGbhVkox6WknqUwIOjLyPHXkaoEFBkZNjiJb0U3WR0JLrkZCg=;7:QMVFAn75z1Y9av2tTPZnxpIiIJJjhJcLXi25+O1NabSq5mf94mNOT3Qfot3znzAbiuxPwOTZtu/hvDXwUt6qLS/Opsz1fXiXkVrwCQCHv9EX6wM04aF7Vco2ZN+MVHX/UIVCGxSPHrcszZ89lv9RVpvijlrQxA7CA3ozicHvs9Huaeaia+qeabgkYfiG4Q7w5geGpx2snlDZBhE0u81iwkLzxms7Zl9Dsc214ptgL1YqJXTxeBgTa9dxfYAlhRG781XXXTeYfQP5Zy1DwK3LlcoLgIM3xmtkpyagL97E/6Aebms2uan3hMGES6r720I7
x-incomingheadercount: 39
x-eopattributedmessage: 0
x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(10019020)(98900017);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3NAM04HT141;H:DM5PR2201MB1514.namprd22.prod.outlook.com;FPR:;SPF:None;LANG:en;
x-ms-office365-filtering-correlation-id: b400efce-b092-4c7d-4893-08d46b045be9
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(1601125254)(1603101448)(1701031045);SRVR:BN3NAM04HT141;
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(432015087)(444000031);SRVR:BN3NAM04HT141;BCL:0;PCL:0;RULEID:;SRVR:BN3NAM04HT141;
x-forefront-prvs: 02462830BE
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2017 18:03:02.9795
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3NAM04HT141
X-OriginalArrivalTime: 14 Mar 2017 18:03:04.0463 (UTC) FILETIME=[3A30E1F0:01D29CED]
X-Original-Sender: walter.heisenbug@outlook.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@outlook.com;       spf=pass (google.com: domain of
 walter.heisenbug@outlook.com designates 65.55.90.234 as permitted sender)
 smtp.mailfrom=walter.heisenbug@outlook.com;       dmarc=pass (p=NONE sp=NONE
 dis=NONE) header.from=outlook.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:31608
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31608>

Currently to access a member type from a reference type means you have to d=
o all the dancing with removing the reference.=20

template<typename T>
void f(T&& x)
{
=C2=A0=C2=A0=C2=A0 typedef typename std::remove_reference_t<T>::member_type=
 mem;
=C2=A0=C2=A0=C2=A0 mem y;
=C2=A0=C2=A0=C2=A0 use(std::forward<T>(x), y);
}

This could be simplified, if we allow to access the member types of a type =
from a reference types:

template<typename T>
void f(T&& x)
{
    typedef typename T::member_type mem;
    mem y;
    use(std::forward<T>(x), y);
}

I'm not aware of any potential problems, since the reference types don't ha=
ve any member types, so there's no ambiguity with the existing code.=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/DM5PR2201MB151446C188D54CABB6E0FE9C87240%40DM5PR=
2201MB1514.namprd22.prod.outlook.com.

.
