220 39123 <lncm-v8bR9K6sqXzAewvVZNg2wuf0txaLwMD-TpIqbIGq7zL25pGi5DsziWZ92BFQ1HfQftRe9FGbSENOBMkWrzjPjrR2uKsayJJRFA4AQI=@miator.net> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: RE: Concept-defined placeholder type
Date: Thu, 12 Jul 2018 16:20:18 -0400
Lines: 49
Approved: news@gmane.org
Message-ID: <lncm-v8bR9K6sqXzAewvVZNg2wuf0txaLwMD-TpIqbIGq7zL25pGi5DsziWZ92BFQ1HfQftRe9FGbSENOBMkWrzjPjrR2uKsayJJRFA4AQI=@miator.net>
References: <wKt6BIikQ9kr3u_mQ2oR1vvx8Uj7JLabshrk6DkzkFXpExhOUcFUc_LbGjzKQ9Z_nsrjEQrvTE5d7-8FgpX_Q-dyOVcAUaiZdsCZZsX0ctQ=@miator.net>
 <f4f2a1ca-63c1-4e33-8c0c-cf1ae244a3b5@isocpp.org>
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 1531426697 14743 195.159.176.226 (12 Jul 2018 20:18:17 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 12 Jul 2018 20:18:17 +0000 (UTC)
To: mihailnajdenov@gmail.com, 'ISO C++ Standard - Future Proposals' <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBB7QT3NAKGQEVYMJQQQ@isocpp.org Thu Jul 12 22:18:13 2018
Return-path: <std-proposals+bncBCSKRWMD4EHBBB7QT3NAKGQEVYMJQQQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr1-f71.google.com ([209.85.221.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBB7QT3NAKGQEVYMJQQQ@isocpp.org>)
	id 1fdi2X-0003l5-3U
	for gclcip-std-proposals@m.gmane.org; Thu, 12 Jul 2018 22:18:13 +0200
Original-Received: by mail-wr1-f71.google.com with SMTP id z13-v6sf4759967wrq.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 12 Jul 2018 13:20:24 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1531426824; cv=pass;
        d=google.com; s=arc-20160816;
        b=uTZRwWgpKknism22N3gmXR5COEGcUHIwJimmUGfDo0hG/KpSlZlu/d0vLI1+EBgbaW
         IypmnlAiz9ZM1WuTrrycBmKHGwJ6Ql7NOhTaigfQXJq8ep5qSpC59xk7yDs/wH8Iu+6E
         AXl1uRwR73mOj48ZjTP6phHk0xrzT0K/2M0CeUojWiRw4cDcshfLenAw9kCN6PDQpgEO
         rHytR8n0IBtMhUqskEiSRFFh+k8s9QC5E3pryTsJpg/JZHFjOjufMUt554DAp+vKj6jI
         3tNVeJi7m2w0lipCBqClVLyRDYnnu8WD3HXwrt8aXzrFKEZNgU/i/MduSoYbBCs81xbC
         DH6w==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:mime-version:feedback-id:references
         :in-reply-to:message-id:subject:reply-to:from:to:date
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=V0QXf4ybJFIKscyAPt99TCUbhEuUSQhVAobVAIwMjV4=;
        b=NMjPyy3HSqllmb+4jfbdKQAMFBOQtHDZjQJ0lozPjhw7OTxGd/ToQmZKCKZMWY8QK5
         7jjfRf5FC4SfPYGglo1M8NX0el/Swqo2kHcqGhSjuYIhnYxMeNFtDI+qfOFXvzsOJbw9
         vP+3cexHGkO2EJ1UaZV4awkc+Rm4HTADtFFFBGbWMRsxpoVNNQchLo9aO61Ug/ChhP9m
         bctE7UJTOho7yLTcGjyhdF8PaR36nHNaFbIdTL0s39hioncnfroZJQjKh2TP41bSbIRy
         5qh+R+UyfHTN0jwsNxxxIfK/+2FGycyYezkQFFAFWjh/eoeQVGNEWxWlcTDJwuU2aqNx
         SfOA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@miator.net header.s=protonmail header.b=DpGzUx8n;
       spf=pass (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted sender) smtp.mailfrom=zy@miator.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:to:from:reply-to:subject:message-id:in-reply-to:references
         :feedback-id:mime-version:x-original-sender
         :x-original-authentication-results:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=V0QXf4ybJFIKscyAPt99TCUbhEuUSQhVAobVAIwMjV4=;
        b=diLvUUP1aQnnk6uXT42nD2krEQGrz7aWAL1V4sU10R+sadRVus18AvMU6eT8Vz8p7S
         4ha6WbZQWmKYFd5oRZNthhARBh/gfCnee8nqyFAFhcYTtISqDJYkwfLOJcZm/oZnXAA5
         Vixyg7zPjkZpQotDeAEkjKKtMNyazPHXAGIVUlkZAXBW7yVNMr+6hEzwVqM9ny/p9SHH
         F8OJwtQ0myFQaIfjplqju2ASl/HbEkRRHkaU0ecxTUSLaIxlT3Exf8SiGxJ04lnecxfC
         8ZoPuOQ0b0ChAxj3/Wb9mL/CXkxnI6Rxcrh9+AtGFVl38C62G/O9ouXVjSnyxPrgeSzK
         E7mA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:to:from:reply-to:subject:message-id
         :in-reply-to:references:feedback-id:mime-version: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=V0QXf4ybJFIKscyAPt99TCUbhEuUSQhVAobVAIwMjV4=;
        b=PrizXVL9zr41BzlRAG1w7urhttGsuOJURK5MXHJfCVPUUL6cUvlefh9GCC0vXKLcAi
         esnYHqKKPkv5q7v6FnhVUhWLYxCeREayJdSR6eXKfTJ+0/2PTfJYcIEqbCVhul0BUUZ/
         CAfzpP5P74yT8MDtP2v2MnP6X7UvUWHIS83j4iDOlhVE5jDvSQPUoU1q1NvDd4FiyEJC
         LHMpHNts/EQEh+I0zK2iO7bhnH8SS1qJJYykXbRbzePfP6zIIhEe22lGgNjV9ph92yBn
         b8gqonP+cs7PLed2u2u3zrNcd0iH9vRvQ0Z7Eqv9Isj8mLswd9QflwWK9oXFXzFtLUx4
         gVjA==
X-Gm-Message-State: AOUpUlErdzvQ2pmvGr8N2Mfj0hsTYSYloPXAHJe+mWLsm+tWdrVCE0Xy
	5qNmqoNMFhw8cUiib6BXxrvQJQ==
X-Google-Smtp-Source: AAOMgpdJ7nvINwEdnQXtDFYV1GZZuRTszbiuhC4ylvd61OkYSMVqjZnEBEyKcl/tNRHGRSz4pURQBg==
X-Received: by 2002:a1c:f405:: with SMTP id z5-v6mr356233wma.1.1531426824375;
        Thu, 12 Jul 2018 13:20:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a1c:7a15:: with SMTP id v21-v6ls1361225wmc.10.canary-gmail;
 Thu, 12 Jul 2018 13:20:23 -0700 (PDT)
X-Received: by 2002:a1c:30d2:: with SMTP id w201-v6mr2106074wmw.47.1531426823165;
        Thu, 12 Jul 2018 13:20:23 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1531426823; cv=none;
        d=google.com; s=arc-20160816;
        b=eJsKiakN5cCnX0T2IyWztPXgsaSy0CTqFMhygfW8txcjhH9enwfmmzkxEiV3N1nC3X
         KDGXHjGceVU9wgubTu9wtL/nBidV5gge/TqkYQTY4tPDZf1aM06RmqRoEtohFUPy8sbn
         NuRna3T10A0eGupUJsvA15WnI/kZV0HLOm6Wt1btFHvXyTVukYqRakuiSmZYXDFHpG3R
         8wMGPglyHrtBTD4g6ErfiwLgnIxmixy3nqEBIpGqnrez01Cx3QHjI7fsxP7KOXMrVIQg
         12G9+Z2S8HpkADZ1JSxMAeAUT31xHgeZnw2WAbURSkcL5U+XnTZZ1dI/YsuRpeHaOsWE
         tykA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:feedback-id:references
         :in-reply-to:message-id:subject:reply-to:from:to:dkim-signature:date
         :arc-authentication-results;
        bh=fNoCp0itWVeUJ+PmA21ZYLtRyjuAj7flWb1wOvPm3bo=;
        b=a5AVsTWIayIkhylorpnoWt6QHOQEPWoMt0gRYaeAZuqExvP6JgI++QOUIiwFV5zBSQ
         ZEj8oxBo68yfWVvLy7V5o0UNs/GMoz0iAJ7RmfIZWd5Aqe5J3yyeOHYgaQCPQitC0NGr
         JUkiItvdCmpAAXQhs5Urhez0Es4PqsKBcC3oqZtFotpPVEA5qqy49f+vHL4XUCyLfIOm
         Mgc1SafAPZeAxHcFTRpIO2jdEbXtmwGtul1POeHJ3QUVuRcwuYUkvR58mU5SNOnbfHuO
         IPpwBJn0nJEEvwsuLjKnjHOoDUO3n8H2Lb0G8ke7yxibcU+nhg3gBPrblim4feHS/fcB
         0Rsw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@miator.net header.s=protonmail header.b=DpGzUx8n;
       spf=pass (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted sender) smtp.mailfrom=zy@miator.net
Original-Received: from mail-1857040132.protonmail.ch (mail-1857040132.protonmail.ch. [185.70.40.132])
        by mx.google.com with ESMTPS id w11-v6si20150732wrn.206.2018.07.12.13.20.23
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 12 Jul 2018 13:20:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted sender) client-ip=185.70.40.132;
In-Reply-To: <f4f2a1ca-63c1-4e33-8c0c-cf1ae244a3b5@isocpp.org>
Feedback-ID: xu1i2ADzKwGyrUl8KbXpsa1PQSI0Bc21qlX1V7gpMylRDQPR42YBpWcLHW4brubvCmGM18xDo5tgsD-vWFu_cQ==:Ext:ProtonMail
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@miator.net header.s=protonmail header.b=DpGzUx8n;       spf=pass
 (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted
 sender) smtp.mailfrom=zy@miator.net
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:39123
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39123>

From: mihailnajdenov@gmail.com <mihailnajdenov@gmail.com> 
Sent: Thursday, July 12, 2018 4:58 AM
> With types
> 
> template<. . .>
> auto func()
> { 
>   Concept Type;
> 
>   if constexpr(something)
>     Type var = . . .;
>   else
>     Type var = . . .;
> 
>   // use Type;
> }
> 
> But this works even if Concept Type is introduced in scope (other means included)! 
> if constexpr - will physically remove the scopes altogether. And if it is not a constexpr if, then we could init it outside of scope by other means

It doesn't, "var" cannot be looked up at the "// use Type"
location, so you cannot even use decltype(var) there.

> namespace n {
> 
> StandardLayoutType T; //< allowed?
> 
> template <typename Producer>
> void uploadToGPU(Producer& producer)
> {
>   T item = producer.next();
> }

That's the kind of bug that I'm looking for...
It shouldn't be allowed.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________
 


-- 
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/lncm-v8bR9K6sqXzAewvVZNg2wuf0txaLwMD-TpIqbIGq7zL25pGi5DsziWZ92BFQ1HfQftRe9FGbSENOBMkWrzjPjrR2uKsayJJRFA4AQI%3D%40miator.net.

.
