Topic: Missing C++ Container Member Functions: cfind,


Author: Alexey Mamontov <caracrist@gmail.com>
Date: Tue, 1 Nov 2016 11:31:30 -0700 (PDT)
Raw View
------=_Part_3223_1147840504.1478025090735
Content-Type: multipart/alternative;
 boundary="----=_Part_3224_28811580.1478025090735"

------=_Part_3224_28811580.1478025090735
Content-Type: text/plain; charset=UTF-8

For the same reasons there are: *cbegin*, *cend*, *crbegin* and *crend*,
there is a need in all of the above functions in c++ containers to be
defined.
Is there any reason why they are not there?
Thanks.

--
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/b41525da-f7d4-4455-9213-e07e53b1855f%40isocpp.org.

------=_Part_3224_28811580.1478025090735
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>For the same reasons there are: <strong>cbegin</stron=
g>, <strong>cend</strong>, <strong>crbegin</strong> and <strong>crend</stro=
ng>, there is a need in all of the above functions in c++ containers to be =
defined.</div><div>Is there any reason why they are not there?</div><div>Th=
anks.</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/b41525da-f7d4-4455-9213-e07e53b1855f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b41525da-f7d4-4455-9213-e07e53b1855f=
%40isocpp.org</a>.<br />

------=_Part_3224_28811580.1478025090735--

------=_Part_3223_1147840504.1478025090735--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Tue, 1 Nov 2016 19:51:19 +0100
Raw View
This is a multi-part message in MIME format.
--------------AFB8DB7AA02CAE9E492D6878
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 01/11/2016 =C3=A0 19:31, Alexey Mamontov a =C3=A9crit :
> For the same reasons there are: *cbegin*, *cend*, *crbegin* and=20
> *crend*, there is a need in all of the above functions in c++=20
> containers to be defined.
> Is there any reason why they are not there?

Would as_const(c).find/equal_range, .... work for you?

I suspect that cbegin, ... are older than as_const.

Vicente

--=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/b1ac6b47-4bfa-2440-479d-e30baea62118%40wanadoo.f=
r.

--------------AFB8DB7AA02CAE9E492D6878
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 01/11/2016 =C3=A0 19:31, Alexey Mamon=
tov
      a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:b41525da-f7d4-4455-9213-e07e53b1855f@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">
        <div>For the same reasons there are: <strong>cbegin</strong>, <stro=
ng>cend</strong>,
          <strong>crbegin</strong> and <strong>crend</strong>, there is
          a need in all of the above functions in c++ containers to be
          defined.</div>
        <div>Is there any reason why they are not there?</div>
      </div>
    </blockquote>
    <br>
    Would as_const(c).find/equal_range, .... work for you?<br>
    <br>
    I suspect that cbegin, ... are older than as_const.<br>
    <br>
    Vicente<br>
  </body>
</html>

<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/b1ac6b47-4bfa-2440-479d-e30baea62118%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b1ac6b47-4bfa-2440-479d-e30baea62118=
%40wanadoo.fr</a>.<br />

--------------AFB8DB7AA02CAE9E492D6878--

.


Author: Alexey Mamontov <caracrist@gmail.com>
Date: Tue, 1 Nov 2016 12:52:18 -0700 (PDT)
Raw View
------=_Part_2752_1946286644.1478029938989
Content-Type: multipart/alternative;
 boundary="----=_Part_2753_592986264.1478029938989"

------=_Part_2753_592986264.1478029938989
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

In most cases it would be enough, but in some it won't.=20
For example, if I have an iterator which is not dereferenceable and I must=
=20
access member functions using operator-> only, in such case it might become=
=20
a big mess to make it with as_const.

=D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=A9=D7=9C=D7=99=
=D7=A9=D7=99, 1 =D7=91=D7=A0=D7=95=D7=91=D7=9E=D7=91=D7=A8 2016 =D7=91=D7=
=A9=D7=A2=D7=94 20:51:22 UTC+2, =D7=9E=D7=90=D7=AA Vicente J. Botet=20
Escriba:

> Le 01/11/2016 =C3=A0 19:31, Alexey Mamontov a =C3=A9crit :
>
> For the same reasons there are: *cbegin*, *cend*, *crbegin* and *crend*,=
=20
> there is a need in all of the above functions in c++ containers to be=20
> defined.
> Is there any reason why they are not there?
>
>
> Would as_const(c).find/equal_range, .... work for you?
>
> I suspect that cbegin, ... are older than as_const.
>
> Vicente
>

--=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/4c586710-bb59-4640-865b-6006a1504199%40isocpp.or=
g.

------=_Part_2753_592986264.1478029938989
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>In most cases it would be enough, but in some it won&=
#39;t. </div><div>For example, if I have an iterator which is not dereferen=
ceable and I must access=C2=A0member functions using operator-&gt; only, in=
 such case it might become a big=C2=A0mess to make it with as_const.<br><br=
>=D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=A9=D7=9C=D7=99=
=D7=A9=D7=99, 1 =D7=91=D7=A0=D7=95=D7=91=D7=9E=D7=91=D7=A8 2016 =D7=91=D7=
=A9=D7=A2=D7=94 20:51:22 UTC+2, =D7=9E=D7=90=D7=AA Vicente J. Botet Escriba=
:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex=
; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-wid=
th: 1px; border-left-style: solid;">
 =20
   =20
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div>Le 01/11/2016 =C3=A0 19:31, Alexey Mamontov
      a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">
        <div>For the same reasons there are: <strong>cbegin</strong>, <stro=
ng>cend</strong>,
          <strong>crbegin</strong> and <strong>crend</strong>, there is
          a need in all of the above functions in c++ containers to be
          defined.</div>
        <div>Is there any reason why they are not there?</div>
      </div>
    </blockquote>
    <br>
    Would as_const(c).find/equal_range, .... work for you?<br>
    <br>
    I suspect that cbegin, ... are older than as_const.<br>
    <br>
    Vicente<br>
  </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/4c586710-bb59-4640-865b-6006a1504199%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4c586710-bb59-4640-865b-6006a1504199=
%40isocpp.org</a>.<br />

------=_Part_2753_592986264.1478029938989--

------=_Part_2752_1946286644.1478029938989--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Tue, 1 Nov 2016 22:59:10 +0100
Raw View
This is a multi-part message in MIME format.
--------------0ACDB0A304F896E90EF43F9C
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 01/11/2016 =C3=A0 20:52, Alexey Mamontov a =C3=A9crit :
> In most cases it would be enough, but in some it won't.
> For example, if I have an iterator which is not dereferenceable and I=20
> must access member functions using operator-> only, in such case it=20
> might become a big mess to make it with as_const.
>
Yes, I have had this use case also. Would something like as_const_ptr=20
help in this case?

Vicente
> =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=A9=D7=9C=D7=
=99=D7=A9=D7=99, 1 =D7=91=D7=A0=D7=95=D7=91=D7=9E=D7=91=D7=A8 2016 =D7=91=
=D7=A9=D7=A2=D7=94 20:51:22 UTC+2, =D7=9E=D7=90=D7=AA Vicente J.=20
> Botet Escriba:
>
>     Le 01/11/2016 =C3=A0 19:31, Alexey Mamontov a =C3=A9crit :
>>     For the same reasons there are: *cbegin*, *cend*, *crbegin* and
>>     *crend*, there is a need in all of the above functions in c++
>>     containers to be defined.
>>     Is there any reason why they are not there?
>
>     Would as_const(c).find/equal_range, .... work for you?
>
>     I suspect that cbegin, ... are older than as_const.
>
>     Vicente
>
> --=20
> You received this message because you are subscribed to the Google=20
> Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send=20
> an email to std-proposals+unsubscribe@isocpp.org=20
> <mailto:std-proposals+unsubscribe@isocpp.org>.
> To post to this group, send email to std-proposals@isocpp.org=20
> <mailto:std-proposals@isocpp.org>.
> To view this discussion on the web visit=20
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4c586710-bb5=
9-4640-865b-6006a1504199%40isocpp.org=20
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4c586710-bb=
59-4640-865b-6006a1504199%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>.


--=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/8cf0263b-c377-4d8b-08c0-eb3f1c4f89d7%40wanadoo.f=
r.

--------------0ACDB0A304F896E90EF43F9C
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 01/11/2016 =C3=A0 20:52, Alexey Mamon=
tov
      a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:4c586710-bb59-4640-865b-6006a1504199@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">
        <div>In most cases it would be enough, but in some it won't. </div>
        <div>For example, if I have an iterator which is not
          dereferenceable and I must access=C2=A0member functions using
          operator-&gt; only, in such case it might become a big=C2=A0mess =
to
          make it with as_const.<br>
          <br>
        </div>
      </div>
    </blockquote>
    Yes, I have had this use case also. Would something like
    as_const_ptr help in this case?<br>
    <br>
    Vicente<br>
    <blockquote
      cite=3D"mid:4c586710-bb59-4640-865b-6006a1504199@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">
        <div>=D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=A9=
=D7=9C=D7=99=D7=A9=D7=99, 1 =D7=91=D7=A0=D7=95=D7=91=D7=9E=D7=91=D7=A8 2016=
 =D7=91=D7=A9=D7=A2=D7=94 20:51:22 UTC+2, =D7=9E=D7=90=D7=AA
          Vicente J. Botet Escriba:</div>
        <blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px
          0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204,
          204); border-left-width: 1px; border-left-style: solid;">
          <div text=3D"#000000" bgcolor=3D"#FFFFFF">
            <div>Le 01/11/2016 =C3=A0 19:31, Alexey Mamontov a =C3=A9crit=
=C2=A0:<br>
            </div>
            <blockquote type=3D"cite">
              <div dir=3D"ltr">
                <div>For the same reasons there are: <strong>cbegin</strong=
>,
                  <strong>cend</strong>, <strong>crbegin</strong> and <stro=
ng>crend</strong>,
                  there is a need in all of the above functions in c++
                  containers to be defined.</div>
                <div>Is there any reason why they are not there?</div>
              </div>
            </blockquote>
            <br>
            Would as_const(c).find/equal_range, .... work for you?<br>
            <br>
            I suspect that cbegin, ... are older than as_const.<br>
            <br>
            Vicente<br>
          </div>
        </blockquote>
      </div>
      -- <br>
      You received this message because you are subscribed to the Google
      Groups "ISO C++ Standard - Future Proposals" group.<br>
      To unsubscribe from this group and stop receiving emails from it,
      send an email to <a moz-do-not-send=3D"true"
        href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+=
unsubscribe@isocpp.org</a>.<br>
      To post to this group, send email to <a moz-do-not-send=3D"true"
        href=3D"mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</=
a>.<br>
      To view this discussion on the web visit <a
        moz-do-not-send=3D"true"
href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4c5867=
10-bb59-4640-865b-6006a1504199%40isocpp.org?utm_medium=3Demail&amp;utm_sour=
ce=3Dfooter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4=
c586710-bb59-4640-865b-6006a1504199%40isocpp.org</a>.<br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>

<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/8cf0263b-c377-4d8b-08c0-eb3f1c4f89d7%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8cf0263b-c377-4d8b-08c0-eb3f1c4f89d7=
%40wanadoo.fr</a>.<br />

--------------0ACDB0A304F896E90EF43F9C--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 1 Nov 2016 15:04:01 -0700 (PDT)
Raw View
------=_Part_3024_809025632.1478037841658
Content-Type: multipart/alternative;
 boundary="----=_Part_3025_813762710.1478037841658"

------=_Part_3025_813762710.1478037841658
Content-Type: text/plain; charset=UTF-8

On Tuesday, November 1, 2016 at 2:31:30 PM UTC-4, Alexey Mamontov wrote:
>
> For the same reasons there are: *cbegin*, *cend*, *crbegin* and *crend*,
> there is a need in all of the above functions in c++ containers to be
> defined.
> Is there any reason why they are not there?
> Thanks.
>

Those exist in order to deal with ranges. A range is defined as having a
start and an "end". A range does not have to have a "lower-bound" or
"upper_bound" or anything of that nature. A range does not have to be
searchable, since that implies a range that can be traversed multiple
times. Not all ranges can do that.

`find`, `lower_bound`, and the like are algorithms, not operators that
fetch iterators from ranges.

--
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/dec2d87f-8d4d-420b-bd99-04a57fb2d001%40isocpp.org.

------=_Part_3025_813762710.1478037841658
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, November 1, 2016 at 2:31:30 PM UTC-4, Alexey M=
amontov wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
><div>For the same reasons there are: <b>cbegin</b>, <b>cend</b>, <b>crbegi=
n</b> and <b>crend</b>, there is a need in all of the above functions in c+=
+ containers to be defined.</div><div>Is there any reason why they are not =
there?</div><div>Thanks.</div></div></blockquote><div><br>Those exist in or=
der to deal with ranges. A range is defined as having a start and an &quot;=
end&quot;. A range does not have to have a &quot;lower-bound&quot; or &quot=
;upper_bound&quot; or anything of that nature. A range does not have to be =
searchable, since that implies a range that can be traversed multiple times=
.. Not all ranges can do that.<br><br>`find`, `lower_bound`, and the like ar=
e algorithms, not operators that fetch iterators from ranges.<br></div></di=
v>

<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/dec2d87f-8d4d-420b-bd99-04a57fb2d001%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dec2d87f-8d4d-420b-bd99-04a57fb2d001=
%40isocpp.org</a>.<br />

------=_Part_3025_813762710.1478037841658--

------=_Part_3024_809025632.1478037841658--

.


Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date: Tue, 1 Nov 2016 15:54:47 -0700 (PDT)
Raw View
------=_Part_3594_1982362282.1478040887358
Content-Type: multipart/alternative;
 boundary="----=_Part_3595_1741224808.1478040887359"

------=_Part_3595_1741224808.1478040887359
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tuesday, November 1, 2016 at 11:31:30 AM UTC-7, Alexey Mamontov wrote:
>
> For the same reasons there are: *cbegin*, *cend*, *crbegin* and *crend*,=
=20
> there is a need in all of the above functions in c++ containers to be=20
> defined.
> Is there any reason why they are not there?
> Thanks.
>

 I think you first need to enumerate the reasons that there are cbegin,=20
cend, and so on. What problems are they solving?
Only once we've got the answer to that question will it be meaningful to=20
say "For the *same* reasons..." =E2=80=94 which is to say, it'll be a falsi=
fiable=20
proposition; we can then argue about whether those reasons *do* apply to=20
cfind or not.

What *is* the benefit of cbegin?  What can I do with x.cbegin() or=20
std::cbegin(x) that I cannot equally well do with std::as_const(x).begin() =
?

I know the above might be a stupid question, but I heard once that the only=
=20
stupid questions are the ones you don't ask. ;)

Thanks,
Arthur

--=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/b85e8221-5228-472b-9d0d-c6c1e11ae6c0%40isocpp.or=
g.

------=_Part_3595_1741224808.1478040887359
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, November 1, 2016 at 11:31:30 AM UTC-7, Alexey =
Mamontov 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=
"><div>For the same reasons there are: <strong>cbegin</strong>, <strong>cen=
d</strong>, <strong>crbegin</strong> and <strong>crend</strong>, there is a=
 need in all of the above functions in c++ containers to be defined.</div><=
div>Is there any reason why they are not there?</div><div>Thanks.</div></di=
v></blockquote><div><br></div><div>=C2=A0I think you first need to enumerat=
e the reasons that there are cbegin, cend, and so on. What problems are the=
y solving?</div><div>Only once we&#39;ve got the answer to that question wi=
ll it be meaningful to say &quot;For the <i>same</i> reasons...&quot; =E2=
=80=94 which is to say, it&#39;ll be a falsifiable proposition; we can then=
 argue about whether those reasons <i>do</i> apply to cfind or not.</div><d=
iv><br></div><div>What *is* the benefit of cbegin? =C2=A0What can I do with=
 x.cbegin() or std::cbegin(x) that I cannot equally well do with std::as_co=
nst(x).begin() ?</div><div><br></div><div>I know the above might be a stupi=
d question, but I heard once that the only stupid questions are the ones yo=
u don&#39;t ask. ;)</div><div><br></div><div>Thanks,</div><div>Arthur</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/b85e8221-5228-472b-9d0d-c6c1e11ae6c0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b85e8221-5228-472b-9d0d-c6c1e11ae6c0=
%40isocpp.org</a>.<br />

------=_Part_3595_1741224808.1478040887359--

------=_Part_3594_1982362282.1478040887358--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 1 Nov 2016 17:57:58 -0700 (PDT)
Raw View
------=_Part_3047_1657377552.1478048278224
Content-Type: multipart/alternative;
 boundary="----=_Part_3048_1938084534.1478048278224"

------=_Part_3048_1938084534.1478048278224
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Tuesday, November 1, 2016 at 6:54:47 PM UTC-4, Arthur O'Dwyer wrote:
>
> On Tuesday, November 1, 2016 at 11:31:30 AM UTC-7, Alexey Mamontov wrote:
>>
>> For the same reasons there are: *cbegin*, *cend*, *crbegin* and *crend*,=
=20
>> there is a need in all of the above functions in c++ containers to be=20
>> defined.
>> Is there any reason why they are not there?
>> Thanks.
>>
>
>  I think you first need to enumerate the reasons that there are cbegin,=
=20
> cend, and so on. What problems are they solving?
> Only once we've got the answer to that question will it be meaningful to=
=20
> say "For the *same* reasons..." =E2=80=94 which is to say, it'll be a fal=
sifiable=20
> proposition; we can then argue about whether those reasons *do* apply to=
=20
> cfind or not.
>
> What *is* the benefit of cbegin?  What can I do with x.cbegin() or=20
> std::cbegin(x) that I cannot equally well do with std::as_const(x).begin(=
) ?
>

You can write it in C++11 or C++14.

Or to put it another way... we didn't think of `as_const` for a while.

--=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/3f3a7071-0f3b-455b-bd37-c4cee519df07%40isocpp.or=
g.

------=_Part_3048_1938084534.1478048278224
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, November 1, 2016 at 6:54:47 PM UTC-4, =
Arthur O&#39;Dwyer 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">On Tuesday, November 1, 2016 at 11:31:30 AM UTC-7, Alexey Mamon=
tov 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"><div>For=
 the same reasons there are: <b>cbegin</b>, <b>cend</b>, <b>crbegin</b> and=
 <b>crend</b>, there is a need in all of the above functions in c++ contain=
ers to be defined.</div><div>Is there any reason why they are not there?</d=
iv><div>Thanks.</div></div></blockquote><div><br></div><div>=C2=A0I think y=
ou first need to enumerate the reasons that there are cbegin, cend, and so =
on. What problems are they solving?</div><div>Only once we&#39;ve got the a=
nswer to that question will it be meaningful to say &quot;For the <i>same</=
i> reasons...&quot; =E2=80=94 which is to say, it&#39;ll be a falsifiable p=
roposition; we can then argue about whether those reasons <i>do</i> apply t=
o cfind or not.</div><div><br></div><div>What *is* the benefit of cbegin? =
=C2=A0What can I do with x.cbegin() or std::cbegin(x) that I cannot equally=
 well do with std::as_const(x).begin() ?</div></div></blockquote><div><br>Y=
ou can write it in C++11 or C++14.<br><br>Or to put it another way... we di=
dn&#39;t think of `as_const` for a while.</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/3f3a7071-0f3b-455b-bd37-c4cee519df07%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3f3a7071-0f3b-455b-bd37-c4cee519df07=
%40isocpp.org</a>.<br />

------=_Part_3048_1938084534.1478048278224--

------=_Part_3047_1657377552.1478048278224--

.