From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] libstdc++/67374 declare valarray begin/end overloads in <iterator>
Date: Thu, 27 Aug 2015 19:56:00 -0000 [thread overview]
Message-ID: <20150827195425.GX2631@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1508272136490.3510@laptop-mg.saclay.inria.fr>
On 27/08/15 21:48 +0200, Marc Glisse wrote:
>On Thu, 27 Aug 2015, Jonathan Wakely wrote:
>
>>The std::cbegin function in <bits/range_access.h> can't call the
>>std::begin function in <valarray> unless it knows about it, so we need
>>to declare the valarray overloads in <bits/range_access.h>.
>
>Hmm, do you remember why valarray has an ugly overload of std::begin
>instead of a nice member function begin like every other container ?
>It should at least be legal to implement it this way.
No, sorry, I have no idea.
C++11 added the begin non-members, and then C++14 added the
cbegin non-member, which calls std::begin.
I'm not convinced it's supposed to work with valarray, but it's
confusing that it doesn't when std::begin(const valarray<T>&) exists.
next prev parent reply other threads:[~2015-08-27 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 19:07 Jonathan Wakely
2015-08-27 19:48 ` Marc Glisse
2015-08-27 19:56 ` Jonathan Wakely [this message]
2015-08-28 5:18 ` Kohei Takahashi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150827195425.GX2631@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).