[PATCH] Extend std::copy/std::copy_n char* overload to deque iterator
François Dumont
frs.dumont@gmail.com
Sat May 23 14:02:07 GMT 2020
On 22/05/20 10:57 pm, François Dumont wrote:
> 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.
Note that I expose all __copy_n_a overloads in stl_algobase.h and not
only the overload needed for the std::copy. Let me know if you prefer to
limit it.
>
> 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
>
I forgot to mention that "doesn't seem to work" above means that all
C++11 or higher tests are reported as FAIL in this case. I was expecting
an UNSUPPORTED.
More information about the Gcc-patches
mailing list