Relocation (= move+destroy)
2018-10-25 Marc Glisse <marc.glisse@inria.fr> PR libstdc++/87106 * include/bits/alloc_traits.h (_S_construct, _S_destroy, construct, destroy): Add noexcept specification. * include/bits/allocator.h (construct, destroy): Likewise. * include/ext/alloc_traits.h (construct, destroy): Likewise. * include/ext/malloc_allocator.h (construct, destroy): Likewise. * include/ext/new_allocator.h (construct, destroy): Likewise. * include/bits/stl_uninitialized.h (__relocate_object_a, __relocate_a, __relocate_a_1): New functions. (__is_trivially_relocatable): New class. * include/bits/stl_vector.h (__use_relocate): New static member. * include/bits/vector.tcc (reserve, _M_realloc_insert, _M_default_append): Use __relocate_a. (reserve, _M_assign_aux, _M_realloc_insert, _M_fill_insert, _M_default_append, _M_range_insert): Move _GLIBCXX_ASAN_ANNOTATE_REINIT after _Destroy. * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Replace CopyConsOnlyType with DelAnyAssign. From-SVN: r265485
Showing
- libstdc++-v3/ChangeLog 21 additions, 0 deletionslibstdc++-v3/ChangeLog
- libstdc++-v3/include/bits/alloc_traits.h 10 additions, 0 deletionslibstdc++-v3/include/bits/alloc_traits.h
- libstdc++-v3/include/bits/allocator.h 5 additions, 1 deletionlibstdc++-v3/include/bits/allocator.h
- libstdc++-v3/include/bits/stl_uninitialized.h 62 additions, 0 deletionslibstdc++-v3/include/bits/stl_uninitialized.h
- libstdc++-v3/include/bits/stl_vector.h 9 additions, 0 deletionslibstdc++-v3/include/bits/stl_vector.h
- libstdc++-v3/include/bits/vector.tcc 90 additions, 34 deletionslibstdc++-v3/include/bits/vector.tcc
- libstdc++-v3/include/ext/alloc_traits.h 3 additions, 0 deletionslibstdc++-v3/include/ext/alloc_traits.h
- libstdc++-v3/include/ext/malloc_allocator.h 5 additions, 1 deletionlibstdc++-v3/include/ext/malloc_allocator.h
- libstdc++-v3/include/ext/new_allocator.h 5 additions, 1 deletionlibstdc++-v3/include/ext/new_allocator.h
- libstdc++-v3/testsuite/23_containers/vector/modifiers/push_back/49836.cc 3 additions, 3 deletions...stsuite/23_containers/vector/modifiers/push_back/49836.cc
Loading
Please register or sign in to comment