This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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] std::begin/std::end family global functions


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 		 	   		  

Attachment: patch_range_access
Description: Binary data


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