[patch] std::begin/std::end family global functions
Morwenn Edrahir
morwenn29@hotmail.fr
Mon Jun 3 13:47:00 GMT 2013
Oh my! You're right, I totally overlooked that one. I applied the correction and generated a new patch.
I also added the overloads for std::initializer_list.
I didn't know whether to include <bits/stl_iterator.h> and <initializer_list> at the beginning of the file
or right after the __cplusplus check, and ended up including them after the c++14 check since they are not
usefu in other modes.
I also put the functions in the same order are they are in the link you provided, just so that it is easier
to compare.
Don't hesitate to tell me if you find other errors. I don't know many things about contributing but
would still be happy to do so.
----------------------------------------
> Date: Mon, 3 Jun 2013 15:01:06 +0200
> Subject: Re: [patch] std::begin/std::end family global functions
> From: daniel.kruegler@gmail.com
> To: morwenn29@hotmail.fr
> CC: libstdc++@gcc.gnu.org
>
> 2013/6/3 Morwenn Edrahir <morwenn29@hotmail.fr>:
>> I wrote a patch to complete the std::begin/std::end family global functions into the header bits/range_access.h.
>> I hope the patch file is usable - it's my first time making one -. Sorry otherwise :)
>
> The rbegin/rend overloads for array contradict with those accepted by
>
> http://cplusplus.github.io/LWG/lwg-defects.html#2128
>
> which return std::reverse_iterator<T*>:
>
> template <class T, size_t N> reverse_iterator<T*> rbegin(T (&array)[N]);
> template <class T, size_t N> reverse_iterator<T*> rend(T (&array)[N]);
>
> - Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_range_access
Type: application/octet-stream
Size: 4235 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20130603/3191f01d/attachment.obj>
More information about the Libstdc++
mailing list