This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ PATCH ] C++20 <span>


On Fri, Aug 30, 2019 at 3:41 PM Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On 30/08/19 15:22 -0400, JeanHeyd Meneide wrote:
> >This patch implements <span> as it currently exists in the C++20 Working Draft.
>
> Nice!
>
>
> >Notes:
> >- __gnu_cxx::__normal_iterator is not fully constexpr, so its not used here
>
> I'd prefer to make __normal_iterator constexpr, and use it.
> It needs to be constexpr anyway for string and vector.
> ...

Alright, thank you for the feedback. I fixed it up!

Tested x86_64-pc-linux-gnu.

2019-08-30  JeanHeyd "ThePhD" Meneide  <phdofthehouse@gmail.com>

        * include/std/span: Implement the entirety of span.
        * include/bits/stl_iterator.h: __gnu_cxx::__normal_iterator<T,
C> is now constexpr-qualified for C++11+.
       * include/bits/range_access.h: Add __adl_* versions of access functions.
        * testsuite/23_containers/span/everything.cc: constexpr and
non-constexpr tests.
        * include/Makefile.in: Add span to install.
        * include/Makefile.am: Likewise

Attachment: ThePhD.span.patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]