220 41400 <1828d3a1-5211-4b53-9521-e926f7fa0fb7@isocpp.org> article
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: comparison operators for std::initializer_list
Date: Fri, 25 Jan 2019 07:02:21 -0800 (PST)
Approved: news@gmane.org
Message-ID: <1828d3a1-5211-4b53-9521-e926f7fa0fb7@isocpp.org>
References: <24be1c08-b474-4e08-8b3f-0d6cbb4d9a8e@isocpp.org>
Reply-To: std-proposals@isocpp.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_816_1305729088.1548428541833"
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="148082"; mail-complaints-to="usenet@blaine.gmane.org"
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBB7WJVTRAKGQEYMDIFUI@isocpp.org Fri Jan 25 16:02:25 2019
Return-path: <std-proposals+bncBCEKFTV6ZUMBB7WJVTRAKGQEYMDIFUI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb1-f198.google.com ([209.85.219.198])
	by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.89)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBB7WJVTRAKGQEYMDIFUI@isocpp.org>)
	id 1gn2zx-000cO3-K4
	for gclcip-std-proposals@m.gmane.org; Fri, 25 Jan 2019 16:02:25 +0100
Original-Received: by mail-yb1-f198.google.com with SMTP id l83sf4678210ybl.3
        for <gclcip-std-proposals@m.gmane.org>; Fri, 25 Jan 2019 07:02:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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;
        bh=IdKUFyrEdo9pGiC2y5SHQw7OjcMeHRPi3/qVXeNHdDk=;
        b=DvoUVt6wtEsAmmCBix2JaFGfi3UXqt+bvhviU0Q82yr4Dw0NQ6qzX5Z4Ajj2m63QEx
         RufDkD9ljKMvqSjAN702uThio70nxdWV23viSnuOvsA0gm0nJArYmsWPFPDgtTSpM83J
         WNeLUnMjdW0PnII7ES4RTghzJL9obB9yU7o9JmIV4jvRD7AwncIovAri8KlnT1/SFF/K
         dSdN7OkBo/i+uBvQUByaCkLEygWgt3J1wPybfgF6eEPPDHN3jAmAg3OStOolCtNaKYPY
         zmHO+cnTmg4K6KrE/j11yru9WUUboouAfhUT6fS/iZxU7T0Xbev6SYFSa9CCzdLatowG
         Ynyw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to: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;
        bh=IdKUFyrEdo9pGiC2y5SHQw7OjcMeHRPi3/qVXeNHdDk=;
        b=lXqRpe+x8aegGAJtOR6+gywSKo3CW6yRRBYcykV+yEVG8sIDWlPfzky8M8rGnhXAA1
         E4fEwb/+pdn8qIas9+bgb6dRqF9wWmZoE/QQ10APc5uX6vU+VX73wvQEk0iN7TSEB+uL
         +04ueYebP+0hlNZW9TEkqeHBHPLwAWwpmr5jPnb4RTcxbUb5OdHQg+LeD5e3Mf4yLfCO
         or15Mj00wk/+QWp1xnU6GTnCp5mZywa3vcc0wYzcns7B3ukOCuFzxiRYjXXDFK9e8X+9
         6BbMK0RpLqLaD44yGRPVt+j8/rxbXfMjrD9eP0N1sGajwbOKDSnATk58lxWiZ/J5r9M5
         SMog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=IdKUFyrEdo9pGiC2y5SHQw7OjcMeHRPi3/qVXeNHdDk=;
        b=fYfGKSkkRKgBYVwbT4thcmWDbfPyvHJ3+dT542PRARXVdwWVC2Ba46uSrodGz9Tr4H
         rn6MQZx/WDctRtRqU1mAUA7cmcgBrgWXd19kklgOdWidFn/vnImJgMpAJxrXjt5XAPpg
         ZfiP2QCLW24oe3Dk0s7iR+MrMDML6VW24NYPWoRJk3IRkeAMijNRlnt+lqa3SUF1KtIA
         bDMw6k9Tbps3BG+lunpRUSkZgWe4NL71XhUMSI4b4BbDn0tiBASqZvdm8ctscrIdwX8h
         /Hy1wR1P75/TvPmHLHt5LOb9yoEXnI60Ty3/6SmKnLVZ/lZmVzTGIE3auW6/dJThIST5
         fafA==
X-Gm-Message-State: AJcUukftONlYsRU8TeTYwz1oOPZdggNQhq/WZvDcothMM4i2vZC/lncH
	ERmti/Ywd3x+pYnKmDUQ8BPefg==
X-Google-Smtp-Source: ALg8bN54ggIpqxNqCCwxsOmR4ke2bvd8B4KHtRpvnTIJsG4/3qB6yocdZa89TVsGh6hAcLZgtRZY0g==
X-Received: by 2002:a25:3d05:: with SMTP id k5mr5677458yba.7.1548428543972;
        Fri, 25 Jan 2019 07:02:23 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a25:6d41:: with SMTP id i62ls2844943ybc.11.gmail; Fri, 25
 Jan 2019 07:02:22 -0800 (PST)
X-Received: by 2002:a25:234a:: with SMTP id j71mr49177ybj.2.1548428542513;
        Fri, 25 Jan 2019 07:02:22 -0800 (PST)
In-Reply-To: <24be1c08-b474-4e08-8b3f-0d6cbb4d9a8e@isocpp.org>
X-Original-Sender: jmckesson@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:41400
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41400>

------=_Part_816_1305729088.1548428541833
Content-Type: multipart/alternative; 
	boundary="----=_Part_817_748329377.1548428541833"

------=_Part_817_748329377.1548428541833
Content-Type: text/plain; charset="UTF-8"

An `initializer_list`, as the name suggests, is a list meant to be used to 
initialize an object. That is why it exists: to help you initialize an 
object from a homogeneous sequence of values.

If you're doing comparisons between such lists, then I submit that you're 
using the object incorrectly, that it's being used for a purpose outside of 
its intended use case. Thanks to CTAD, we can do `std::array a = {1, 2};`, 
so there's really no reason to use an `auto`-deduced `initializer_list` 
instead of a proper type.

-- 
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/1828d3a1-5211-4b53-9521-e926f7fa0fb7%40isocpp.org.

------=_Part_817_748329377.1548428541833
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>An `initializer_list`, as the name suggests, is a lis=
t meant to be used to initialize an object. That is why it exists: to help =
you initialize an object from a homogeneous sequence of values.<br></div><d=
iv><br></div><div>If you&#39;re doing comparisons between such lists, then =
I submit that you&#39;re using the object incorrectly, that it&#39;s being =
used for a purpose outside of its intended use case. Thanks to CTAD, we can=
 do `std::array a =3D {1, 2};`, so there&#39;s really no reason to use an `=
auto`-deduced `initializer_list` instead of a proper type.<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/1828d3a1-5211-4b53-9521-e926f7fa0fb7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1828d3a1-5211-4b53-9521-e926f7fa0fb7=
%40isocpp.org</a>.<br />

------=_Part_817_748329377.1548428541833--

------=_Part_816_1305729088.1548428541833--

.
