220 30272 <CACGiwhHbb6JNBMEJ9xYBmsVPzf-kxiWiNpkW93Q5nqmp4oc=+g@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "D. B." <db0451@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::array::size() be made static?
Date: Thu, 5 Jan 2017 08:41:30 +0000
Lines: 72
Approved: news@gmane.org
Message-ID: <CACGiwhHbb6JNBMEJ9xYBmsVPzf-kxiWiNpkW93Q5nqmp4oc=+g@mail.gmail.com>
References: <5d432263-8011-4d53-ab33-916270e7f6e5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114cc80c2b3af1054554de21
X-Trace: blaine.gmane.org 1483605695 30910 195.159.176.226 (5 Jan 2017 08:41:35 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 5 Jan 2017 08:41:35 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCWNZ4ECS4GBBO4NXDBQKGQE6N65EVY@isocpp.org Thu Jan 05 09:41:30 2017
Return-path: <std-proposals+bncBCWNZ4ECS4GBBO4NXDBQKGQE6N65EVY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wj0-f198.google.com ([209.85.210.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCWNZ4ECS4GBBO4NXDBQKGQE6N65EVY@isocpp.org>)
	id 1cP3bz-00076Z-79
	for gclcip-std-proposals@m.gmane.org; Thu, 05 Jan 2017 09:41:27 +0100
Original-Received: by mail-wj0-f198.google.com with SMTP id j10sf119417292wjb.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 05 Jan 2017 00:41:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version: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=OjaUwY390F0P8Vn3EtNpZq0VmXXwKR54A7fxQjLt6DI=;
        b=ikSka/OGnbd2kGv3dWGE/zwUTN30iRx6kUbzIrfm4HPhlLw0Pm9Ab5W51bdWZDj5Z4
         8WbpPZXA5R1OgBkbsC60gQ2wQjsCoCpSn9G3KWCEffVV6PpnD63KL7mRiC4HR6SJNM0j
         y2F1dp1sPtc/LMrZEA4+K+4by1Ihr8DK+Yck6grKR4/DXW7O/GLsmfgWGJEQjXzNSlnb
         RlNEo6vpVWx1QRAD9yX3Glhhoy1gDwexRMViei9CEwOzcKbWOymQHSyTcP/LCv+g4Vp5
         ytReP1WSRwRqHqO9PCFvQlnZloyhIsgHtsyan7fdh7lDyIqjfN56DIS/JUTXc9srdLVi
         M1cw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version: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=OjaUwY390F0P8Vn3EtNpZq0VmXXwKR54A7fxQjLt6DI=;
        b=Z3/DGUdt2v5ZGs+V6phL9xTtD5vWP3OJ75tyhJg6EK8Lbl70lcZLxbYVkKEdOpZXsP
         LUeQbvj6LahihN3SIUS4H/Xot/STp3q1+Uh2pQlYOroWwO2/K1mMbNLA/8E9pRLdTd0Z
         CYw5oOWJ7GQFM2zT8gwkDeFWDxiytI6r9crOexI//o1vT/cj52ZlmegRPqS4aKGDqZSu
         9wHbON2y67hyQsczqwu0YrIrVNMtkLaXpB+nJTuMhG338cm0RJYtzTgXNaKWf/DlRxfJ
         tQBMCrEqBhkEQthI/O4+zDMgFuVUzQC4xpbGtOHoyflQm3PsOQa9+a2qMjx1RhOsvexz
         F1Og==
X-Gm-Message-State: AIkVDXLBqGvDccJ/k0iTZM3gDau5jsVoDdyaocoE1ldt3VadVwrIx+kaFYPPpH3++JtwIQ==
X-Received: by 10.28.26.72 with SMTP id a69mr1742295wma.4.1483605691601;
        Thu, 05 Jan 2017 00:41:31 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.157.9 with SMTP id g9ls6433145wme.13.gmail; Thu, 05 Jan
 2017 00:41:30 -0800 (PST)
X-Received: by 10.28.178.10 with SMTP id b10mr67407658wmf.83.1483605690885;
        Thu, 05 Jan 2017 00:41:30 -0800 (PST)
Original-Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com. [2a00:1450:400c:c09::231])
        by mx.google.com with ESMTPS id yy3si1949743wjc.209.2017.01.05.00.41.30
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 05 Jan 2017 00:41:30 -0800 (PST)
Received-SPF: pass (google.com: domain of db0451@gmail.com designates 2a00:1450:400c:c09::231 as permitted sender) client-ip=2a00:1450:400c:c09::231;
Original-Received: by mail-wm0-x231.google.com with SMTP id k184so281904319wme.1
        for <std-proposals@isocpp.org>; Thu, 05 Jan 2017 00:41:30 -0800 (PST)
X-Received: by 10.28.168.12 with SMTP id r12mr46518332wme.16.1483605690495;
 Thu, 05 Jan 2017 00:41:30 -0800 (PST)
Original-Received: by 10.28.144.66 with HTTP; Thu, 5 Jan 2017 00:41:30 -0800 (PST)
In-Reply-To: <5d432263-8011-4d53-ab33-916270e7f6e5@isocpp.org>
X-Original-Sender: db0451@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of db0451@gmail.com
 designates 2a00:1450:400c:c09::231 as permitted sender) smtp.mailfrom=db0451@gmail.com;
       dmarc=pass (p=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:30272
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30272>

--001a114cc80c2b3af1054554de21
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 5, 2017 at 7:28 AM, Anthony Hall <anthrond@gmail.com> wrote:

> (whether or not this is a good idea design-wise is another discussion)
>

I'm not sure it is. Whether it's a good idea design-wise correlates almost
directly with whether there's a good reason to alter the design ot the
language and make the size static, doesn't it? And IMO, it's not a good
idea design-wise.


And, by design std::array, has static size, so why shouldn't size() be
> queryable at compile time even when an instance object is not available?
>

Mildly convincing, although tuple_size seems close enough for me, and if
for some reason (that I cannot imagine) I did feel the need to inherit from
std::array, I'd have no real issue with reimplementing the size() method or
whatever my preferred method of exposing this info was, in terms of the
base class.

-- 
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/CACGiwhHbb6JNBMEJ9xYBmsVPzf-kxiWiNpkW93Q5nqmp4oc%3D%2Bg%40mail.gmail.com.

--001a114cc80c2b3af1054554de21
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 T=
hu, Jan 5, 2017 at 7:28 AM, Anthony Hall <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:anthrond@gmail.com" target=3D"_blank">anthrond@gmail.com</a>&gt;</spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">(whether or no=
t this is a good idea design-wise is another discussion)</div></blockquote>=
<div><br></div><div>I&#39;m not sure it is. Whether it&#39;s a good idea de=
sign-wise correlates almost directly with whether there&#39;s a good reason=
 to alter the design ot the language and make the size static, doesn&#39;t =
it? And IMO, it&#39;s not a good idea design-wise.<br></div><div>=C2=A0<br>=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div>And, by design std::array, ha=
s static size, so why shouldn&#39;t size() be queryable at compile time eve=
n when an instance object is not available?</div></blockquote><div><br></di=
v><div>Mildly convincing, although tuple_size seems close enough for me, an=
d if for some reason (that I cannot imagine) I did feel the need to inherit=
 from std::array, I&#39;d have no real issue with reimplementing the size()=
 method or whatever my preferred method of exposing this info was, in terms=
 of the base class. <br></div></div><br></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/CACGiwhHbb6JNBMEJ9xYBmsVPzf-kxiWiNpkW=
93Q5nqmp4oc%3D%2Bg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHbb6JN=
BMEJ9xYBmsVPzf-kxiWiNpkW93Q5nqmp4oc%3D%2Bg%40mail.gmail.com</a>.<br />

--001a114cc80c2b3af1054554de21--

.
