220 29966 <CAOfiQq=DAYw2ekp1LG7Jt+atYeWptzHQVihOkzFzZ2_7S5sDdw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Rationale for why concepts can only be declared
 at namespace scope
Date: Tue, 20 Dec 2016 17:15:17 -0800
Lines: 72
Approved: news@gmane.org
Message-ID: <CAOfiQq=DAYw2ekp1LG7Jt+atYeWptzHQVihOkzFzZ2_7S5sDdw@mail.gmail.com>
References: <1dd1345b-0bc7-4768-8afd-fd6f4f611d8a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114420e8f808c6054420e313
X-Trace: blaine.gmane.org 1482282939 317 195.159.176.226 (21 Dec 2016 01:15:39 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 21 Dec 2016 01:15:39 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDVNBJG4YAIBBOVP47BAKGQE4OD4VRY@isocpp.org Wed Dec 21 02:15:35 2016
Return-path: <std-proposals+bncBDVNBJG4YAIBBOVP47BAKGQE4OD4VRY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBOVP47BAKGQE4OD4VRY@isocpp.org>)
	id 1cJVVH-0007qw-7c
	for gclcip-std-proposals@m.gmane.org; Wed, 21 Dec 2016 02:15:35 +0100
Original-Received: by mail-lf0-f71.google.com with SMTP id c13sf52569076lfg.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 20 Dec 2016 17:15:40 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
         :date:message-id:subject:to: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=CszcqVzlKeFjpoGJ9zIcN2ZYf8lyeROiUpn1iWKfwUA=;
        b=Z4J9vbeWPimZ0m8QObEgwl1kESuKUllfn18Ligih7apnN1QagfDl5odCZNomVg0sYB
         nC4db+nL6eYKj9UVE6mWG7kmQI0Q1s3bK6V7s9KZ07fzG558TCFjxlpKOLqlZr9BZFsY
         jxBwlHqiPEVgl3A6gTkhDleYjZzeOgQ8hzoR1K9nt3AbK8mgOfjExlabFdCP0eaJ+0n2
         bm+sIQy7G90zi426SjPWdIuOlLwC85cgm00QQ7BAwCQpaHFDeFesgVSwSjJmoC00JNWe
         mRU17zf0dlfnSdIETZN7zWtJWcXWX1E1zQHMl18MU2i68+piCwPyrIerRLpMeJL5wlsI
         0OVQ==
X-Gm-Message-State: AIkVDXJFocJd9tGMAn8lOOkrvXXRyhxTbMeKPP2+bTqiLkCMFrGvA/1eDJeTnJWe7hXryA==
X-Received: by 10.46.69.135 with SMTP id s129mr186031lja.1.1482282939918;
        Tue, 20 Dec 2016 17:15:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.154.138 with SMTP id c132ls1841826wme.6.gmail; Tue, 20 Dec
 2016 17:15:38 -0800 (PST)
X-Received: by 10.28.211.72 with SMTP id k69mr2181662wmg.137.1482282938388;
        Tue, 20 Dec 2016 17:15:38 -0800 (PST)
Original-Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com. [2a00:1450:400c:c09::244])
        by mx.google.com with ESMTPS id hm2si25250141wjb.167.2016.12.20.17.15.38
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 20 Dec 2016 17:15:38 -0800 (PST)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 2a00:1450:400c:c09::244 as permitted sender) client-ip=2a00:1450:400c:c09::244;
Original-Received: by mail-wm0-x244.google.com with SMTP id l2so2044695wml.2
        for <std-proposals@isocpp.org>; Tue, 20 Dec 2016 17:15:38 -0800 (PST)
X-Received: by 10.28.142.16 with SMTP id q16mr2216677wmd.35.1482282937877;
 Tue, 20 Dec 2016 17:15:37 -0800 (PST)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.80.175.37 with HTTP; Tue, 20 Dec 2016 17:15:17 -0800 (PST)
In-Reply-To: <1dd1345b-0bc7-4768-8afd-fd6f4f611d8a@isocpp.org>
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of metafoo@gmail.com
 designates 2a00:1450:400c:c09::244 as permitted sender) smtp.mailfrom=metafoo@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:29966
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29966>

--001a114420e8f808c6054420e313
Content-Type: text/plain; charset=UTF-8

On 20 December 2016 at 16:25, Anthony Hall <anthrond@gmail.com> wrote:

> Reading the current version of the Concepts TS, n4630, I see that both
> variable and function concepts are only allowed at namespace scope, but I
> don't see a reason given for this.  I first stumbled upon this restriction
> while trying to write concepts in the private: section of a class, because
> they would be useful to me in writing the class itself, but they have no
> use in the class's interface or to outside client code.
>
> I also would find being able to write them in
> struct/class/function/lambade/basically any scope, as a way to factor out
> repetitive ad-hoc 'requires' constraints.
>
> Does anyone know the reasons that concepts have been explicitly limited to
> namespace scope?
>

Yes. It avoids the possibility of a dependent name resolving to a concept
name. This avoids a selection of nasty problems with dependent name lookup
and with partial ordering in the presence of dependent concepts.

-- 
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/CAOfiQq%3DDAYw2ekp1LG7Jt%2BatYeWptzHQVihOkzFzZ2_7S5sDdw%40mail.gmail.com.

--001a114420e8f808c6054420e313
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 2=
0 December 2016 at 16:25, Anthony Hall <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:anthrond@gmail.com" target=3D"_blank">anthrond@gmail.com</a>&gt;</span>=
 wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Reading the curr=
ent version of the Concepts TS,=C2=A0n4630, I see that both variable and fu=
nction concepts are only allowed at namespace scope, but I don&#39;t see a =
reason given for this.=C2=A0 I first stumbled upon this restriction while t=
rying to write concepts in the private: section of a class, because they wo=
uld be useful to me in writing the class itself, but they have no use in th=
e class&#39;s interface or to outside client code.<br><br>I also would find=
 being able to write them in struct/class/function/lambade/<wbr>basically a=
ny scope, as a way to factor out repetitive ad-hoc &#39;requires&#39; const=
raints.<div><br></div><div>Does anyone know the reasons that concepts have =
been explicitly limited to namespace scope?</div></div></blockquote><div><b=
r></div><div>Yes. It avoids the possibility of a dependent name resolving t=
o a concept name. This avoids a selection of nasty problems with dependent =
name lookup and with partial ordering in the presence of dependent concepts=
..</div></div></div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOfiQq%3DDAYw2ekp1LG7Jt%2BatYeWptzHQ=
VihOkzFzZ2_7S5sDdw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQq%3DDAY=
w2ekp1LG7Jt%2BatYeWptzHQVihOkzFzZ2_7S5sDdw%40mail.gmail.com</a>.<br />

--001a114420e8f808c6054420e313--

.
