220 28833 <d5b5e9e2-1110-41a9-92cc-1a9f54ac6b5a@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "Ivan G." <nekotekina@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: std::reverse_lookup for arrays, does it at
 least make some sense?
Date: Fri, 14 Oct 2016 05:22:47 -0700 (PDT)
Lines: 123
Approved: news@gmane.org
Message-ID: <d5b5e9e2-1110-41a9-92cc-1a9f54ac6b5a@isocpp.org>
References: <8c3194d9-dd08-4bf9-9612-82b6aff3d55f@isocpp.org> <67db4ec6-764c-4b31-a90d-22b0ec1ae0fd@isocpp.org>
 <CAPCFJdRy8m=mgBHt27VA48sknQYmencbtCxuHDCSKYM4D2U=Gw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_818_164022212.1476447767811"
X-Trace: blaine.gmane.org 1476447781 28809 195.159.176.226 (14 Oct 2016 12:23:01 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 14 Oct 2016 12:23:01 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBD26JFH7QQHRBG44QPAAKGQEDR5T4UQ@isocpp.org Fri Oct 14 14:22:54 2016
Return-path: <std-proposals+bncBD26JFH7QQHRBG44QPAAKGQEDR5T4UQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD26JFH7QQHRBG44QPAAKGQEDR5T4UQ@isocpp.org>)
	id 1bv1Vl-0006PV-59
	for gclcip-std-proposals@m.gmane.org; Fri, 14 Oct 2016 14:22:53 +0200
Original-Received: by mail-oi0-f72.google.com with SMTP id d185sf217787718oig.1
        for <gclcip-std-proposals@m.gmane.org>; Fri, 14 Oct 2016 05:22:55 -0700 (PDT)
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
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=jQp96f1bJxbJXdgyUY8FsxRWAmjAOoS+StYydO8df6Q=;
        b=O1HBpEYCqQIb9WwRgK/u5LfxWFhbIcUar45V3Zr3hZB+h70R5XAW8j5nv757fMx8Hy
         HXXStCMQtyVuUDbsfCbNj+ur5i7hwDDFa/7npYNkejEfj3I1BcXP2vhEtsUoaQqx5Bfq
         wPjMH2WqSqJZHl8jkIEKB5LpLd2Ts/KOkZLqpCeYixFXfjA8UfK9LSNJts13YU4u/4Py
         48b9waSa8msKaILziXwbEvcr1aiDThKw3gn5IGcJj5IO9ZhahrYJhfw18MswK7djCwA1
         lbmS4OiFVvVGofb5VLBCutCX6IYPLMBLdFXUIXO0jlH6iYNRo6RTJ8Jj4GHVoRCm17o9
         t41A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=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=jQp96f1bJxbJXdgyUY8FsxRWAmjAOoS+StYydO8df6Q=;
        b=iGONOmaqUKF+/iqiBI+yRYueOGbs4h8TpMSDIomWcJqjNzQ+kau1VMMZGYDW01HSsF
         uLa+yRu2MdRsb9eRf42s1CIKMXuVboI8gWd/3p53bLxH93xKIj4y6CmfHo64slmPvAVq
         NO21qtfK2fbH7QNjruzbf3EGXbyRRm9OFL/pXcP0R+a6tL73PBVDBeFPmhbQGmFOAw+c
         5tQgvM5uq1JCv5PfTUp63/WObkvFU/uj0NrcaGnK/Iez9h9xFFqrHqLhL5Jz4TOL2zXe
         se1FGyOdPIHCrTjPSbEBJvElnXG55rx6y5a3WLjyk9TKsXR168iNZe05VEcULfpim/s1
         +Tdg==
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: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=jQp96f1bJxbJXdgyUY8FsxRWAmjAOoS+StYydO8df6Q=;
        b=TheSA2JdbGMGe/nH4nj8QQdWwxmjd33d8U7ohw9rf/OlsyvJqLXbVEcK9eVM6ijVN5
         pB5FGdxAOq0ck93pOV9JEVsYmSEizpyMWHv3jQF1s7SZxVU5f7lMBltajFJ7jIp/c9wy
         aK55ZjQatjCWQH9+ND0iV4l7JeSe9QMIdJ66BGxYIa1ZbHcx62j6z2lNa0MWlxrzAM/d
         ev562kG9xzDk9jwbE0o0gRomeRuAtIWIoREgAgfnAS7JQIyv98po/4e9OvQwXKF2yif0
         sklZfymJZu4IRrv2IwKwcV90voZWwKC0mUYro9vgrcEyaqUjTrkDkm+qbx+mLrcYDFPG
         adTA==
X-Gm-Message-State: AA6/9RlCh62taP3iutptubwn0eg2ghbbLTZ3/+C6myGP4mR0AVZNjX0gJ3mecpa0GLzNBQ==
X-Received: by 10.157.60.216 with SMTP id t24mr2840163otf.71.1476447775097;
        Fri, 14 Oct 2016 05:22:55 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.19.200 with SMTP id 69ls2781786iot.4.gmail; Fri, 14 Oct
 2016 05:22:51 -0700 (PDT)
X-Received: by 10.36.121.78 with SMTP id z75mr1068870itc.9.1476447771173;
        Fri, 14 Oct 2016 05:22:51 -0700 (PDT)
In-Reply-To: <CAPCFJdRy8m=mgBHt27VA48sknQYmencbtCxuHDCSKYM4D2U=Gw@mail.gmail.com>
X-Original-Sender: nekotekina@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:28833
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28833>

------=_Part_818_164022212.1476447767811
Content-Type: multipart/alternative; 
	boundary="----=_Part_819_1246463895.1476447767811"

------=_Part_819_1246463895.1476447767811
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yes, it's effectively constexpr std::find_if. Can it itself become=20
constexpr in future? I also tried to imagine how it could work for C string=
=20
arrays, but maybe it needs totally different function.

=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3, 13 =D0=BE=D0=BA=D1=82=D1=8F=D0=
=B1=D1=80=D1=8F 2016 =D0=B3., 18:00:50 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=
=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Micha=C5=82 Dominiak=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> Sounds like a job for `std::find_if`.
>
> On Thu, Oct 13, 2016 at 4:59 PM Nicol Bolas <jmck...@gmail.com=20
> <javascript:>> wrote:
>
>> What exactly do you mean by "reverse lookup"? What is this function=20
>> supposed to return?
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/67db4ec6-76=
4c-4b31-a90d-22b0ec1ae0fd%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/67db4ec6-7=
64c-4b31-a90d-22b0ec1ae0fd%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>

--=20
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 e=
mail 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/d5b5e9e2-1110-41a9-92cc-1a9f54ac6b5a%40isocpp.or=
g.

------=_Part_819_1246463895.1476447767811
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Yes, it&#39;s effectively constexpr std::find_if. Can it i=
tself become constexpr in future? I also tried to imagine how it could work=
 for C string arrays, but maybe it needs totally different function.<br><br=
>=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3, 13 =D0=BE=D0=BA=D1=82=D1=8F=D0=
=B1=D1=80=D1=8F 2016 =D0=B3., 18:00:50 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=
=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Micha=C5=82 Dominiak =D0=BD=D0=
=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<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">Sounds like a job for `std::find_if`.</div><br><div =
class=3D"gmail_quote"><div dir=3D"ltr">On Thu, Oct 13, 2016 at 4:59 PM Nico=
l Bolas &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=
=3D"onhqbrizAQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascri=
pt:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return =
true;">jmck...@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:=
1ex"><div dir=3D"ltr">What exactly do you mean by &quot;reverse lookup&quot=
;? What is this function supposed to return?<br></div>



-- <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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
onhqbrizAQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"onhqbrizAQAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/67db4ec6-764c-4b31-a90d-22b0ec1ae0fd%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/67db4ec6-764c-4b31-a90d-22b0ec1ae0fd%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/67db4ec6-764c-4b31-a90d-22b0ec1ae0fd%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/isocpp.org/d/msgid/std-proposals/67db4ec6-764c-4b31-a90d-22b0ec1ae0fd%40=
isocpp.org</a>.<br>
</blockquote></div>
</blockquote></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/d5b5e9e2-1110-41a9-92cc-1a9f54ac6b5a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/d5b5e9e2-1110-41a9-92cc-1a9f54ac6b5a=
%40isocpp.org</a>.<br />

------=_Part_819_1246463895.1476447767811--

------=_Part_818_164022212.1476447767811--

.
