Feature Request: Make std::deque<T>::iterator trivially copiable
Jonathan Wakely
jwakely@redhat.com
Wed Aug 8 19:51:00 GMT 2018
On 08/08/18 11:24 -0700, scott constable wrote:
>Hi,
>
>I have a library which uses some assembly to perform copying operations.
>The assembly is wrapped in a template function which checks that the
>argument is trivially copyable (e.g. using
>static_assert(std::is_trivially_copyable<T>::value)). This check passes for
>iterators for vector, list, forward_list, etc., but not for the deque
>iterators. It does pass when I am using libc++.
I was going to say that it already is trivially copyable, but I
realised that's only true on trunk (since https://gcc.gnu.org/r260380
a few months ago).
I need to check if that change is actually OK, or needs to be
reverted. If it changes the argument passing convention for the type
then it needs to be reverted.
>I realize that container iterators are not required by the C++ standard to
>satisfy the TriviallyCopyable requirement. But other than that, I don't see
>any good reason why the deque iterators shouldn't satisfy TriviallyCopyable.
For backwards compatibility reasons.
More information about the Libstdc++
mailing list