220 13723 <1d95ed0b-2872-457a-80c4-c9c73182aed6@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Myriachan <myriachan@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Generic std::size, a la std::begin
Date: Mon, 6 Oct 2014 12:40:16 -0700 (PDT)
Lines: 66
Approved: news@gmane.org
Message-ID: <1d95ed0b-2872-457a-80c4-c9c73182aed6@isocpp.org>
References: <8808df5e-62c4-459d-acd9-00e63adb9476@isocpp.org> <20141004004445.GA8207@lenovo> <CB0A8C8F-02D1-449C-B41C-5AE9FE6AB069@gmail.com> <c698550a-9ed6-457c-9dcb-a8aed3d0b737@isocpp.org> <m0uhol$4u1$1@ger.gmane.org> <890596a6-4fe4-4fe4-b96b-0196aaac94cf@isocpp.org> <51161156-ee03-4662-bfcd-a990e6fe830d@isocpp.org>
 <m0ul2n$je0$1@ger.gmane.org>
 <861975ec-a57f-448b-9321-ef061226f265@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1482_1250440724.1412624416448"
X-Trace: ger.gmane.org 1412624426 5824 80.91.229.3 (6 Oct 2014 19:40:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 6 Oct 2014 19:40:26 +0000 (UTC)
Cc: mw_triad@users.sourceforge.net
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKLT4PURQHRBIPAZOQQKGQEUIPJDBI@isocpp.org Mon Oct 06 21:40:19 2014
Return-path: <std-proposals+bncBDKLT4PURQHRBIPAZOQQKGQEUIPJDBI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qg0-f71.google.com ([209.85.192.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDKLT4PURQHRBIPAZOQQKGQEUIPJDBI@isocpp.org>)
	id 1XbE8p-0004hI-0N
	for gclcip-std-proposals@m.gmane.org; Mon, 06 Oct 2014 21:40:19 +0200
Original-Received: by mail-qg0-f71.google.com with SMTP id q108sf11142780qgd.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 06 Oct 2014 12:40:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=qtzREDtXblGKJpHDND6mGjyu+SaBPrDspqX0S+57/2Y=;
        b=FAgELaZZ6vSenLa0Jwu/sX8ATpRY7F/uErX492ovyhvX1XOBiZ1snLEtrgePlGwyfJ
         AlghYy+lq0nNAAw8XBXcV6EyY5HlMbrmpT1kkGVrXXChbq3THQdLccChfKHjcfjbUQTS
         KfQEeiJcs1Vh0GAYE/uACQu48TMn5hzUqhW+fA36wVyBjTV33rrXPKS1jKG/M+zr3wg8
         A2c2WUGfVIpHUKlmbRafE8VbJmXorMlZk1HlLw+irr7aXJS/1bB2ZrOuvUgFXotv2gDK
         Yn3Ny5CqBSntaxsQ4++sdeyCui2iAAUNjhYsVeLyOVWBdYTpj0iab8XESpAyH8EXRiLG
         CyQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=qtzREDtXblGKJpHDND6mGjyu+SaBPrDspqX0S+57/2Y=;
        b=V3tQAZT9mGiOhT5YI9Bu8vW6XbX7n++4UnOyvuO8xtt72j1w2gCvc0vz0sIPaAe0Rg
         nLUvHl4JT/xGG0qSQ8DdNkdMFBz3yOEhriluZr+Z2nPDSbUugvWFJKIpRZGBJl1We0NP
         tfYDr4UIbZmC0VjseaZuWhcagiD5YGTrEGyi36DBRiaDxrhGBabJIv1llreUV8xJu4wO
         mV03r4x7oU9kj87WglnPCaJQjhfldTcaBtf1UUDc3B0pXVndMcAfGlRS2GWknbwRp/xO
         ZmL/3f8L9hZ7r3C4/8bvWtIZnn+QIfJJSkXFZhVmZjZRCAY8UtHiG83G7Kk/XCdkzAaF
         pfdw==
X-Gm-Message-State: ALoCoQmYGc8S+4EDW6414kiaNbx95VQ9H0tlHKepTNpa/D7DL+MXlVD8juuh1q5lEPk4+HQr1eOF
X-Received: by 10.236.101.148 with SMTP id b20mr11941799yhg.46.1412624418199;
        Mon, 06 Oct 2014 12:40:18 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.21.8 with SMTP id r8ls695801ige.0.gmail; Mon, 06 Oct 2014
 12:40:17 -0700 (PDT)
X-Received: by 10.50.97.74 with SMTP id dy10mr156958igb.1.1412624417688;
        Mon, 06 Oct 2014 12:40:17 -0700 (PDT)
In-Reply-To: <861975ec-a57f-448b-9321-ef061226f265@isocpp.org>
X-Original-Sender: myriachan@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13723
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13723>

------=_Part_1482_1250440724.1412624416448
Content-Type: text/plain; charset=UTF-8

On Monday, October 6, 2014 11:50:43 AM UTC-7, Vlad from Moscow wrote:
>
> Names size and max_size are very logically consistent. But names count and 
> max_count can comfuse users. I do not see any problem with using std::size. 
> It is much better than for example std::extent that makes code awful.
> It is using name count for such a purpose will be a mistake.. We do not 
> say "the count of an array" We say "the size of an array".
>
>
That's only because it is decades too late to change STL to rename the 
member functions count and max_count.  The conflict with the sizeof 
operator is strong.

Some implementations already have a _countof macro.

Melissa

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1482_1250440724.1412624416448
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, October 6, 2014 11:50:43 AM UTC-7, Vlad from Mo=
scow wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><d=
iv>Names size and max_size are very logically consistent. But names count a=
nd max_count can comfuse users. I do not see any problem with using std::si=
ze. It is much better than for example std::extent that makes code awful.</=
div><div>It is using name count for such a purpose will be a mistake.. We d=
o not say "the count of an array" We say "the size of an array".<br></div><=
br></div></blockquote><div><br>That's only because it is decades too late t=
o change STL to rename the member functions <span style=3D"font-family: cou=
rier new,monospace;">count</span> and <span style=3D"font-family: courier n=
ew,monospace;">max_count</span>.&nbsp; The conflict with the <span style=3D=
"font-family: courier new,monospace;">sizeof</span> operator is strong.<br>=
<br>Some implementations already have a <span style=3D"font-family: courier=
 new,monospace;">_countof</span> macro.<br><br>Melissa<br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1482_1250440724.1412624416448--

.
