Jonathan Wakely
cc7f3d0eee
C++11 allocator support for std::list.
...
PR libstdc++/55409
* include/bits/list.tcc (_List_base::_M_clear()): Use allocator traits.
(list::list(const list&)): Use allocator propagation trait. Use
_M_assign_dispatch to copy elements.
* include/bits/stl_list.h (_List_node): Use __aligned_membuf in C++11.
(_List_node::_M_valptr()): Add accessor for stored value.
(_List_iterator, _List_const_iterator, _List_base): Use _M_valptr().
(_List_base, list): Use allocator traits.
(_List_base::_M_get_Tp_allocator, _List_base::get_allocator): Remove.
(_List_base::_M_move_nodes): New function.
(_List_base(_List_base&&)): Use _M_move_nodes.
(_List_base(_List_base&&, _Node_alloc_type&&)): New constructor.
(list::_M_create_node, list::_M_erase, list::max_size): Use allocator
traits.
(list(size_type)): Add allocator parameter.
(list(const list&)): Use allocator propagation trait.
(list(const list&, const allocator_type&)): New constructor.
(list(list&&, const allocator_type&)): Likewise.
(list::operator=(list&&), list::swap(list&)): Use allocator
propagation traits.
(list::_M_move_assign): New functions.
* include/debug/list: Add allocator-extended constructors.
* include/profile/list: Likewise.
* python/libstdcxx/v6/printers.py (get_value_from_list_node): New
function to get value from _List_node.
(StdListPrinter): Use get_value_from_list_node.
* testsuite/23_containers/list/allocator/copy.cc: New.
* testsuite/23_containers/list/allocator/copy_assign.cc: New.
* testsuite/23_containers/list/allocator/minimal.cc: New.
* testsuite/23_containers/list/allocator/move.cc: New.
* testsuite/23_containers/list/allocator/move_assign.cc: New.
* testsuite/23_containers/list/allocator/noexcept.cc: New.
* testsuite/23_containers/list/allocator/swap.cc: New.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Adjust dg-prune-output line number.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
From-SVN: r224580
2015-06-17 21:36:42 +01:00
Jonathan Wakely
21bdef94b1
forward_list.h (_Fwd_list_base(const _Node_alloc_type&)): Change parameter to rvalue-reference.
...
* include/bits/forward_list.h
(_Fwd_list_base(const _Node_alloc_type&)): Change parameter to
rvalue-reference.
(_Fwd_list_base(_Fwd_list_base&&, const _Node_alloc_type&)): Likewise.
(forward_list(const _Alloc&)): Split default constructor out to
separate function.
(forward_list(forward_list&&, const _Alloc&)): Move elements if base
class didn't do so.
(forward_list::_M_move_assign(forward_list&&, true_type)): Replace
swap call with two assignments.
* include/bits/forward_list.tcc
(_Fwd_list_base(_Fwd_list_base&&, const _Node_alloc_type&)): Don't
move elements when allocators are not equal.
* include/debug/forward_list (forward_list(const allocator_type&)):
Split default constructor out to separate function.
* include/profile/forward_list (forward_list(const _Alloc&)):
Likewise.
From-SVN: r224566
2015-06-17 18:45:45 +01:00
Jonathan Wakely
9649e5b62e
forward_list.h (forward_list::_M_get_Node_allocator): Remove unnecessary uses of operator& and static_cast.
...
* include/bits/forward_list.h (forward_list::_M_get_Node_allocator):
Remove unnecessary uses of operator& and static_cast.
* include/bits/forward_list.tcc
(forward_list::operator=(const forward_list&)): Use __addressof
instead of operator&.
(forward_list::remove(const _Tp&), forward_list::remove(_Pred)):
Remove invalid static_casts.
* include/debug/forward_list: Use __addressof instead of operator&.
* testsuite/23_containers/forward_list/modifiers/addressof.cc: New.
From-SVN: r224553
2015-06-17 12:33:31 +01:00
Jonathan Wakely
c92334d4c5
alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use __is_nothrow_swappable.
...
* include/ext/alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use
__is_nothrow_swappable.
From-SVN: r224552
2015-06-17 11:51:46 +01:00
Jonathan Wakely
91b142ffc3
* include/bits/allocated_ptr.h (__allocated_ptr): Use __addressof.
...
From-SVN: r224540
2015-06-16 23:33:06 +01:00
Jonathan Wakely
200fcd3398
list.tcc (list::operator=(const list&), [...]): Use __addressof instead of operator&.
...
* include/bits/list.tcc (list::operator=(const list&), list::merge):
Use __addressof instead of operator&.
(list::sort): Use array-to-pointer decay instead of operator&.
* include/bits/stl_list.h (list::splice): Use __addressof instead of
operator&.
* include/debug/formatter.h (_Error_formatter::_Parameter::_Parameter):
Likewise.
* include/debug/functions.h (__check_singular): Likewise.
* include/debug/list (list::splice, list::merge): Likewise.
* testsuite/23_containers/list/modifiers/addressof.cc: New.
From-SVN: r224539
2015-06-16 22:04:53 +01:00
Jonathan Wakely
0dc3cba1bd
re PR libstdc++/65393 (std::thread shared_ptr inefficiency)
...
PR libstdc++/65393
* src/c++11/thread.cc (thread::_M_make_thread): Replace shared_ptr
copies with moves.
From-SVN: r224530
2015-06-16 18:53:52 +01:00
Jonathan Wakely
7388ee9e9b
* include/precompiled/stdc++.h: Include <codecvt> and <shared_mutex>.
...
From-SVN: r224425
2015-06-12 13:27:06 +01:00
Jonathan Wakely
f0b587aa84
Fix whitespace in changelog.
...
From-SVN: r224416
2015-06-12 11:26:10 +01:00
Jonathan Wakely
6a3d0bb327
re PR libstdc++/66464 (codecvt_utf16 max_length returning incorrect value)
...
PR libstdc++/66464
* src/c++11/codecvt.cc (codecvt_utf16_base<char32_t>::do_max_length):
Return 4 not 3.
From-SVN: r224415
2015-06-12 11:26:05 +01:00
Ramana Radhakrishnan
1c6682fa9f
Use atomics in guard.cc / remove special casing in targets.
...
The PowerPC, AIX, Alpha, IA64 implementations of atomic_word.h are in no
way different from what can be achieved with the generic rewrite in
Patch 1 of this series - delete these.
2015-06-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/cpu/alpha/atomic_word.h: Remove.
* config/cpu/ia64/atomic_word.h: Remove.
* config/cpu/powerpc/atomic_word.h: Remove.
* config/os/aix/atomic_word.h: Remove.
* configure.host (atomic_word_dir) [ia64, aix*, powerpc, alpha]:
Use generic definition.
From-SVN: r224413
2015-06-12 09:55:38 +00:00
Ramana Radhakrishnan
dd38693ee5
Use atomics in guard.cc / remove special casing in targets.
...
The PowerPC, AIX, Alpha, IA64 implementations of atomic_word.h are in no
way different from what can be achieved with the generic rewrite in
Patch 1 of this series - delete these.
2015-06-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/cpu/alpha/atomic_word.h: Remove.
* config/cpu/ia64/atomic_word.h: Remove.
* config/cpu/powerpc/atomic_word.h: Remove.
* config/os/aix/atomic_word.h: Remove.
* configure.host (atomic_word_dir) [ia64, aix*, powerpc, alpha]:
Use generic definition.
From-SVN: r224412
2015-06-12 09:53:24 +00:00
Ramana Radhakrishnan
57e6d9be77
Use atomics in guard.cc.
...
This provides proper definitions for _GLIBCXX_READ_MEM_BARRIER and
_GLIBCXX_WRITE_MEM_BARRIER, rewrites the guards in terms of proper
atomic extensions and removes internal uses of
_GLIBCXX_READ_MEM_BARRIER and _GLIBCXX_WRITE_MEM_BARRIER and replaces
them with equivalent atomics.
2015-06-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/66200
PR c++/66192
* * config/cpu/generic/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER): Define
(_GLIBCXX_WRITE_MEM_BARRIER): Likewise
* include/bits/shared_ptr_base.h: Use ACQ_REL barrier.
* include/ext/atomicity.h: Likewise.
* include/tr1/shared_ptr.h: Likewise.
* libsupc++/guard.cc (__test_and_acquire): Rewrite with atomics.
Update comment.
(__set_and_release): Likewise.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc (test01): Adjust for
line numbers.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
Likewise.
From-SVN: r224411
2015-06-12 09:49:41 +00:00
Jonathan Wakely
7672ab25db
tuple (__is_tuple_like_impl): Disambiguate array in debug and profile modes.
...
* include/std/tuple (__is_tuple_like_impl): Disambiguate array in
debug and profile modes.
* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust tests
for swap in C++11 and later.
From-SVN: r224397
2015-06-12 00:22:19 +01:00
Jonathan Wakely
8602ca0a2d
re PR libstdc++/66030 ([5.1.0] std::codecvt_byname missing from libstdc++ DLL)
...
PR libstdc++/66030
* config/abi/pre/gnu.ver: Export codecvt_byname and codecvt symbols
for mingw32.
From-SVN: r224273
2015-06-09 09:50:00 +01:00
Jonathan Wakely
c00f4f5fb3
re PR libstdc++/66441 (wstring_convert not working correctly)
...
PR libstdc++/66441
* testsuite/22_locale/conversions/string/66441.cc: New.
* include/bits/locale_conv.h (__do_str_codecvt): Reserve enough space
in the output string for BOM and complete result.
From-SVN: r224222
2015-06-08 14:03:45 +01:00
Jonathan Wakely
aa4e0c43bc
re PR libstdc++/66417 (std::codecvt_utf16<char32_t, 0x10FFFF, std::codecvt_mode::generate_header> generates incorrect output)
...
PR libstdc++/66417
* src/c++11/codecvt.cc (write_utf16_code_point): Use adjust_byte_order
for single UTF-16 units.
* testsuite/22_locale/codecvt/codecvt_utf16/66417.cc: New.
From-SVN: r224217
2015-06-08 12:09:17 +01:00
François Dumont
d7b35f22be
stl_tree.h (_Rb_tree<>::__is_transparent<>): Move to outer scope and rename to ...
...
2015-06-07 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_tree.h (_Rb_tree<>::__is_transparent<>): Move to
outer scope and rename to ...
(std::__hash_is_transparent<>): ... this.
* include/debug/stl_map.h (map::find<>,
map::lower_bound<>, map::upper_bound<>, map::equal_range<>): New
member function templates to perform heterogeneous lookup.
* include/debug/stl_multimap.h (multimap::find<>,
multimap::lower_bound<>, multimap::upper_bound<>,
multimap::equal_range<>): Likewise.
* include/debug/stl_multiset.h (multiset::find<>,
multiset::lower_bound<>, multiset::upper_bound<>,
multiset::equal_range<>): Likewise.
* include/debug/stl_set.h (set::find<>,
set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
* include/profile/stl_map.h (map::find<>, map::count<>,
map::lower_bound<>, map::upper_bound<>, map::equal_range<>): Likewise.
* include/profile/stl_multimap.h (multimap::find<>, multimap::count<>,
multimap::lower_bound<>, multimap::upper_bound<>,
multimap::equal_range<>): Likewise.
* include/profile/stl_multiset.h (multiset::find<>, multiset::count<>,
multiset::lower_bound<>, multiset::upper_bound<>,
multiset::equal_range<>): Likewise.
* include/profile/stl_set.h (set::find<>, set::count<>,
set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
* testsuite/23_containers/map/operations/1.cc: Check const variants.
* testsuite/23_containers/multimap/operations/1.cc: Likewise.
* testsuite/23_containers/multiset/operations/1.cc: Likewise.
* testsuite/23_containers/set/operations/1.cc: Likewise.
From-SVN: r224200
2015-06-07 20:45:57 +00:00
Jonathan Wakely
46ba128114
status_cxx2017.xml: Update status tables.
...
* doc/xml/manual/status_cxx2017.xml: Update status tables.
* doc/html/manual/*: Regenerate.
* include/std/type_traits (bool_constant): Define.
* testsuite/20_util/bool_constant/requirements.cc: New.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Likewise.
From-SVN: r224160
2015-06-05 18:17:53 +01:00
Jonathan Wakely
712266515f
shared_mutex (__shared_mutex_pthread, [...]): New helper types implementing the shared mutex requirements.
...
* include/std/shared_mutex (__shared_mutex_pthread,
__shared_mutex_cv): New helper types implementing the shared mutex
requirements.
(shared_mutex): New type for C++17.
(shared_timed_mutex): Derive from one of the new helper types.
* testsuite/30_threads/shared_mutex/cons/1.cc: New.
* testsuite/30_threads/shared_mutex/cons/assign_neg.cc: New.
* testsuite/30_threads/shared_mutex/cons/copy_neg.cc: New.
* testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
New.
* testsuite/30_threads/shared_mutex/try_lock/1.cc: New.
* testsuite/30_threads/shared_mutex/try_lock/2.cc: New.
From-SVN: r224158
2015-06-05 17:31:05 +01:00
Jonathan Wakely
9bbcf8b85b
Fix date of ChangeLog entry.
...
From-SVN: r224155
2015-06-05 17:00:04 +01:00
Ville Voutilainen
ddb63209a8
Add __is_nothrow_swappable and take it into use.
...
2015-06-04 Ville Voutilainen <ville.voutilainen@gmail.com>
Add __is_nothrow_swappable and take it into use.
* include/bits/algorithmfwd.h (swap): Only declare for C++98 mode.
* include/bits/move.h (swap): Add constraints in C++11 and later.
* include/bits/stl_pair.h (swap): Use __is_nothrow_swappable
for the free swap function for pair.
* include/bits/stl_queue.h (swap): Use __is_nothrow_swappable
for the free swap functions for queue and priority_queue.
* include/bits/stl_stack.h (swap): Use __is_nothrow_swappable
for the free swap function for stack.
* include/debug/array (swap): Use __is_nothrow_swappable
for the free swap function for array.
* include/profile/array (swap): Likewise.
* include/std/array (swap): Likewise.
* include/std/tuple (_Tuple_impl::_M_swap): Use __is_nothrow_swappable.
* include/std/type_traits (__is_swappable_impl::__is_swappable,
__is_nothrow_swappable_impl, __is_nothrow_swappable): New.
* testsuite/20_util/is_nothrow_swappable/requirements/
explicit_instantiation.cc: New.
* testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
New.
* testsuite/20_util/is_nothrow_swappable/value.cc: New.
From-SVN: r224153
2015-06-05 15:44:26 +01:00
François Dumont
82b544ad25
2015-06-03 François Dumont fdumont@gcc.gnu.org>
...
* testsuite/23_containers/list/61347.cc: Add dg-require-normal-mode.
From-SVN: r224100
2015-06-03 20:15:35 +00:00
Jonathan Wakely
5211a52d57
abi.xml: Document versioning for 5.1.0 release.
...
* doc/xml/manual/abi.xml: Document versioning for 5.1.0 release.
* doc/html/manual/*: Regenerate.
From-SVN: r224025
2015-06-02 12:17:43 +01:00
Jonathan Wakely
5d65efd4df
lwg-active.html: Update to R93.
...
* doc/html/ext/lwg-active.html: Update to R93.
* doc/html/ext/lwg-closed.html: Likewise.
* doc/html/ext/lwg-defects.html: Likewise.
* doc/html/manual/*: Regenerate.
* doc/xml/manual/intro.xml: Document status of several DRs.
From-SVN: r224023
2015-06-02 12:07:30 +01:00
Renlin Li
fc7e20fd7a
[libstdc++-v3]Add _GLIBCXX_HAVE_LIMIT_FSIZE to guard 27_io/fpos/14775.cc.
...
libstdc++-v3/
2015-06-02 Renlin Li <renlin.li@arm.com>
* testsuite/27_io/fpos/14775.cc: Add _GLIBCXX_HAVE_LIMIT_FSIZE check.
From-SVN: r224015
2015-06-02 08:54:25 +00:00
Jonathan Wakely
77d0ed47e8
libstdc++.exp (libstdc++_init): Unset LANGUAGE environment variable.
...
* testsuite/lib/libstdc++.exp (libstdc++_init): Unset LANGUAGE
environment variable.
From-SVN: r223937
2015-06-01 12:57:33 +01:00
Jonathan Wakely
5d946f4228
re PR libstdc++/66354 ([UBSAN] stl_algobase.h:708:7: runtime error: null pointer passed as argument)
...
PR libstdc++/66354
* include/bits/stl_algobase.h (__fill_a): Check length before calling
memset.
From-SVN: r223906
2015-05-31 23:42:17 +01:00
Jonathan Wakely
12fc64ac3a
stl_algobase.h (__equal<true>::equal): Check length instead of checking for null pointers.
...
* include/bits/stl_algobase.h (__equal<true>::equal): Check length
instead of checking for null pointers.
(__lexicographical_compare<true>::__lc): Only check shorter length.
From-SVN: r223886
2015-05-30 12:44:02 +01:00
François Dumont
adad2a7d90
2015-05-29 François Dumont fdumont@gcc.gnu.org>
...
* include/debug/debug.h (_GLIBCXX_DEBUG_ASSERT,
_GLIBCXX_DEBUG_PEDASSERT, _GLIBCXX_DEBUG_ONLY): Move definition...
* include/debug/assertions.h: ...here, new.
* include/debug/formatter.h
(_Error_formatter::_Is_iterator_value_type): New.
(_Error_formatter::_Is_instance): New.
(_Error_formatter::_Parameter): Make public and not friend anymore.
(_Error_formatter::_Parameter::__instance): New _M_kind enum entry.
(_Error_formatter::_Parameter::__iterator_value_type): New _M_kind enum
entry.
(_Error_formatter::_Parameter::_Type): New.
(_Error_formatter::_Parameter::_Instance): New, inherit from
latter.
(union _Error_formatter::_Parameter::_M_variant): Reorganize.
(_Parameter(_Iterator const&, const char*, _Is_iterator)): Make all
overloads take iterator through a const reference.
(_Parameter(const _Iterator&, const char*, _Is_iterator_value_type)):
New.
(_Parameter(const _Type&, const char*, _Is_instance)): New.
(_Error_formatter::_M_print_type): Delete.
(_Error_formatter::_M_iterator_value_type): New.
(_Error_formatter::_M_instance): New.
* include/Makefile.am: Add new above debug file.
* include/Makefile.in: Regenerate.
* include/debug/functions.h
(__check_dereferenceable(const _Safe_iterator<>&),
__valid_range(const _Safe_iterator<>&),
__is_safe_random_iterator<_Safe_iterator<>>): Move...
* include/debug/safe_iterator.h: ... here.
Replace debug.h include with assertions.h.
(__check_singular_aux): Move...
* include/debug/safe_base.h: ... here.
* include/debug/functions.h
(__check_dereferenceable(const _Safe_local_iterator<>&),
__valid_range(const _Safe_local_iterator<>&): Move...
* include/debug/safe_local_iterator.h: ...here.
* include/debug/safe_sequence.h: Replace debug.h with assertions.h.
Remove _Safe_iterator declaration.
* include/debug/safe_unordered_container.h: Replace debug.h with
assertions.h.
* include/debug/array: Replace safe_sequence.h include with
formatter.h and macros.h.
* include/debug/deque: Include functions.tcc.
* include/debug/forward_list: Likewise.
* include/debug/list: Likewise.
* include/debug/string: Likewise.
* include/debug/vector: Likewise.
* include/bits/unique_ptr.h: Replace debug.h include with new
assertions.h.
* include/bits/stl_iterator_base_funcs.h: Likewise.
* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/array/tuple_interface/
tuple_element_debug_neg.cc: Likewise.
* src/c++11/debug.cc: Adapt.
From-SVN: r223877
2015-05-29 21:29:07 +00:00
Jonathan Wakely
cfba236af0
status_cxx2017.xml: Fix duplicate ID attribute.
...
* doc/xml/manual/status_cxx2017.xml: Fix duplicate ID attribute.
* doc/html/manual/*: Regenerate.
From-SVN: r223868
2015-05-29 16:18:05 +01:00
Jonathan Wakely
75eb64433e
future (__async_result_of): New alias template.
...
* include/std/future (__async_result_of): New alias template.
(async): Use __async_result_of to pass decayed types to result_of.
* testsuite/30_threads/async/lwg2021.cc: New.
* doc/xml/manual/intro.xml: Document LWG 2021 status.
From-SVN: r223866
2015-05-29 14:44:52 +01:00
Jonathan Wakely
6759eddee4
re PR libstdc++/66327 (-fsanitize=nonnull-attribute errors in stl_algobase.h)
...
PR libstdc++/66327
* include/bits/stl_algobase.h (__equal<true>::equal): Do not call
memcmp with null pointers.
(__lexicographical_compare<true>::__lc): Do not call memcmp for empty
ranges.
From-SVN: r223865
2015-05-29 14:28:54 +01:00
Jonathan Wakely
ac3efa775f
re PR libstdc++/65352 (array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan)
...
PR libstdc++/65352
* include/profile/array (array::data): Use _S_ptr.
* include/debug/array (array::data): Likewise.
From-SVN: r223838
2015-05-28 17:00:09 +01:00
Jonathan Wakely
6a344b953a
re PR libstdc++/65352 (array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan)
...
PR libstdc++/65352
* include/std/array (__array_traits::_S_ptr): New function.
(array::data): Use _S_ptr to avoid creating invalid reference.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
dg-error line numbers.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
likewise.
From-SVN: r223806
2015-05-28 12:53:35 +01:00
Jonathan Wakely
151fbaac5c
stl_tree.h (_Rb_tree::_M_end()): Return _Base_ptr instead of downcasting.
...
* include/bits/stl_tree.h (_Rb_tree::_M_end()): Return _Base_ptr
instead of downcasting.
(_Rb_tree::_M_copy): Change second parameter to _Base_ptr.
(_Rb_tree::_M_lower_bound, _Rb_tree:_M_upper_bound): Likewise.
(_Rb_tree::_S_iter): Remove.
(_Rb_tree::_S_lower_bound_tr, _Rb_tree::_S_upper_bound_tr): Remove.
(_Rb_tree::_M_find_tr(const _Kt&) const): Call _M_lower_bound_tr
instead of _S_lower_bound_tr
(_Rb_tree::_M_find_tr(const _Kt&)): Call const overload.
(_Rb_tree::_M_lower_bound_tr(const _Kt&) const): Do the search here
instead of calling _S_lower_bound_tr.
(_Rb_tree::_M_lower_bound_tr(const _Kt&)): Call const overload.
(_Rb_tree::_M_upper_bound_tr(const _Kt&) const): Do the search here
instead of calling _S_upper_bound_tr.
(_Rb_tree::_M_upper_bound_tr(const _Kt&)): Call const overload.
(_Rb_tree::_M_equal_range_tr(const _Kt&)): Likewise.
(_Rb_tree::equal_range): Use _Base_ptr for end pointer.
(_Rb_tree::_M_get_insert_unique_pos): Likewise.
(_Rb_tree::_M_get_insert_equal_pos): Likewise.
(_Rb_tree::_M_insert_equal_lower_node): Likewise.
(_Rb_tree::_M_insert_unique, _Rb_tree::_M_emplace_unique,
_Rb_tree::_M_emplace_hint_unique): Remove static_cast.
From-SVN: r223746
2015-05-27 12:18:44 +01:00
Jonathan Wakely
2097b5b029
re PR libstdc++/66017 (Undefined behaviour in std::set<long long>)
...
PR libstdc++/66017
* include/bits/stl_tree.h (_Rb_tree_node): Use __aligned_membuf.
(_Rb_tree_iterator, _Rb_tree_const_iterator): Support construction
from _Base_ptr.
(_Rb_tree_const_iterator::_M_const_cast): Remove static_cast.
(_Rb_tree::begin, _Rb_tree::end): Remove static_cast.
* include/ext/aligned_buffer.h (__aligned_membuf): New type using
alignment of _Tp as a member subobject, not as a complete object.
* python/libstdcxx/v6/printers.py (StdRbtreeIteratorPrinter): Lookup
_Link_type manually as it might not be in the debug info.
From-SVN: r223745
2015-05-27 12:18:37 +01:00
Doug Evans
419587a0bb
xmethods.py (UniquePtrMethodsMatcher): Add operator-> support.
...
* python/libstdcxx/v6/xmethods.py (UniquePtrMethodsMatcher): Add
operator-> support.
* testsuite/libstdc++-xmethods/unique_ptr.cc: Add tests for
operator->.
From-SVN: r223723
2015-05-26 23:06:55 +00:00
Jonathan Wakely
4a72a6ddd2
locale_conv.h: Fix copyright years.
...
* include/bits/locale_conv.h: Fix copyright years.
* include/bits/quoted_string.h: Likewise.
* src/filesystem/Makefile.am: Likewise.
* testsuite/22_locale/conversions/buffer/1.cc: Likewise.
* testsuite/22_locale/conversions/buffer/requirements/typedefs.cc:
Likewise.
* testsuite/22_locale/conversions/string/1.cc: Likewise.
* testsuite/22_locale/conversions/string/2.cc: Likewise.
* testsuite/22_locale/conversions/string/3.cc: Likewise.
* testsuite/22_locale/conversions/string/requirements/typedefs-2.cc:
Likewise.
* testsuite/22_locale/conversions/string/requirements/typedefs.cc:
Likewise.
* testsuite/util/testsuite_fs.h: Likewise.
From-SVN: r223676
2015-05-26 10:52:25 +01:00
François Dumont
e2897e23a7
2015-05-23 François Dumont fdumont@gcc.gnu.org>
...
PR libstdc++/64657
* include/debug/functions.h (__check_sorted_aux): Cast expression to
void.
From-SVN: r223605
2015-05-23 11:17:38 +00:00
David Edelsohn
e3592e196a
re PR target/66224 (PowerPC _GLIBCXX_READ_MEM_BARRIER too weak)
...
PR target/66224
* config/cpu/powerpc/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER):
Don't use isync. Use lwsync if available.
* configure.host (atomic_word_dir) [aix[56789]*]: Delete to use
powerpc cpu definition.
From-SVN: r223496
2015-05-21 13:18:25 -04:00
Jason Merrill
4177264e09
del_opv.cc: Suppress -Wsized-deallocation.
...
* libsupc++/del_opv.cc: Suppress -Wsized-deallocation.
* libsupc++/del_op.cc: Likewise.
From-SVN: r223488
2015-05-21 11:12:40 -04:00
François Dumont
fa5cc2db54
formatter.h (_GLIBCXX_TYPEID): New macro to simplify usage of typeid.
...
2015-05-20 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h (_GLIBCXX_TYPEID): New macro to simplify
usage of typeid.
(_Error_formatter::_M_print_type): New.
* src/c++11/debug.cc
(_Error_formatter::_Parameter::_M_print_field): Use latter.
(_Error_formatter::_M_print_type): Implement latter using
__cxaabiv1::__cxa_demangle to print demangled type name.
From-SVN: r223455
2015-05-20 19:44:25 +00:00
François Dumont
fd2ef11714
2015-05-20 François Dumont <fdumont@gcc.gnu.org>
...
* include/bits/cpp_type_traits.h
(std::move_iterator): Delete declaration.
(std::__is_move_iterator<move_iterator>): Move partial specialization...
* include/bits/stl_iterator.h: ... here.
(std::__miter_base): Overloads for std::reverse_iterator and
std::move_iterator.
* include/bits/stl_algobase.h (std::__miter_base): Provide default
implementation.
From-SVN: r223453
2015-05-20 19:02:22 +00:00
Jonathan Wakely
7769c9deff
* testsuite/util/testsuite_fs.h (nonexistent_path): Don't use tempnam.
...
From-SVN: r223450
2015-05-20 18:28:04 +01:00
Jonathan Wakely
793cac74e9
re PR libstdc++/66078 (20_util/specialized_algorithms/uninitialized_copy/808590.cc fails with -std=c++11)
...
PR libstdc++/66078
* include/bits/stl_iterator.h (__make_move_if_noexcept_iterator): Add
overload for pointers.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/
808590.cc: Add -std=gnu++03 switch.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/
808590-cxx11.cc: Copy of 808590.cc to test with -std=gnu++11.
* testsuite/23_containers/vector/modifiers/push_back/
strong_guarantee.cc: New.
From-SVN: r223449
2015-05-20 18:11:03 +01:00
Jonathan Wakely
8e72571637
stl_list.h (_M_resize_pos(size_type&)): Declare.
...
* include/bits/stl_list.h (_M_resize_pos(size_type&)): Declare.
(operator==(const list&, const list&)): If size() is O(1) compare
sizes before comparing each element.
* include/bits/list.tcc (list::_M_resize_pos(size_type&)): Define.
(list::resize): Use _M_resize_pos.
From-SVN: r223416
2015-05-19 23:24:50 +01:00
François Dumont
90f0d17641
66055.cc: Add constructor invocations.
...
2015-05-19 François Dumont <fdumont@gcc.gnu.org>
* testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor
invocations.
* testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise.
* testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise.
* testsuite/23_containers/unordered_set/cons/66055.cc: Likewise.
From-SVN: r223413
2015-05-19 19:57:09 +00:00
Ramana Radhakrishnan
49c6543450
Add cpu_defines.h for ARM.
...
2015-05-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* configure.host: Define cpu_defines_dir for ARM.
* config/cpu/arm/cpu_defines.h: New file.
From-SVN: r223361
2015-05-19 12:47:50 +00:00
François Dumont
e55b80f5f4
unordered_map.h (unordered_map, [...]): Add missing constructors.
...
2015-05-17 François Dumont <fdumont@gcc.gnu.org>
* include/bits/unordered_map.h (unordered_map, unordered_multimap): Add
missing constructors.
* include/bits/unordered_set.h (unordered_set, unordered_multiset):
Likewise.
* include/debug/unordered_map (unordered_map, unordered_multimap): Add
missing constructors.
* include/debug/unordered_set (unordered_set, unordered_multiset):
Likewise.
* include/profile/unordered_map (unordered_map, unordered_multimap): Add
missing constructors.
* include/profile/unordered_set (unordered_set, unordered_multiset):
Likewise.
* testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor
invocations.
* testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise.
* testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise.
* testsuite/23_containers/unordered_set/cons/66055.cc: Likewise.
From-SVN: r223273
2015-05-17 20:14:53 +00:00