[PATCH] Extend std::copy/std::copy_n char* overload to deque iterator

François Dumont frs.dumont@gmail.com
Fri May 22 20:57:18 GMT 2020


On 21/05/20 2:17 pm, Jonathan Wakely wrote:
>
> Why is the optimization not done for C++03 mode?
>
I did it this way because the new std::copy overload rely on std::copy_n 
implementation details which is a C++11 algo.


> It looks like the uses of 'auto' can be reaplced easily, and
> __enable_if_t<> can be replaced with __gnu_cxx::__enable_if<>::__type.
>
But yes, we can indeed provide those implementation details in pre-C++11.

This is what I've done in this new version.

Tested under Linux x86_64 in default c++ mode.

I tried to use CXXFLAGS=-std=c++03 but it doesn't seem to work even if I 
do see the option in build logs. I remember you adivised a different 
approach, can you tell me again ?

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: deque_streambuf_ite.patch
Type: text/x-patch
Size: 16708 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200522/4e1c3b1a/attachment.bin>


More information about the Gcc-patches mailing list