1 2019-10-29 Jonathan Wakely <jwakely@redhat.com>
4 * include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
5 Do not define as defaulted.
6 * testsuite/23_containers/deque/types/92267.cc: New test.
8 2019-10-26 Gerald Pfeifer <gerald@pfeifer.com>
10 * doc/xml/manual/codecvt.xml: Switch pubs.opengroup.org to https.
11 * doc/xml/manual/locale.xml (LC_ALL): Ditto.
12 * doc/xml/manual/messages.xml: Ditto.
14 2019-10-26 John David Anglin <danglin@gcc.gnu.org>
16 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
18 2019-10-25 Jonathan Wakely <jwakely@redhat.com>
20 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper)
21 (input_iterator_wrapper, forward_iterator_wrapper)
22 bidirectional_iterator_wrapper, random_access_iterator_wrapper): Remove
23 user-provided copy constructors and copy assignment operators so they
24 are defined implicitly.
25 (input_iterator_wrapper): Initialize members in default constructor.
26 (forward_iterator_wrapper): Remove assignments to members of base.
28 * include/bits/allocator.h: Check __cpp_constexpr_dynamic_alloc
29 before making the std::allocator destructor constexpr.
30 * testsuite/20_util/allocator/requirements/constexpr.cc: New test.
32 * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining
33 concepts. Fix comment.
34 * include/bits/allocator.h
36 2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
38 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
39 pubs.opengroup.org to https.
41 2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
43 * doc/xml/gnu/gpl-3.0.xml: Switch www.gnu.org to https.
45 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
47 * doc/xml/manual/status_cxx2020.xml: Add rows and update status.
49 2019-10-24 Jonathan Wakely <jwakely@redhat.com>
51 * include/bits/allocator.h (allocator<void>): Restore the explicit
52 specialization for C++20, but make its API consistent with the primary
54 (allocator::~allocator()): Restore the destructor for C++20, but make
56 * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
57 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
58 * testsuite/20_util/allocator/void.cc: Check that constructors and
59 destructors are trivial. Check for converting constructor in C++20.
60 * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
61 dejagnu target selector.
62 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
64 * include/experimental/executor (__use_future_ct, use_future_t):
65 Define partial specializations for std::allocator.
66 (__use_future_ch): Overload constructor for completion tokens using
69 PR libstdc++/88338 Implement P0898R3, C++20 concepts library
70 * doc/xml/manual/status_cxx2020.xml: Update status.
71 * doc/html/*: Regenerate.
72 * testsuite/std/concepts/1.cc: New test.
73 * testsuite/std/concepts/2.cc: New test.
75 * include/bits/random.h (uniform_random_bit_generator): Define for
77 * testsuite/26_numerics/random/concept.cc: New test.
78 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
80 2019-10-23 Jonathan Wakely <jwakely@redhat.com>
82 * include/std/functional (invoke): Add constexpr for C++20.
83 * include/std/version (__cpp_lib_constexpr_invoke): Define.
84 * testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
86 PR c++/91369 Implement P0784R7 changes to allocation and construction
87 * include/bits/alloc_traits.h: Include <bits/stl_construct.h>.
88 (allocator_traits::_S_allocate, allocator_traits::_S_construct)
89 (allocator_traits::_S_destroy, allocator_traits::_S_max_size)
90 (allocator_traits::_S_select, allocator_traits::allocate)
91 (allocator_traits::deallocate, allocator_traits::construct)
92 (allocator_traits::destroy, allocator_traits::max_size)
93 (allocator_traits::select_on_container_copy_construction)
94 (allocator_traits<allocator<T>>): Add constexpr specifier for C++20.
95 (allocator_traits<allocator<T>>::construct): Use construct_at.
96 (allocator_traits<allocator<T>>::destroy): Use destroy_at.
97 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr
99 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
100 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here
101 from <bits/stl_construct.h>.
102 * include/bits/allocator.h (allocator::~allocator): Remove for C++20.
103 (allocator::allocate, allocate::deallocate): Define for C++20 and up.
104 (operator==, operator!=): Add constexpr specifier for C++20.
105 * include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>.
106 (destroy_at): For C++20 add constexpr specifier and support for
108 (construct_at): Define new function for C++20.
109 (_Construct): Return result of placement new-expression. For C++11 and
110 up add constexpr. For C++20 dispatch to std::construct_at during
112 (_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to
113 std::destroy_at during constant evaluation.
114 (_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr
116 (_Destroy(ForwardIterator, ForwardIterator))
117 (_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial
118 destructors during constant evaluation.
119 (destroy, destroy_n): Add constexpr specifier for C++20.
120 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
121 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to
122 <bits/alloc_traits.h>, to remove dependency on allocators.
123 * include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>.
124 Include <bits/stl_pair.h> instead of <utility>.
125 * include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>.
126 (__alloc_traits::construct, __alloc_traits::destroy)
127 (__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add
129 * include/ext/malloc_allocator.h (operator==, operator!=): Add
130 constexpr specifier for C++20.
131 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
132 * testsuite/20_util/headers/memory/synopsis.cc: Add constexpr.
133 * testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional
134 errors due to constexpr function called after failed static_assert.
135 * testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test.
136 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
137 Ignore additional errors due to constexpr function called after failed
139 * testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise.
141 * testsuite/20_util/bind/91371.cc: Fix test to compile as C++11.
143 * include/debug/helper_functions.h (__valid_range): Change
144 _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR.
146 * include/ext/throw_allocator.h (throw_allocator_base): Qualify
147 size_t and ptrdiff_t.
149 * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:
150 Use detail::rebind_traits.
151 * include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp:
153 * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise.
154 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
155 * include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise.
156 * include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise.
157 * include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp:
159 * include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp:
161 * include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise.
162 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise.
163 * include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise.
164 * include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise.
165 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise.
166 * include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise.
167 * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise.
168 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
169 left_child_next_sibling_heap_.hpp: Likewise.
170 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp:
172 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
173 point_const_iterator.hpp: Likewise.
174 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise.
175 * include/ext/pb_ds/detail/ov_tree_map_/
176 constructors_destructor_fn_imps.hpp: Likewise.
177 * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise.
178 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise.
179 * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise.
180 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise.
181 * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise.
182 * include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise.
183 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise.
184 * include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise.
185 * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise.
186 * include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp:
188 * include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment.
189 * include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add
190 bool parameter to control whether the hash value is stored.
191 (select_base_type): New class template and partial specialization.
192 (maybe_null_type): Likewise.
193 (rebind_traits): New class template.
194 (type_base): Remove four nearly identical specializations.
195 (type_dispatch): Remove.
196 (type_traits): Use select_base_type and maybe_null_type instead of
197 type_base to control differences between specializations.
198 * include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits.
199 * include/ext/pb_ds/priority_queue.hpp: Likewise.
200 * include/ext/pb_ds/tree_policy.hpp: Likewise.
201 * include/ext/pb_ds/trie_policy.hpp: Likewise.
203 * include/backward/hash_set (hash_set): Use __alloc_traits.
204 * include/backward/hashtable.h (_Hashtable): Likewise.
205 * include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
207 * include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
209 * include/ext/slist (_Slist_base): Use __alloc_traits.
210 * include/tr1/hashtable.h (_Hashtable): Likewise.
211 * include/tr1/regex (match_results): Use vector::const_reference
212 instead of assuming the allocator defines it.
213 * testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
214 * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
215 __gnu_test::max_size.
216 * testsuite/tr1/6_containers/unordered_multimap/capacity/
217 29134-multimap.cc: Likewise.
218 * testsuite/tr1/6_containers/unordered_multiset/capacity/
219 29134-multiset.cc: Likewise.
220 * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
223 2019-10-22 Jonathan Wakely <jwakely@redhat.com>
225 * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
226 when compiled as C++98.
228 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
229 * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
231 * include/bits/alloc_traits.h
232 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
233 (allocator_traits<allocator<T>>::construct): Perform placement new
234 directly for C++20, instead of calling allocator<T>::construct.
235 (allocator_traits<allocator<T>>::destroy): Call destructor directly
236 for C++20, instead of calling allocator<T>::destroy.
237 (allocator_traits<allocator<T>>::max_size): Return value directly
238 for C++20, instead of calling std::allocator<T>::max_size().
239 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
240 define for C++17 and up.
241 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
242 for C++17 and up, instead of tag dispatching.
243 * include/bits/allocator.h (allocator<void>): Remove for C++20.
244 (allocator::pointer, allocator::const_pointer, allocator::reference)
245 (allocator::const_reference, allocator::rebind): Remove for C++20.
246 * include/bits/basic_string.h (basic_string): Use __alloc_traits to
248 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
249 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
250 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
251 (malloc_allocator::pointer, malloc_allocator::const_pointer)
252 (malloc_allocator::reference, malloc_allocator::const_reference)
253 (malloc_allocator::rebind, malloc_allocator::max_size)
254 (malloc_allocator::construct, malloc_allocator::destroy): Do not
256 (malloc_allocator::_M_max_size): Define new function.
257 * include/ext/new_allocator.h (new_allocator::~new_allocator)
258 (new_allocator::pointer, new_allocator::const_pointer)
259 (new_allocator::reference, new_allocator::const_reference)
260 (new_allocator::rebind, new_allocator::max_size)
261 (new_allocator::construct, new_allocator::destroy): Do not
263 (new_allocator::_M_max_size): Define new function.
264 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
265 __alloc_traits to rebind allocator.
266 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
267 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits
268 to construct character.
269 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind
271 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
273 * include/ext/throw_allocator.h (throw_allocator): Do not use optional
274 members of std::allocator, use __alloc_traits members instead.
275 * include/ext/vstring.h (__versa_string): Use __alloc_traits.
276 * include/ext/vstring_util.h (__vstring_utility): Likewise.
277 * include/std/memory: Include <bits/alloc_traits.h>.
278 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
279 * testsuite/20_util/allocator/rebind_c++20.cc: New test.
280 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
281 for pointer, const_pointer, reference, const_reference or rebind in
283 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
284 * testsuite/23_containers/deque/capacity/29134.cc: Use
285 __gnu_test::max_size.
286 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
287 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
288 * testsuite/23_containers/map/capacity/29134.cc: Likewise.
289 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
290 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
291 * testsuite/23_containers/set/capacity/29134.cc: Likewise.
292 * testsuite/23_containers/vector/capacity/29134.cc: Likewise.
293 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
295 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
296 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
297 * testsuite/util/replacement_memory_operators.h: Do not assume
298 Alloc::pointer exists.
299 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
300 helper to call max_size for any allocator.
302 2019-10-22 Andreas Schwab <schwab@suse.de>
304 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
306 2019-10-18 Jonathan Wakely <jwakely@redhat.com>
309 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
310 to at least sizeof(void*).
312 * include/bits/range_cmp.h (ranges::less::operator()): Inline the
313 logic from std::less::operator() to remove the dependency on it.
315 2019-10-17 Jonathan Wakely <jwakely@redhat.com>
317 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.
319 * include/Makefile.am: Add new header.
320 * include/Makefile.in: Regenerate.
321 * include/bits/range_cmp.h: New header for C++20 function objects.
322 * include/std/functional: Include new header.
323 * testsuite/20_util/function_objects/identity/1.cc: New test.
324 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
325 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
326 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
328 * testsuite/20_util/function_objects/range.cmp/less.cc: New test.
329 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
330 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
334 * include/bits/forward_list.h
335 (_M_move_assign(forward_list&&, false_type)): Do not use
336 __make_move_if_noexcept, instead move unconditionally.
337 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)):
339 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)):
341 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)):
343 * testsuite/23_containers/vector/92124.cc: New test.
345 2019-10-16 Jonathan Wakely <jwakely@redhat.com>
347 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
348 one of __is_same_as or __is_same when available.
349 * include/std/concepts (__detail::__same_as): Use std::is_same_v.
350 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
351 Use new macro instead of __is_same_as.
352 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
354 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
355 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.
357 2019-10-16 François Dumont <fdumont@gcc.gnu.org>
359 * src/c++11/debug.cc (print_field): Replace constness_names <unknown>
360 entry with <unknown constness>. Replace state_names <unknown> entry with
363 2019-10-11 Jonathan Wakely <jwakely@redhat.com>
365 * include/Makefile.am: Add new header.
366 * include/Makefile.in: Regenerate.
367 * include/precompiled/stdc++.h: Include <concepts>.
368 * include/std/concepts: New header for C++20.
369 * include/std/version (__cpp_lib_concepts): Define.
370 * scripts/create_testsuite_files: Look for test files in new std
372 * testsuite/libstdc++-dg/conformance.exp: Likewise.
373 * testsuite/std/concepts/concepts.callable/invocable.cc: New test.
374 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New
376 * testsuite/std/concepts/concepts.callable/relation.cc: New test.
377 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New
379 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
380 floating_point.cc: New test.
381 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
383 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
384 signed_integral.cc: New test.
385 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
386 unsigned_integral.cc: New test.
387 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New
389 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test.
390 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New
392 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc:
394 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
396 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc:
398 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
400 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
402 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
404 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc:
406 * testsuite/std/concepts/concepts.lang/concept.same/1.cc:
408 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
410 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
412 * testsuite/std/concepts/concepts.lang/concept.swappable/
413 swappable_with.cc: New test.
414 * testsuite/std/concepts/concepts.object/copyable.cc: New test.
415 * testsuite/std/concepts/concepts.object/movable.cc: New test.
416 * testsuite/std/concepts/concepts.object/regular.cc: New test.
417 * testsuite/std/concepts/concepts.object/semiregular.cc: New test.
419 * include/std/type_traits (is_same): Replace partial specialization
420 by using __is_same_as built-in in primary template.
421 (is_same_v): Use __is_same_as built-in instead of instantiating the
425 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
426 special member functions as defaulted. Add noexcept to most members.
427 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
428 Mask off unwanted bits in the __val parameter. Avoid undefined left
430 (__dynamic_bitset_base::_M_assign): Remove.
431 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
432 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
433 block_type has lower rank than int.
434 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
435 in return types and parameter types.
436 (dynamic_bitset::_M_Nb): Add default member initializer.
437 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
439 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
440 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
442 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
443 Define without using swap, to propagate allocator correctly.
444 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
445 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
446 casts to avoid unwanted integer promotions.
447 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
448 add default template arguments and default argument to simplify usage.
449 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
450 (operator==(const dynamic_bitset&, const dynamic_bitset&))
451 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
452 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
453 Adjust template parameters to match declaration.
454 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
455 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
456 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
457 * testsuite/tr2/dynamic_bitset/move.cc: New test.
458 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
460 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
463 2019-10-10 Jonathan Wakely <jwakely@redhat.com>
466 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
467 (find_ldbl_sync_facet): Fix parameter type and missing return.
469 2019-10-09 Marek Polacek <polacek@redhat.com>
471 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
472 PR c++/69531 - DR 1307: Differently bounded array parameters.
473 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
474 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
475 post-P0388R4 behavior.
477 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
480 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
481 compare-exchange or double-checked lock to ensure only one thread sets
482 the _M_index variable.
483 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
484 facets that share another facet's ID.
485 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
488 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
489 locale object for every call.
490 (locale::_S_initialize_once()): Construct C locale here.
492 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
494 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
495 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
496 * doc/Makefile.in: Regenerate.
497 * doc/xml/manual/documentation_hacking.xml: Document new target.
498 * doc/html/*: Regenerate.
500 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
501 * doc/html/*: Regenerate.
503 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
505 * include/bits/stl_algo.h
506 (__copy_n_a(_IIte, _Size, _OIte)): New.
507 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
508 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
510 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
511 std::__copy_n_a friend.
512 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
513 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
514 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
515 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
517 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
519 (_RequireInputIte): Likewise and use __enable_if_t.
520 * include/std/numeric
521 (__is_random_access_iter): Use __iterator_category_t.
523 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
525 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
526 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
528 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
530 * include/debug/forward_list
531 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
532 distance when not empty.
533 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
535 * include/debug/helper_functions.h (__dp_sign_max_size): New
536 _Distance_precision enum entry.
537 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
538 __false_type)): Adapt.
539 * include/debug/safe_iterator.tcc
540 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
541 distance computation.
543 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
547 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
548 * config.h.in: Regenerate:
549 * configure: Regenerate:
550 * include/Makefile.am (${host_builddir}/largefile-config.h): New
551 target to generate config header for filesystem library.
552 (${host_builddir}/c++config.h): Rename macros for large file support.
553 * include/Makefile.in: Regenerate.
554 * src/c++17/fs_dir.cc: Include new config header.
555 * src/c++17/fs_ops.cc: Likewise.
556 (filesystem::file_size): Use uintmax_t for size.
557 * src/filesystem/dir.cc: Include new config header.
558 * src/filesystem/ops.cc: Likewise.
559 (experimental::filesystem::file_size): Use uintmax_t for size.
561 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
562 std::tr1::unordered_map.
563 * testsuite/util/testsuite_allocator.h: Likewise.
565 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
567 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
568 __gnu_cxx::__alloc_traits for allocator construct function.
569 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
571 * include/precompiled/stdc++.h: Include <span> for C++20.
572 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
574 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
576 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
578 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
580 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
582 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
584 * doc/html/*: Regenerate.
586 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
588 * include/experimental/algorithm (experimental::sample): Qualify call
589 to __sample correctly.
590 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
591 for algorithms that don't have parallel implementations.
593 * include/parallel/algobase.h (equal, lexicographical_compare): Add
594 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
596 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
597 Add _GLIBCXX20_CONSTEXPR.
599 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
601 * testsuite/20_util/hash/84998.cc: Likewise.
602 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
603 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
604 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
605 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
606 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
607 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
608 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
609 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
611 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
613 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
615 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
617 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
619 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
620 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
621 * testsuite/25_algorithms/copy/86658.cc: Likewise.
622 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
623 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
624 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
625 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
627 * include/parallel/algo.h: Replace non-reserved names.
628 * include/parallel/multiway_merge.h: Likewise.
629 * include/parallel/multiway_mergesort.h: Likewise.
630 * include/parallel/numericfwd.h: Likewise.
631 * testsuite/17_intro/names.cc: Add RAI to test macros.
633 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
635 * include/debug/array: Add C++20 constexpr to comparison operators.
636 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
637 dg-error line numbers.
638 * testsuite/23_containers/array/tuple_interface/
639 tuple_element_debug_neg.cc: Likewise.
641 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
643 * include/experimental/internet: Include netinet/in.h if we have
644 _GLIBCXX_HAVE_NETINET_IN_H defined.
646 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
647 FreeBSD warning about lower advertised precision of tgammal.
648 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
649 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
650 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
651 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
652 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
653 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
654 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
655 * testsuite/tr1/5_numerical_facilities/special_functions/
656 08_cyl_bessel_i/check_nan.cc: Likewise.
657 * testsuite/tr1/5_numerical_facilities/special_functions/
658 09_cyl_bessel_j/check_nan.cc: Likewise.
659 * testuite/tr1/5_numerical_facilities/special_functions/
660 10_cyl_bessel_k/check_nan.cc: Likewise.
661 * testsuite/tr1/5_numerical_facilities/special_functions/
662 11_cyl_neumann/check_nan.cc: Likewise.
663 * testsuite/tr1/5_numerical_facilities/special_functions/
664 21_sph_bessel/check_nan.cc: Likewise.
665 * testsuite/tr1/5_numerical_facilities/special_functions/
666 23_sph_neumann/check_nan.cc: Likewise.
668 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
670 * include/std/span (span(element_type(&)[N]))
671 (span(array<value_type, N>&), span(const array<value_type, N>&)):
672 Deduce array element type to allow safe const conversions (LWG 3255).
673 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
674 remove_cv_t on arguments to __is_std_span and __is_std_array.
675 * testsuite/23_containers/span/lwg3255.cc: New test.
678 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
680 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
682 * include/bits/stl_algo.h (merge): Fix documentation.
683 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
684 (__check_sorted): Likewise and remove nested irreflexive check.
685 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
686 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
687 (_Irreflexive_checker::_S_is_valid): Likewise.
688 (__is_irreflexive, __is_irreflexive_pred): Likewise.
689 * include/debug/helper_functions.h (__get_distance): Add constexpr.
690 (__valid_range_aux): Add C++20 constexpr.
691 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
692 Likewise and add std::is_constant_evaluated check.
693 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
694 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
695 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
697 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
698 __builtin_is_contant_evaludated check..
699 (__can_advance, __base): Add constexpr.
700 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
701 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
702 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
703 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
704 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
706 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
707 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
708 lambda to be irreflexive.
710 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
712 * configure: Regenerate.
714 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
717 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
718 atomically and lock the mutex before accessing the sequence.
719 (_Safe_local_iterator_base::_M_detach()): Likewise.
720 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
722 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
724 * include/debug/array (to_array): Define for debug mode.
726 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
727 piecewise construction constructor, assignment operators, and swap.
728 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
729 Add _GLIBCXX20_CONSTEXPR.
730 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
731 * testsuite/20_util/pair/constexpr_assign.cc: New test.
732 * testsuite/20_util/pair/constexpr_swap.cc: New test.
734 * include/experimental/internet (operator==, operator<): Fix loop
735 condition to avoid reading past the end of the array.
737 * include/std/array: Remove references to profile mode.
738 * include/std/bitset: Likewise.
739 * include/std/deque: Likewise.
740 * include/std/forward_list: Likewise.
741 * include/std/list: Likewise.
742 * include/std/map: Likewise.
743 * include/std/set: Likewise.
744 * include/std/unordered_map: Likewise.
745 * include/std/unordered_set: Likewise.
746 * include/std/vector: Likewise.
747 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
748 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
750 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
752 * include/bits/regex.h
753 (basic_regex::assign(const C*, size_t, flag_type)): Add default
755 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
756 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
758 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
760 * include/std/variant (variant::index()): Remove impossible case.
763 * testsuite/util/testsuite_hooks.h
764 (conversion::iterator_to_const_iterator()): Do not return an invalid
765 iterator. Test direct-initialization and direct-list-initialization
766 as well as implicit conversion.
768 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
770 PR libstdc++/91788 (partial)
771 * include/std/variant (variant::index()): Improve codegen for cases
772 where conversion to size_t already works correctly.
774 2019-09-23 Andreas Schwab <schwab@suse.de>
776 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
778 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
781 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
783 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
786 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
788 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
791 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
792 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
793 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
796 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
798 * include/std/type_traits (__do_common_type_impl): Implement
799 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
800 (basic_common_reference, common_reference, common_reference_t): Define
802 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
804 * testsuite/20_util/common_reference/requirements/
805 explicit_instantiation.cc: New test.
806 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
809 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
810 non-template overloads for each signed and unsigned integer type and
811 char. Define deleted overload for bool (LWG 3266).
812 * testsuite/20_util/to_chars/1_neg.cc: Remove.
813 * testsuite/20_util/to_chars/3.cc: New test.
814 * testsuite/20_util/to_chars/lwg3266.cc: New test.
816 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
818 * acinclude.m4: Handle uclinux*.
819 * configure: Regenerate.
820 * configure.host: Handle uclinux*
822 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
823 Mickaël Guêné <mickael.guene@st.com>
825 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
828 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
831 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
832 0ul being a valid null pointer constant.
834 * include/std/type_traits (__remove_cv_t): New alias template.
835 (is_void, is_integral, is_floating_point, is_pointer)
836 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
837 (is_member_point), __is_signed_integer, __is_unsigned_integer)
838 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
839 (__decay_selector): Use __remove_cv_t.
840 (remove_cv): Add partial specializations for cv-qualified types.
841 (__decay_t): New alias template.
842 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
844 (__enable_if_t): Move earlier in the file.
845 (_Require): Use __enable_if_t.
846 (swap(T&, T&)): Use _Require.
847 (swap(T(&)[N])): Use __enable_if_t.
849 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
851 Implement C++20 p1424 - 'constexpr' feature macro concerns,
852 Issue 3256 - Feature testing macro for constexpr algorithms,
853 and Issue 3257 - Missing feature testing macro update from P0858.
854 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
855 * include/bits/algorithmfwd.h: Ditto.
856 * include/std/utility: Ditto.
857 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
858 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
859 __cpp_lib_constexpr macro in <algorith>.
860 * testsuite/20_util/exchange/constexpr.cc: Add check for
861 __cpp_lib_constexpr macro in <utility>.
862 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
863 __cpp_lib_constexpr_algorithms.
864 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
865 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
866 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
867 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
868 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
869 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
870 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
871 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
872 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
873 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
874 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
875 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
876 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
877 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
878 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
879 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
880 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
881 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
882 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
883 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
884 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
885 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
886 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
887 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
888 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
889 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
890 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
891 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
892 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
893 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
894 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
895 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
896 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
897 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
898 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
899 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
900 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
901 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
902 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
903 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
904 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
905 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
906 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
907 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
908 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
909 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
910 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
911 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
912 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
913 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
914 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
915 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
916 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
918 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
920 Update docs for recent <span> and constexpr lib changes.
921 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
922 p1023r0, p1085r2 status.
923 * doc/html/manual/status.html: Regenerate.
925 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
927 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
928 final offsets with constants.
930 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
932 * include/bits/range_access.h (__adl_to_address): Remove.
933 * include/std/span (__is_base_derived_safe_convertible_v): Replace
934 with span::__is_compatible.
935 (__is_std_array_v): Replace with __is_std_array class template and
936 partial specializations.
937 (__is_std_array, __is_std_span): New class templates and partial
939 (span::__is_compatible): New alias template for SFINAE constraints.
940 (span::span(element_type (&)[N])): Remove redundant constraints. Do
941 not use __adl_data to obtain a pointer.
942 (span::span(array<value_type, N>&)): Likewise.
943 (span::span(const array<value_type, N>&)): Likewise.
944 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
945 (span::iter_value_t, span::derived_from): New alias templates for
946 SFINAE constraints, until the equivalents are supported in <concepts>
948 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
949 for SFINAE constraints.
950 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
952 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
953 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
954 Use std::to_address instead of __adl_to_address.
955 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
956 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
957 template for SFINAE constraints.
958 [!_GLIBCXX_P1394] (span::span(Container&))
959 (span::span(const Container&)): Improve constraints.
960 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
961 (span::span(pointer, pointer)): Remove redundant cast of pointer.
962 (span(const span<OType, OExtent>&)): New constructor.
964 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
966 * include/bits/range_access.h (ssize): Define for C++20.
967 * testsuite/24_iterators/range_access_cpp20.cc: New test.
968 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
969 * doc/html/*: Regenerate.
971 2019-09-06 Florian Weimer <fweimer@redhat.com>
973 * configure: Regenerate.
975 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
977 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
978 P1024R3. Remove entry for P0920R2.
979 * include/std/span (__cpp_lib_span): Change value.
980 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
982 (span): Replace __extent_storage base class with data member.
983 (span::_S_subspan_extent): New function.
984 (span::empty()): Add nodiscard attribute.
985 (span::front, span::back, span::operator[]): Check preconditions.
986 (span::first, span::last, span::subspan): Add noexcept. Improve
987 precondition checks (LWG 3103).
988 (get): Remove redundant condition from static_assert.
989 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
990 (as_writable_bytes): Add inline specifier.
991 * include/std/version (__cpp_lib_span): Change value.
992 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
993 * testsuite/23_containers/span/front_neg.cc: Likewise.
994 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
995 * testsuite/23_containers/span/last_neg.cc: Improve test.
996 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
997 * testsuite/23_containers/span/1.cc: New test.
998 * testsuite/23_containers/span/2.cc: New test.
999 * testsuite/23_containers/span/back_assert_neg.cc: New test.
1000 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
1001 * testsuite/23_containers/span/first_assert_neg.cc: New test.
1002 * testsuite/23_containers/span/first_neg.cc: New test.
1003 * testsuite/23_containers/span/front_assert_neg.cc: New test.
1004 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
1005 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
1006 * testsuite/23_containers/span/last_assert_neg.cc: New test.
1007 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
1008 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
1009 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
1010 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
1011 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
1012 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
1014 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
1016 * include/Makefile.am: Add <span> header.
1017 * include/Makefile.in: Regenerate.
1018 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
1019 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
1020 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
1021 New functions for performing argument-dependent lookup of range
1022 customization points.
1023 * include/bits/stl_iterator.h (__normal_iterator): Add
1024 _GLIBCXX20_CONSTEXPR to all functions.
1025 * include/std/span: New header.
1026 * include/std/version (__cpp_lib_span): Define feature test macro.
1027 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
1028 * testsuite/23_containers/span/everything.cc: New test.
1029 * testsuite/23_containers/span/get_neg.cc: New test.
1030 * testsuite/23_containers/span/last_neg.cc: New test.
1031 * testsuite/23_containers/span/subspan_neg.cc: New test.
1032 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
1033 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
1034 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
1036 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
1038 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
1039 * doc/html/*: Regenerate.
1041 2019-09-04 Mike Crowe <mac@mcrowe.com>
1044 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
1045 pthread_cond_clockwait function.
1046 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
1047 * configure: Regenerate.
1048 * config.h.in: Regenerate.
1049 * include/std/condition_variable: (condition_variable): Rename
1050 __steady_clock_t typedef and add system_clock. Change __clock_t to be
1051 a typedef for the preferred clock to convert arbitrary other clocks to.
1052 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
1054 (wait_until): Change __clock_t overload to use system_clock.
1055 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
1056 steady_clock overload that calls pthread_cond_clockwait.
1057 (__wait_until_impl): Change __clock_t overload to use system_clock.
1058 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
1059 steady_clock for __clock_t if pthread_cond_clockwait is available.
1061 2019-09-04 Mike Crowe <mac@mcrowe.com>
1063 * testsuite/30_threads/condition_variable/members/2.cc (test01):
1064 Parameterise so that test can be run against an arbitrary clock.
1065 (main): Test using std::chrono::steady_clock and a user-defined
1066 clock in addition to the previous std::chrono::system_clock.
1067 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1069 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
1071 * crossconfig.m4: Remove references to spu.
1072 * configure: Regenerate.
1073 * doc/xml/manual/appendix_contributing.xml: Remove references
1074 to __ea as "badword" for spu.
1075 * doc/html/manual/source_code_style.html: Regenerate.
1076 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
1077 to avoid __ea (as "badword" for spu).
1078 (__ellint_rj): Likewise.
1080 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
1083 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
1084 scanning to conform to the GNU Coding Standards.
1085 * configure: Regenerate.
1087 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1089 * src/c++17/memory_resource.cc: Use __constinit keyword.
1091 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1093 * doc/xml/manual/abi.xml: Document 9.x library versions.
1094 * doc/html/*: Regenerate.
1096 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1098 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
1099 (__detail::__to_chars_8_len): Remove.
1100 (__detail::__to_chars_8): Inline length calculation here.
1101 (__detail::__from_chars_binary): Use numeric_limits instead of
1104 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1106 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1107 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
1108 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1109 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1112 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
1114 * testsuite_files/util/testsuite_performance.h
1115 (resource_counter::start): Ignore unused malloc(0) result.
1117 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1119 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
1120 Model Object Technologies): Adjust name and link.
1122 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
1124 * include/std/charconv (__detail::__to_chars_8)
1125 __detail::__to_chars_16): Replace array of precomputed digits with
1126 arithmetic operations to avoid CPU cache misses. Remove zero
1127 termination from array of digits to allow symbol merge with generic
1128 implementation of __detail::__to_chars. Replace final offsets with
1129 constants. Use __detail::__to_chars_len_2 instead of a generic
1130 __detail::__to_chars_len.
1131 (__detail::__to_chars): Remove zero termination from array of digits.
1132 (__detail::__to_chars_2): Leading digit is always '1'.
1134 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1136 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
1138 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
1140 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1142 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1145 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
1146 to template parameters.
1147 * include/bits/stl_uninitialized.h (uninitialized_copy)
1148 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
1149 diagnose invalid uses.
1150 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
1151 Adjust expected error.
1152 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
1154 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
1156 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
1158 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
1160 * testsuite/23_containers/vector/cons/89164.cc: New test.
1161 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
1163 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
1166 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
1167 * configure: Regenerate.
1168 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
1170 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
1172 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1174 2019-08-29 Jakub Jelinek <jakub@redhat.com>
1176 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1177 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1179 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
1181 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1182 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1183 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1184 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1185 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1186 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1187 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1189 2019-08-23 Joseph Myers <joseph@codesourcery.com>
1191 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1192 (std::filesystem::__gnu_posix::lstat): Add return type.
1194 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
1196 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
1198 * include/std/numeric (reduce): Fix Doxygen markup.
1201 * include/std/type_traits (is_function): Simplify definition. Remove
1202 partial specializations for function types.
1203 (__is_referenceable): Simplify definition.
1204 * testsuite/20_util/bind/91371.cc: New test.
1205 * testsuite/20_util/is_function/91371.cc: New test.
1206 * testsuite/20_util/is_function/value.cc: Check more pointer types.
1207 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
1208 * testsuite/20_util/is_object/91371.cc: New test.
1210 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
1212 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1214 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
1217 * include/bits/std_function.h (__check_func_return_type): Remove.
1218 (function::_Callable): Use std::__is_invocable_impl instead of
1219 __check_func_return_type.
1220 * include/std/type_traits (__is_invocable_impl): Add another defaulted
1221 template parameter. Define a separate partial specialization for
1222 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
1223 with a check that models delayed temporary materialization.
1224 * testsuite/20_util/function/91456.cc: New test.
1225 * testsuite/20_util/is_invocable/91456.cc: New test.
1227 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
1229 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
1231 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
1233 Implement C++20 p0879 - Constexpr for swap and swap related functions.
1234 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
1235 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
1237 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
1238 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
1239 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
1240 * include/bits/move.h (swap): Add constexpr.
1241 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
1242 (__gcd, __rotate, rotate, __partition, __heap_select)
1243 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
1244 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
1245 (__introselect, __chunk_insertion_sort, next_permutation)
1246 (prev_permutation, partition, partial_sort, nth_element, sort)
1247 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
1248 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
1249 (swap_ranges): Add constexpr.
1250 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
1251 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
1253 * include/std/type_traits (swap): Add constexpr.
1254 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
1255 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
1256 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
1257 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
1258 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
1259 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
1260 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
1261 * testsuite/25_algorithms/partition/constexpr.cc: New test.
1262 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
1263 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
1264 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
1265 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
1266 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
1267 * testsuite/25_algorithms/sort/constexpr.cc: New test.
1268 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
1269 * testsuite/25_algorithms/swap/constexpr.cc: New test.
1270 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
1272 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
1275 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
1277 * include/std/tuple (__unpack_std_tuple): New variable template and
1278 partial specializations.
1279 (apply, make_from_tuple): Add noexcept-specifier.
1280 * testsuite/20_util/tuple/apply/2.cc: New test.
1281 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
1283 2019-08-09 Corentin Gay <gay@adacore.com>
1285 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
1286 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
1287 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
1288 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
1289 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
1290 Add call to `VERIFY`.
1292 2019-08-09 Alexandre Oliva <oliva@adacore.com>
1294 * include/ext/random
1295 (normal_mv_distribution::param_type::param_type): New private
1296 ctor taking a decomposed varcov matrix, for use by...
1297 (operator>>): ... this, befriended.
1298 * include/ext/random.tcc (operator>>): Use it.
1299 (normal_mv_distribution::param_type::_M_init_lower): Adjust
1300 member function name in exception message.
1302 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
1304 P0325R4 to_array from LFTS with updates
1305 * include/experimental/array (to_array): Qualify call to __to_array.
1306 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
1307 * include/std/version (__cpp_lib_to_array): Likewise.
1308 * testsuite/23_containers/array/creation/1.cc: New test.
1309 * testsuite/23_containers/array/creation/2.cc: New test.
1310 * testsuite/23_containers/array/creation/3_neg.cc: New test.
1311 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
1312 Use zero for dg-error line number.
1314 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
1316 P1651R0 bind_front should not unwrap reference_wrapper
1317 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
1318 * include/std/version (__cpp_lib_bind_front): Update value.
1319 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
1321 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
1323 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
1324 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
1325 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
1326 specializations for __float128.
1327 * testsuite/26_numerics/numbers/float128.cc: New test.
1329 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
1331 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
1334 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1336 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
1337 in <algorithm> and <utility> Headers.
1338 Implement C++20 p1023 - constexpr comparison operators for std::array.
1339 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
1340 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
1341 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
1342 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
1343 none_of, partition_copy, partition_point, remove, remove_if,
1344 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
1345 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
1346 count_if, equal, find, find_first_of, find_if, for_each, generate,
1347 generate_n, lexicographical_compare, merge, mismatch, replace,
1348 replace_if, search, search_n, set_difference, set_intersection,
1349 set_symmetric_difference, set_union, transform, unique_copy):
1351 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
1352 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
1353 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
1354 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
1355 Use const ref instead of ref arg;
1356 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
1357 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
1358 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
1359 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
1360 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
1361 __iter_comp_iter): Mark constexpr.
1362 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
1363 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
1364 none_of, any_of, find_if_not, is_partitioned, partition_point,
1365 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
1366 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
1367 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
1368 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
1369 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
1370 __equal_range, equal_range, binary_search, __includes, includes,
1371 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
1372 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
1373 is_sorted_until, __is_permutation, is_permutation, for_each, find,
1374 find_if, find_first_of, adjacent_find, count, count_if, search,
1375 search_n, transform, replace, replace_if, generate, generate_n,
1376 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
1377 set_intersection, __set_difference, set_difference,
1378 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
1379 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
1380 wrappers around __builtin_memmove and __builtin_memcmp
1382 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
1383 copy, move, __copy_move_b, __copy_move_backward_a,
1384 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
1385 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
1386 __lexicographical_compare_impl, __lexicographical_compare,
1387 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
1388 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
1389 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
1390 is_heap): Mark constexpr.
1391 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
1392 is_heap): Mark constexpr.
1393 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
1394 * include/std/array: Make comparison ops constexpr.
1395 * include/std/utility: Make exchange constexpr.
1396 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
1397 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
1398 * testsuite/23_containers/array/tuple_interface/
1399 tuple_element_neg.cc: Adjust.
1400 * testsuite/20_util/exchange/constexpr.cc: New.
1401 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
1402 * testsuite/25_algorithms/constexpr_macro.cc: New.
1403 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
1404 * testsuite/25_algorithms/all_of/constexpr.cc: New.
1405 * testsuite/25_algorithms/any_of/constexpr.cc: New.
1406 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
1407 * testsuite/25_algorithms/copy/constexpr.cc: New.
1408 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
1409 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
1410 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
1411 * testsuite/25_algorithms/count/constexpr.cc: New.
1412 * testsuite/25_algorithms/count_if/constexpr.cc: New.
1413 * testsuite/25_algorithms/equal/constexpr.cc: New.
1414 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
1415 * testsuite/25_algorithms/fill/constexpr.cc: New.
1416 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
1417 * testsuite/25_algorithms/find/constexpr.cc: New.
1418 * testsuite/25_algorithms/find_end/constexpr.cc: New.
1419 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
1420 * testsuite/25_algorithms/find_if/constexpr.cc: New.
1421 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
1422 * testsuite/25_algorithms/for_each/constexpr.cc: New.
1423 * testsuite/25_algorithms/generate/constexpr.cc: New.
1424 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
1425 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
1426 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
1427 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
1428 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
1429 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
1430 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
1431 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
1432 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
1433 * testsuite/25_algorithms/merge/constexpr.cc: New.
1434 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
1435 * testsuite/25_algorithms/none_of/constexpr.cc: New.
1436 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
1437 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
1438 * testsuite/25_algorithms/remove/constexpr.cc: New.
1439 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
1440 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
1441 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
1442 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
1443 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
1444 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
1445 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
1446 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
1447 * testsuite/25_algorithms/search/constexpr.cc: New.
1448 * testsuite/25_algorithms/search_n/constexpr.cc: New.
1449 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
1450 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
1451 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
1452 * testsuite/25_algorithms/set_union/constexpr.cc: New.
1453 * testsuite/25_algorithms/transform/constexpr.cc: New.
1454 * testsuite/25_algorithms/unique/constexpr.cc: New.
1455 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
1456 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
1458 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
1460 * include/std/memory (make_obj_using_allocator): Qualify call to
1461 uses_allocator_construction_args.
1463 P0631R4 Math Constants
1464 * include/Makefile.am: Add new header.
1465 * include/Makefile.in: Regenerate.
1466 * include/precompiled/stdc++.h: Include new header.
1467 * include/std/numbers: New header.
1468 * include/std/version (__cpp_lib_math_constants): Define.
1469 * testsuite/26_numerics/numbers/1.cc: New test.
1470 * testsuite/26_numerics/numbers/2.cc: New test.
1471 * testsuite/26_numerics/numbers/3.cc: New test.
1472 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
1474 * include/std/bit: Add Doxygen comments.
1477 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
1478 constraints on deleter that should only apply to the constructor.
1479 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
1480 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
1481 constraints on deleter here.
1482 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1484 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1487 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1489 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1491 * testsuite/18_support/51333.cc: New test.
1493 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1495 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1496 to the Doxygen manual. Avoid a "here" link on the way.
1497 Fix another broken link to Doxygen docblocks.
1499 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1501 * include/std/bit (__cpp_lib_endian): Define.
1502 * include/std/version (__cpp_lib_endian): Define.
1503 * testsuite/26_numerics/endian/2.cc: New.
1504 * testsuite/26_numerics/endian/3.cc: New.
1505 * testsuite/26_numerics/endian/4.cc: New.
1507 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1509 * testsuite/util/testsuite_iterators.h
1510 (bidirectional_iterator_wrapper): Fix type comment.
1511 (random_access_iterator_wrapper): Likewise.
1513 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1515 * include/std/bit (endian): Move definition here as per P1612R1.
1516 * include/std/type_traits (endian): Remove definition from here.
1517 * testsuite/20_util/endian/1.cc: Rename to ...
1518 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1520 2019-07-25 Martin Liska <mliska@suse.cz>
1521 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1524 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1525 -fno-allocation-dce.
1526 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1527 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1528 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1530 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1532 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1533 * testsuite/26_numerics/bit/bit.count/*: Here.
1535 * include/std/bit (__rotl, __rotr): Change second parameter from
1536 unsigned int to int and handle negative values.
1537 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1538 parameter from unsigned int to int. Add nodiscard attribute.
1539 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1540 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1542 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1543 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1546 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1547 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1548 so that out of range values cause undefined behaviour. Ensure that
1549 shift will still be undefined if left operand is promoted.
1550 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1551 unrepresentable values with checks that they are not core constant
1553 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1555 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1557 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1558 sized deallocation size computation.
1560 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1562 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
1564 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
1566 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
1567 (~_Temporary_buffer()): Use latter.
1568 (_Temporary_buffer(_FIterator, size_type)): Likewise.
1570 2019-07-17 Andreas Schwab <schwab@suse.de>
1572 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1574 2019-07-16 Jason Merrill <jason@redhat.com>
1576 * include/std/memory (uses_allocator_construction_args): Add parens
1579 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
1581 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
1583 * include/experimental/string_view (__detail::__idt): Remove.
1584 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1585 Use __type_identity_t instead of __detail::__idt;
1586 * include/std/string_view (__detail::__idt): Remove.
1587 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1588 Use __type_identity_t instead of __detail::__idt;
1589 * include/std/type_traits (__type_identity_t): New alias template.
1591 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
1592 and floating point atomics.
1594 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
1596 * doc/xml/manual/configure.xml: Improve documentation of
1597 --enable-libstdcxx-time option.
1599 * include/bits/atomic_base.h (__atomic_impl): New namespace for
1600 wrappers around atomic built-ins.
1601 (__atomic_float, __atomic_ref): New class templates for use as base
1603 * include/std/atomic (atomic<float>, atomic<double>)
1604 (atomic<long double>): New explicit specializations.
1605 (atomic_ref): New class template.
1606 (__cpp_lib_atomic_ref): Define.
1607 * include/std/version (__cpp_lib_atomic_ref): Define.
1608 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
1609 * testsuite/29_atomics/atomic_float/1.cc: New test.
1610 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
1611 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
1612 * testsuite/29_atomics/atomic_ref/float.cc: New test.
1613 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
1614 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
1615 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
1616 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
1618 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
1620 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
1621 throw() with _GLIBCXX_NOTHROW.
1622 (__atomic_add_dispatch): Return after performing atomic increment.
1624 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
1626 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
1627 (__exchange_and_add): Replace static specifier with always_inline
1629 (__exchange_and_add_single, __atomic_add_single): Likewise.
1630 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
1631 combine !__gthread_active_p() and !__GTHREADS branches.
1633 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
1636 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
1637 * configure: Regenerate.
1638 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
1640 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
1641 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1643 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
1645 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
1646 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
1647 instead of __is_identifier to detect Clang support.
1649 2019-07-02 Jim Wilson <jimw@sifive.com>
1651 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
1653 * configure: Regenerate.
1655 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
1658 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
1659 for the what_arg parameters.
1660 (filesystem_error::filesystem_error): Pass system_error::what() to
1661 the _Impl constructor.
1662 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
1663 filesystem_error::what() contains system_error::what().
1665 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
1667 * include/std/charconv (chars_format): Define bitmask type.
1668 * testsuite/20_util/to_chars/chars_format.cc: New test.
1670 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
1671 * include/std/bit (_If_is_unsigned_integer_type): Remove.
1672 (_If_is_unsigned_integer): Use __is_unsigned_integer.
1673 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
1674 (countl_one(byte), countr_zero(byte), countr_one(byte))
1675 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
1676 (log2p1(byte)): Remove.
1677 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
1678 (__detail::__is_int_to_chars_type): Remove.
1679 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
1680 and __is_unsigned_integer.
1681 * include/std/type_traits (__is_one_of): Move here from <charconv>.
1682 (__is_signed_integer, __is_unsigned_integer): New helpers.
1683 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
1685 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
1686 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
1687 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
1688 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
1689 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1690 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1691 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1692 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1693 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
1694 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
1696 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
1698 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
1701 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1703 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1704 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1705 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1706 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1708 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
1710 * include/std/numeric (midpoint(T, T)): Change implementation for
1711 floating-point types to avoid incorrect rounding of denormals.
1712 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
1713 rounding with denormals.
1714 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
1715 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1717 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
1719 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
1721 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
1723 * configure: Regenerate.
1725 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
1726 Qualify calls to __never_valueless.
1728 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
1729 C++17 working draft.
1731 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
1732 vector<bool> for test.
1733 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1735 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1737 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
1739 (istream_iterator::_M_read()): Do not check stream state before
1740 attempting extraction. Set stream pointer to null when extraction
1742 (operator==(const istream_iterator&, const istream_iterator&)): Change
1743 to be a hidden friend of istream_iterator.
1744 (operator!=(const istream_iterator&, const istream_iterator&)):
1746 (ostream_iterator::ostream_iterator()): Add default constructor.
1747 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
1749 * testsuite/24_iterators/istream_iterator/1.cc: New test.
1750 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
1751 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
1752 constructor taking a string.
1753 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
1756 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
1757 Jonathan Wakely <jwakely@redhat.com>
1760 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
1761 values of type bool for vector<bool> elements.
1762 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
1763 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1765 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1767 PR libstdc++/90920 partially revert r263433
1768 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
1769 (rotate): Remove checks.
1770 * testsuite/25_algorithms/rotate/90920.cc: New test.
1772 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
1773 category used in invocable check.
1774 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
1775 * testsuite/26_numerics/reduce/2.cc: New test.
1777 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1779 * include/bits/algorithmfwd.h: Change title of doc group.
1780 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1782 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1783 * include/std/numeric (__is_random_access_iter): New internal trait.
1784 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1785 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1786 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1787 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1788 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1789 * testsuite/26_numerics/reduce/1.cc: New test.
1790 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1791 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1792 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1793 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1796 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1797 in unsigned int to avoid promotion (LWG 2950).
1799 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1801 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1804 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1806 PR libstdc++/90281 Fix string conversions for filesystem::path
1807 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1808 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1809 __str_codecvt_in_all to fail for partial conversions and throw on
1811 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1812 (path::_Cvt<char8_t>): Add explicit specialization.
1813 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1815 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1816 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1817 instead of codecvt_utf8. Use __str_codecvt_in_all and
1818 __str_codecvt_out_all.
1819 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1820 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1821 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1822 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1823 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1824 after converting to UTF-8.
1825 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1826 __str_codecvt_in_all.
1827 (path::string): Fix initialization of string types with different
1829 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1830 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1831 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1833 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1834 return false for partial conversions.
1835 * include/experimental/bits/fs_path.h (u8path):
1836 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1837 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1838 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1839 instead of codecvt_utf8. Use __str_codecvt_in_all and
1840 __str_codecvt_out_all.
1841 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1842 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1843 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1844 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1845 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1846 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1847 __str_codecvt_in_all.
1848 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1849 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1850 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1851 __str_codecvt_in_all.
1852 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1853 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1854 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1855 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1856 strings and with Unicode characters outside the basic multilingual
1858 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1859 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1860 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1861 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1862 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1863 empty strings and with Unicode characters outside the basic
1866 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1867 Jonathan Wakely <jwakely@redhat.com>
1869 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1870 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1871 deallocate node if insertion fails.
1872 (_Hashtable::_M_insert_multi_node): Likewise.
1873 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1874 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1875 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1876 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1877 (_Hashtable::extract(const _Key&)): Likewise.
1878 (_Hashtable::_M_merge_unique): Pass additional key argument.
1879 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1881 (_Hashtable::_M_insert): Likewise.
1882 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1883 (_Hashtable_alloc): Add comments to functions with misleading names.
1885 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1887 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1889 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1890 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1891 header for std::allocator.
1892 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1893 using-declaration for std::size_t.
1894 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1896 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1898 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1899 * testsuite/experimental/map/erasure.cc: Include <string> for
1901 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1903 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1905 * include/experimental/type_traits (experimental::nonesuch): Use
1906 pragma to disable -Wctor-dtor-privacy warnings.
1907 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1908 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1910 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1912 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1914 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1915 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1916 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1917 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1919 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1920 (variant::emplace): Change static_assert messages from "should be"
1922 (hash<monostate>::operator()): Remove name of unused parameter.
1924 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1927 * include/Makefile.am: Add new <bits/charconv.h> header.
1928 * include/Makefile.in: Regenerate.
1929 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1930 (to_string(long), to_string(unsigned long), to_string(long long))
1931 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1932 * include/bits/charconv.h: New header.
1933 (__detail::__to_chars_len): Move here from <charconv>.
1934 (__detail::__to_chars_10_impl): New function extracted from
1935 __detail::__to_chars_10.
1936 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1937 (__to_chars_unsigned_type): New class template that reuses
1938 __make_unsigned_selector_base::__select to pick a type.
1939 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1940 (__detail::__to_chars_len): Move to new header.
1941 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1942 output to __detail::__to_chars_10_impl and call that.
1943 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1944 * testsuite/21_strings/basic_string/numeric_conversions/char/
1945 to_string.cc: Fix reference in comment. Remove unused variable.
1946 * testsuite/21_strings/basic_string/numeric_conversions/char/
1947 to_string_int.cc: New test.
1949 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1951 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1952 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1953 Replace copy with hand-rolled loop.
1954 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1957 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1959 Test for C++20 p0858 - ConstexprIterator requirements.
1960 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1962 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1965 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1967 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1969 * include/bits/c++config: Rename all macros of the form __PSTL* to
1971 * include/std/algorithm: Likewise.
1972 * include/std/execution: Likewise.
1973 * include/std/numeric: Likewise.
1974 * include/std/memory: Likewise.
1975 * include/pstl/glue_memory_impl.h: Likewise.
1976 * include/pstl/numeric_impl.h: Likewise.
1977 * include/pstl/glue_memory_defs.h: Likewise.
1978 * include/pstl/execution_defs.h: Likewise.
1979 * include/pstl/utils.h: Likewise.
1980 * include/pstl/algorithm_fwd.h: Likewise.
1981 * include/pstl/unseq_backend_simd.h: Likewise.
1982 * include/pstl/glue_execution_defs.h: Likewise.
1983 * include/pstl/algorithm_impl.h: Likewise.
1984 * include/pstl/parallel_impl.h: Likewise.
1985 * include/pstl/memory_impl.h: Likewise.
1986 * include/pstl/glue_numeric_defs.h: Likewise.
1987 * include/pstl/parallel_backend_utils.h: Likewise.
1988 * include/pstl/glue_algorithm_defs.h: Likewise.
1989 * include/pstl/parallel_backend.h: Likewise.
1990 * include/pstl/glue_numeric_impl.h: Likewise.
1991 * include/pstl/parallel_backend_tbb.h: Likewise.
1992 * include/pstl/numeric_fwd.h: Likewise.
1993 * include/pstl/glue_algorithm_impl.h: Likewise.
1994 * include/pstl/execution_impl.h: Likewise.
1995 * include/pstl/pstl_config.h: Likewise.
1996 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1997 * testsuite/util/pstl/test_utils.h: Likewise.
1998 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
2000 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
2002 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
2004 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
2005 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
2006 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
2007 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
2008 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
2010 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
2011 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
2012 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
2013 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
2014 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
2016 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
2017 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
2018 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
2019 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
2020 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
2022 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
2023 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
2024 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
2026 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
2028 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
2029 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
2030 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
2032 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
2034 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
2036 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
2038 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
2040 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
2042 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
2044 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
2046 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
2048 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
2050 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
2052 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
2054 Rename header guards to be consistent with upstream project's
2056 * include/pstl/glue_memory_impl.h: Rename all macros of the form
2057 _PSTL_(.*)_H to _PSTL_\U\1_H.
2058 * include/pstl/numeric_impl.h: Likewise.
2059 * include/pstl/glue_memory_defs.h: Likewise.
2060 * include/pstl/execution_defs.h: Likewise.
2061 * include/pstl/utils.h: Likewise.
2062 * include/pstl/algorithm_fwd.h: Likewise.
2063 * include/pstl/unseq_backend_simd.h: Likewise.
2064 * include/pstl/glue_execution_defs.h: Likewise.
2065 * include/pstl/algorithm_impl.h: Likewise.
2066 * include/pstl/parallel_impl.h: Likewise.
2067 * include/pstl/memory_impl.h: Likewise.
2068 * include/pstl/glue_numeric_defs.h: Likewise.
2069 * include/pstl/parallel_backend_utils.h: Likewise.
2070 * include/pstl/glue_algorithm_defs.h: Likewise.
2071 * include/pstl/parallel_backend.h: Likewise.
2072 * include/pstl/glue_numeric_impl.h: Likewise.
2073 * include/pstl/parallel_backend_tbb.h: Likewise.
2074 * include/pstl/numeric_fwd.h: Likewise.
2075 * include/pstl/glue_algorithm_impl.h: Likewise.
2076 * include/pstl/execution_impl.h: Likewise.
2077 * include/pstl/pstl_config.h: Likewise.
2078 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2080 Synchronize libstdc++ parallel algorithms with upstream
2082 * include/pstl/algorithm_fwd.h: Synchronize with
2083 upstream PSTL project.
2084 * include/pstl/algorithm_impl.h: Likewise.
2085 * include/pstl/execution_defs.h: Likewise.
2086 * include/pstl/execution_impl.h: Likewise.
2087 * include/pstl/glue_algorithm_impl.h: Likewise.
2088 * include/pstl/glue_execution_defs.h: Likewise.
2089 * include/pstl/numeric_fwd.h: Likewise.
2090 * include/pstl/numeric_impl.h: Likewise.
2091 * include/pstl/parallel_backend.h: Likewise.
2092 * include/pstl/pstl_config.h: Likewise.
2093 * include/pstl/unseq_backend_simd.h: Likewise.
2094 * include/pstl/parallel_backend_serial.h: New file.
2095 * include/Makefile.am (pstl_headers): Add
2096 parallel_backend_serial.h.
2097 * include/Makefile.in: Regenerate.
2099 Clean up non-conforming names
2100 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
2101 Uglfiy copy_range1 and copy_range2
2102 (__pattern_walk2_n): Rename local n to __n
2103 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
2104 Rename parameter _T to _Tp.
2106 Integrate non-TBB serial backend support
2107 * include/bits/c++config: Adjust TBB detection logic to select serial
2108 PSTL backend if no TBB present.
2109 * testsuite/utils/pstl/test_utils.h: Remove check for
2110 _PSTL_USE_PAR_POLICIES
2112 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
2114 * testsuite/24_iterators/container_access.cc: Move dg-options before
2115 dg-do directive so the target check uses the -std option.
2118 * configure: Regenerate.
2119 * src/Makefile.am (stamp-debug): Also test for missing makefile.
2120 * src/Makefile.in: Regenerate.
2122 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
2124 * include/std/array: Do not include <stdexcept>.
2125 * include/std/optional: Include <exception> and
2126 <bits/exception_defines.h> instead of <stdexcept>.
2127 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
2129 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
2131 * testsuite/23_containers/map/erasure.cc: Include <string>.
2132 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2134 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
2135 dg-prune-output for different C++98 diagnostic.
2136 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
2138 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
2140 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
2142 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
2144 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
2146 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
2148 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
2150 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
2152 * testsuite/23_containers/vector/requirements/dr438/
2153 constructor_1_neg.cc: Likewise.
2154 * testsuite/23_containers/vector/requirements/dr438/
2155 constructor_2_neg.cc: Likewise.
2156 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
2158 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
2160 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
2161 Do not test allocator rebinding extension for C++2a.
2162 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2163 dg-do directive for C++17 and C++2a.
2165 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2166 1_c++0x.cc: Remove redundant test.
2167 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2168 2.cc: Use target selector instead of preprocessor condition.
2169 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2170 3.cc: Do not run test for C++2a.
2171 * testsuite/23_containers/forward_list/requirements/
2172 explicit_instantiation/3.cc: Likewise.
2173 * testsuite/23_containers/forward_list/requirements/
2174 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2176 * testsuite/23_containers/list/requirements/explicit_instantiation/
2177 1_c++0x.cc: Remove redundant test.
2178 * testsuite/23_containers/list/requirements/explicit_instantiation/
2179 2.cc: Use target selector instead of preprocessor condition.
2180 * testsuite/23_containers/list/requirements/explicit_instantiation/
2181 3.cc: Do not run test for C++2a.
2182 * testsuite/23_containers/list/requirements/explicit_instantiation/
2183 5.cc: Do not test allocator rebinding extension for C++2a.
2184 * testsuite/23_containers/map/requirements/explicit_instantiation/
2185 1_c++0x.cc: Remove redundant test.
2186 * testsuite/23_containers/map/requirements/explicit_instantiation/
2187 2.cc: Adjust comment.
2188 * testsuite/23_containers/map/requirements/explicit_instantiation/
2189 3.cc: Do not run test for C++2a.
2190 * testsuite/23_containers/map/requirements/explicit_instantiation/
2191 5.cc: Do not test allocator rebinding extension for C++2a.
2192 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2193 1_c++0x.cc: Remove redundant test.
2194 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2195 3.cc: Do not run test for C++2a.
2196 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2197 5.cc: Do not test allocator rebinding extension for C++2a.
2198 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2199 3.cc: Do not run test for C++2a.
2200 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2201 5.cc: Do not test allocator rebinding extension for C++2a.
2202 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
2203 Do not run test for C++2a.
2204 * testsuite/23_containers/set/requirements/explicit_instantiation/
2205 1_c++0x.cc: Remove redundant test.
2206 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
2207 Do not test allocator rebinding extension for C++2a.
2208 * testsuite/23_containers/unordered_map/requirements/
2209 explicit_instantiation/3.cc: Likewise.
2210 * testsuite/23_containers/unordered_map/requirements/
2211 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2213 * testsuite/23_containers/unordered_multimap/requirements/
2214 explicit_instantiation/3.cc: Do not run test for C++2a.
2215 * testsuite/23_containers/unordered_multimap/requirements/
2216 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2218 * testsuite/23_containers/unordered_multiset/requirements/
2219 explicit_instantiation/3.cc: Do not run test for C++2a.
2220 * testsuite/23_containers/unordered_multiset/requirements/
2221 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2223 * testsuite/23_containers/unordered_set/requirements/
2224 explicit_instantiation/3.cc: Do not run test for C++2a.
2225 * testsuite/23_containers/unordered_set/requirements/
2226 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2228 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2229 2.cc: Remove redundant test.
2230 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2231 3.cc: Do not run test for C++2a.
2232 * testsuite/23_containers/vector/requirements/explicit_instantiation/
2235 * include/std/type_traits (is_empty, is_polymorphic, is_final)
2236 (is_abstract, is_aggregate): Remove static_assert.
2237 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
2239 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
2240 missing -std=gnu++17 option.
2241 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
2242 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
2243 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
2246 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
2247 * testsuite/18_support/set_unexpected.cc: Likewise.
2248 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
2250 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
2251 function to be valid in C++11.
2252 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
2253 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
2254 include Library Fundamentals or Networking headers in C++11 mode.
2255 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
2257 * include/std/tuple (_TC): Replace with _TupleConstraints.
2258 (_TupleConstraints): New helper for SFINAE constraints, with more
2259 expressive member functions to reduce duplication when used.
2260 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
2261 (tuple::_TCC): Replace dummy type parameter with bool non-type
2262 parameter that can be used to check the pack size.
2263 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
2264 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
2265 checking constraints in constructors.
2266 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
2268 (tuple::tuple): Use new helpers to reduce repitition in constraints.
2269 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
2270 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
2271 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
2272 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
2273 constraints in constructors.
2274 (tuple::__is_alloc_arg()): New SFINAE helpers.
2275 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
2277 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
2278 * testsuite/20_util/tuple/cons/90700.cc: New test.
2279 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
2280 to meet new constraint on allocator-extended default constructor.
2282 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2284 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
2285 * include/bits/stl_multimap.h (multimap): Likewise.
2287 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
2289 Rename variables and cleanup comments.
2290 * include/bits/hashtable_policy.h
2291 * include/bits/hashtable.h
2293 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2295 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
2296 Fix bgcolor for P0340R3.
2297 * doc/html/*: Regenerate.
2300 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
2301 <experimental/memory_resource>.
2302 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
2303 P0339R6, P0340R3, P1164R1 and P1357R1.
2304 * doc/html/*: Regenerate.
2306 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
2307 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
2308 allocator::value_type assertion for C++2a.
2309 * include/bits/hashtable.h: Likewise.
2310 * include/bits/stl_deque.h: Likewise.
2311 * include/bits/stl_list.h: Likewise.
2312 * include/bits/stl_map.h: Likewise.
2313 * include/bits/stl_multimap.h: Likewise.
2314 * include/bits/stl_multiset.h: Likewise.
2315 * include/bits/stl_set.h: Likewise.
2316 * include/bits/stl_vector.h: Likewise.
2317 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
2318 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
2319 * testsuite/23_containers/list/48101-3_neg.cc: New test.
2320 * testsuite/23_containers/map/48101-3_neg.cc: New test.
2321 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
2322 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
2323 * testsuite/23_containers/set/48101-3_neg.cc: New test.
2324 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
2325 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
2326 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
2327 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
2328 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
2330 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
2332 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
2334 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2336 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
2338 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
2340 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
2342 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2344 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
2347 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
2348 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
2349 * libsupc++/eh_term_handler.h: New header defining
2350 _GLIBCXX_DEFAULT_TERM_HANDLER.
2351 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
2352 (set_terminate): Restore default handler when argument is null.
2353 (set_unexpected): Likewise.
2354 * testsuite/18_support/set_terminate.cc: New test.
2355 * testsuite/18_support/set_unexpected.cc: New test.
2357 * include/backward/hashtable.h (size_t, ptrdiff_t)
2358 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
2359 (distance, vector, pair, __iterator_category): Remove
2360 using-declarations that add these names to namespace __gnu_cxx.
2361 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
2362 * include/ext/debug_allocator.h (size_t): Likewise.
2363 * include/ext/functional (size_t, unary_function, binary_function)
2364 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
2366 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
2367 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
2368 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
2369 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
2370 * include/ext/numeric (iota): Fix outdated comment.
2371 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
2372 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
2373 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
2374 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
2375 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
2377 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
2378 (allocator, __true_type, __false_type): Likewise.
2380 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
2383 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
2384 New helpers for checking preconditions in traits.
2385 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
2386 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
2387 (is_destructible, is_nothrow_destructible, is_constructible)
2388 (is_default_constructible, is_copy_constructible)
2389 (is_move_constructible, is_nothrow_default_constructible)
2390 (is_nothrow_constructible, is_nothrow_copy_constructible)
2391 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
2392 (is_nothrow_assignable, is_nothrow_copy_assignable)
2393 (is_nothrow_move_assignable, is_trivially_constructible)
2394 (is_trivially_copy_constructible, is_trivially_move_constructible)
2395 is_trivially_assignable, is_trivially_copy_assignable)
2396 (is_trivially_move_assignable, is_trivially_destructible)
2397 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
2398 (is_invocable_r, is_nothrow_invocable)
2399 (has_unique_object_representations, is_aggregate): Add static_asserts
2400 to make sure that type traits are not misused with incomplete types.
2401 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
2402 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
2403 base characteristics without assertions that can be reused in other
2405 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
2406 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
2408 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
2409 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
2410 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
2411 * testsuite/20_util/is_class/value.cc: Check incomplete type.
2412 * testsuite/20_util/is_function/value.cc: Likewise.
2413 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
2414 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
2416 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
2417 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
2418 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2419 * testsuite/20_util/is_union/value.cc: Likewise.
2420 * testsuite/20_util/is_void/value.cc: Likewise.
2421 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
2423 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2425 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
2426 Add new private member function.
2427 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
2428 (random_device::_M_init_pretr1(const string&)): Call new private
2429 member with string data.
2430 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
2432 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
2433 test using COW strings.
2434 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
2435 a value from the device.
2436 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
2437 Fix typo in token string.
2439 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
2441 LWG2788 basic_string spurious use of a default constructible allocator
2442 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
2443 (basic_string::_M_replace_dispatch): Construct temporary string with
2444 the current allocator.
2445 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
2446 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
2448 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
2450 * doc/xml/manual/diagnostics.xml: Update list of headers that define
2452 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
2453 section about new/delete overloads. Improve section on verbose
2455 * doc/html/*: Regenerate.
2457 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
2458 P0811R3. Change status of P1353R0.
2459 * doc/html/*: Regenerate.
2461 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
2462 documentation of implementation-defined types for [thread.req.native].
2463 * doc/xml/manual/status_cxx2017.xml: Update documentation of
2464 implementation-defined strings for [variant.bad.access]. Fix typo in
2465 documentation of implementation-defined support for [fs.conform.9945].
2466 * doc/html/*: Regenerate.
2468 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
2471 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
2472 that fails on mingw-w64.
2475 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2476 (status(const path&, error_code&)): Use parent_path() to remove
2478 (symlink_status(const path&, error_code&)): Duplicate workaround for
2479 bug in _wstat for paths with trailing slash.
2480 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
2481 with trailing slash.
2482 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2483 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2485 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2486 once instead of building it iteratively.
2488 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2490 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2491 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2492 the assembler supports rdseed.
2493 * config.h.in: Regenerate.
2494 * configure: Regenerate.
2495 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2496 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2497 * doc/html/*: Regenerate.
2498 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2499 * include/bits/random.h (random_device::random_device()): Always call
2500 _M_init rather than _M_init_pretr1.
2501 (random_device::random_device(const string&)): Likewise.
2502 (random_device::operator()()): Always call _M_getval().
2503 (random_device::_M_file): Replace first member of union with an
2504 anonymous struct, with _M_file as its first member.
2505 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2506 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2507 (USE_MT19937): Define if none of the above are defined.
2508 (USE_POSIX_FILE_IO): Define.
2509 (_M_strtoul): Remove.
2510 [USE_RDSEED] (__x86_rdseed): Define new function.
2511 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2512 (random_device::_M_init(const string&)): Initialize new union members.
2513 Add support for "rdseed" and "rand_s" tokens. Decide what the
2514 "default" token does according to which USE_* macros are defined.
2515 [USE_POSIX_FILE_IO]: Store a file descriptor.
2516 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2517 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2518 code from _M_strtoul.
2519 [!USE_MT19937]: Call _M_init, transforming the old default token or
2520 numeric tokens to "default".
2521 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2522 (random_device::_M_getval()): Use new union members to obtain a
2523 random number from the stored function pointer or file descriptor.
2524 [USE_MT19937]: Obtain a value from the mt19937 engine.
2525 (random_device::_M_getval_pretr1()): Call _M_getval().
2526 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2528 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2529 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2531 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2534 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2535 _M_split_cmpts() for a path with multiple components.
2536 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2537 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2538 components and reserve space in vector. Return early when there is
2540 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2541 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2543 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2544 form of std::equals for C++11 compatibility.
2546 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2548 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2549 C++ standard at ansi.org.
2551 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2553 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2554 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2557 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2558 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2560 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2562 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
2564 * testsuite/20_util/function_objects/invoke/3.cc: New test.
2565 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2566 "compile" test to "run".
2568 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
2569 * doc/html/*: Regenerate.
2570 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
2571 rvalue aliasing constructor.
2572 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
2573 (reinterpret_pointer_cast): Add overloads taking rvalues.
2574 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
2575 Add rvalue aliasing constructor.
2576 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
2577 "run" and check return values as well as types.
2578 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
2579 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
2580 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
2581 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
2584 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
2585 * doc/xml/manual/intro.xml: Likewise.
2586 * include/std/future (__create_task_state): Add default arguments
2587 to make providing an allocator optional.
2588 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
2589 instead of delegating to another constructor.
2590 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
2591 define allocator-extended constructors for C++17 and later.
2592 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
2594 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2595 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2596 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2598 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
2600 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2601 Don't run the libstdc++/83237 part on simulator targets.
2603 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2605 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
2607 * doc/html/*: Regenerate.
2609 * include/experimental/any (__any_caster): Use RTTI if comparing
2610 addresses fails, to support non-unique addresses in shared libraries.
2611 * include/std/any (__any_caster): Likewise.
2614 * include/experimental/any (__any_caster): Constrain to only be
2615 callable for object types. Use remove_cv_t instead of decay_t.
2616 If the type decays or isn't copy constructible, compare the manager
2617 function to a dummy specialization.
2618 (__any_caster): Add overload constrained for non-object types.
2619 (any::_Manager_internal<_Op>): Add dummy specialization.
2620 * testsuite/experimental/any/misc/any_cast.cc: Test function types
2623 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
2626 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
2627 reversed arguments to uninitialized_copy_n.
2628 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
2629 is unchanged by copy assignment.
2630 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
2631 compare path components.
2634 * include/experimental/memory_resource: Add system header pragma and
2635 do not define anything unless compiled as C++14 or later.
2636 (__resource_adaptor_common::__guaranteed_alignment): Remove.
2637 (__resource_adaptor_imp::do_allocate): If the requested alignment
2638 is a fundamental alignment then either allocate directly from _M_alloc
2639 or call the new _M_allocate function.
2640 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
2641 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
2642 of the allocator rebound to a POD type with the specified alignment.
2643 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
2644 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2645 Adjust expected allocation sizes.
2646 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
2647 xfail for Solaris x86.
2649 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
2651 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
2652 * include/pstl/execution_defs.h (__enable_if_execution_policy):
2653 Use std::__remove_cvref_t when building with GCC.
2655 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
2658 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2659 Use "additional_flags" to pass -ltbb to v3_target_compile command.
2660 Use check_v3_target_prop_cached to cache the result of the test.
2662 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2664 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2667 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2668 Changed v3_target_compile check from preprocess to executable.
2669 Added "-ltbb" to v3_target_compile flags.
2671 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2673 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2674 Add check for Thread Building Blocks 2018 or later.
2676 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2678 * testsuite/experimental/names.cc: Only include Networking TS headers
2679 on targets with the necessary Gthreads support.
2681 2019-05-20 Marek Polacek <polacek@redhat.com>
2683 CWG 2094 - volatile scalars are trivially copyable.
2685 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
2686 result for volatile int.
2688 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2690 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
2691 * testsuite/experimental/names.cc: Include <experimental/filesystem>
2694 PR c++/90532 Ensure __is_constructible(T[]) is false
2695 * include/std/type_traits (__do_is_default_constructible_impl)
2696 (__is_default_constructible_atom, __is_default_constructible_safe):
2698 (is_default_constructible): Use is_constructible.
2699 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
2700 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
2701 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
2702 * testsuite/20_util/is_trivially_default_constructible/value.cc:
2705 2019-05-20 Pádraig Brady <pbrady@fb.com>
2707 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
2708 to the deallocator with -fsized-deallocation.
2710 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2712 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
2713 test by passing correct alignment to deallocate function.
2715 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
2718 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2719 Raise exception if unique_ptr tuple member has unknown structure.
2720 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
2721 Adjust worker to support new __uniq_ptr_data base class. Do not
2722 assume field called _M_head_impl is the first tuple element.
2724 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2726 * include/bits/stl_deque.h
2727 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
2728 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
2729 (_Deque_base::_Deque_impl_data): New.
2730 (_Deque_base::_Deque_impl): Inherit latter.
2731 (_Deque_base::_Deque_impl::_M_swap_data): Move...
2732 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
2733 (_Deque_base::_Deque_impl()): Add noexcept qualification.
2734 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
2735 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
2736 (deque<>::deque()): Default.
2737 (deque<>::deque(deque&&)): Default.
2738 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
2739 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
2740 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
2741 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
2742 _M_range_initialize.
2743 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
2744 (deque<>::resize(size_type, const value_type&)): Share a single
2746 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
2747 _M_range_insert_aux.
2748 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
2749 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
2750 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
2751 * testsuite/23_containers/deque/allocator/default_init.cc: New.
2753 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
2756 * include/std/variant (holds_alternative, get, get_if): Improve
2757 static assertion messages.
2758 (bad_variant_access::bad_variant_access()): Change default message.
2759 (__throw_bad_variant_access(bool)): New overload.
2760 (get): Use new overload.
2761 (visit, visit<R>): Improve exception message.
2763 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
2764 targets. Add more cases from P0608R3.
2765 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
2767 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
2768 * include/experimental/type_traits (is_detected_exact)
2769 (is_detected_exact_v): Likewise.
2770 * include/pstl/execution_defs.h (is_execution_policy)
2771 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
2772 * include/pstl/execution_impl.h (__policy_traits): Likewise.
2773 * testsuite/17_intro/names.cc: Check for more non-reserved names.
2774 * testsuite/experimental/names.cc: New test.
2777 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2778 assertions from the destructor.
2779 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2780 Move static_assert for hash function to here.
2781 (_Hash_table_base::_M_equals): Move static_assert for equality
2783 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2785 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2786 the value directly instead of calling _S_value.
2787 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2788 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2789 _S_key(_Const_Link_type).
2790 * testsuite/23_containers/set/85965.cc: Check construction,
2791 destruction, assignment and size() do not trigger the assertions.
2792 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2793 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2795 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2796 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2797 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2798 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2799 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2800 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2801 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2803 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2804 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2807 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2809 * doc/html/*: Regenerate.
2810 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2811 of decay_t (P0777R1).
2813 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2815 Move from state of allocators (LWG2593)
2816 * include/bits/stl_deque.h
2817 (_Deque_base(_Deque_base&&, false_type)): Remove.
2818 (_Deque_base(_Deque_base&&, true_type)): Remove.
2819 (_Deque_base(_Deque_base&&)): Adapt.
2820 (_Deque_base::_M_move_impl()): Remove.
2821 * testsuite/util/testsuite_allocator.h
2822 (propagating_allocator(propagating_allocator&&)): Preserve move from
2824 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2826 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2828 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2829 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2830 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2832 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2834 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2835 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2837 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2839 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2841 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2843 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2845 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2847 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2849 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2852 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2854 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2855 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2857 * include/std/variant (__overload_set): Remove.
2859 (_Build_FUN): New class template to define a single FUN overload,
2860 with specializations to prevent unwanted conversions, as per P0608R3.
2861 (_Build_FUNs): New class template to build an overload set of FUN.
2862 (_FUN_type): New alias template to perform overload resolution.
2863 (__accepted_type): Use integer_constant base for failure case. Use
2864 _FUN_type for successful case.
2865 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2866 (variant::variant(_Tp&&)): Likewise.
2867 (variant::operator=(_Tp&&)): Likewise.
2869 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2870 Replace raw visitation with a runtime check for the valueless state
2871 and a non-raw visitor.
2872 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2873 (variant::index()): Remove branch.
2874 (variant::swap(variant&)): Use valueless_by_exception() instead of
2875 comparing the index to variant_npos, and add likelihood attribute.
2877 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2878 (_Hashtable_base::_Equal_hash_code): Define new class template.
2879 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2882 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2883 Replace with _M_get non-static member function.
2884 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2886 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2887 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2889 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2890 _S_get accessors for members in EBO helpers.
2891 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2892 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2894 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2896 (_Hashtable_base::_M_eq()): Remove non-const overload.
2898 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2900 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2902 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2904 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2907 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2909 * config/os/solaris/solaris2.10: Move to ...
2910 * config/os/solaris: ... this.
2911 * configure.host (os_include_dir): Adapt.
2912 (abi_baseline_pair): Remove Solaris 10 handling.
2913 * config/abi/post/i386-solaris2.10: Remove.
2914 * config/abi/post/sparc-solaris2.10: Remove.
2915 * config/abi/post/i386-solaris2.11: Rename to ...
2916 * config/abi/post/i386-solaris: ... this.
2917 * config/abi/post/sparc-solaris2.11: Rename to ...
2918 * config/abi/post/sparc-solaris: ... this.
2920 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2923 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2926 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2928 * include/std/variant (__visit_with_index): Remove typedef.
2929 (__deduce_visit_result): New tag type.
2930 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2931 visitation of possibly-valueless variants, forwarding to __do_visit
2932 with the relevant tag type.
2933 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2934 and make lambda return void.
2935 (__variant_construct): Likewise.
2936 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2937 __raw_idx_visit and make lambda return void.
2938 (_Multi_array::__untag_result): Add metafunction to check the function
2939 pointer type for a tag type that dictates the kind of visitation.
2940 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2941 Use decltype(auto) instead of tagged function pointer type.
2942 (__gen_vtable_impl): Remove bool non-type parameter and unused
2943 _Variant_tuple parameter.
2944 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2945 (__gen_vtable_impl::__do_visit_invoke): Remove.
2946 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2947 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2948 for the visit<R> case, rather than dispatching to separate functions.
2949 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2951 (variant::swap): Likewise.
2952 (__do_visit): Replace two non-type template parameters with a single
2953 type parameter, so that the caller must specify the visitor's return
2954 type (or one of the tag types).
2955 (visit): Deduce a return type from the visitor and use the
2956 __deduce_visit_result tag to enforce that all overloads return the
2958 (visit<R>): Call __do_visit<R> with explicit result type.
2959 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2962 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2964 nonesuch is insufficiently useless (lwg2996)
2965 * include/std/type_traits (struct __nonesuch): Added private base
2966 class to make __nonesuch not an aggregate and removed deleted default
2968 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2969 (operator=(const pair&)): Use __nonesuch instead of
2970 __nonesuch_no_braces.
2971 (operator=(pair&&)): Likewise
2972 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2973 of __nonesuch_no_braces.
2974 (operator=(tuple&&)): Likewise
2975 * include/experimental/type_traits (struct nonesuch): Added private
2976 base class to make nonesuch not an aggregate and removed deleted
2977 default constructor.
2978 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2979 * testsuite/experimental/type_traits/nonesuch.cc: New.
2981 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2983 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2984 (_Function_handler): Remove partial specializations for void return
2985 types and pointers to member.
2986 (_Function_handler::_M_manager): Adapt to removal of
2987 _Simple_type_wrapper.
2988 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2989 * include/std/functional (_Bind_result::__enable_if_void)
2990 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2991 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2993 * include/std/future (__future_base::_Task_state::_M_run)
2994 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2995 change return type of lambda expressions.
2997 * include/bits/invoke.h (__invoke_r): Define new function implementing
2998 the INVOKE<R> pseudo-function.
2999 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
3000 * testsuite/20_util/function_objects/invoke/2.cc: New test.
3002 * include/std/type_traits (__is_nt_convertible_helper): Define it
3003 unconditionally, not only for C++20.
3004 (__is_nothrow_convertible): Define internal trait for use in C++11.
3005 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
3006 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
3007 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
3008 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
3009 that has nothrow explicit conversion but potentially-throwing implicit
3011 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
3012 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
3013 function to only consider implicit conversions.
3014 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
3016 * include/std/iterator: Include <iosfwd> instead of <istream> and
3019 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
3020 Remove unused, non-standard function.
3022 * include/bits/regex.h (match_results::max_size()): Adjust return
3023 value to account for prefix/suffix/unmatched subs.
3024 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
3025 reset the contained sub matches.
3026 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
3027 function to set result state following a failed match.
3028 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
3029 sub_match states after _M_resize. Use _M_establish_failed_match.
3032 * include/std/thread (thread::_State_impl, thread::_S_make_state):
3033 Replace single _Callable parameter with variadic _Args pack, to
3034 forward them directly to the tuple of decayed copies.
3035 * testsuite/30_threads/thread/cons/69724.cc: New test.
3037 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3039 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
3040 * include/bits/basic_string.h: (operator=(const basic_string&):
3041 Move allocator decision to assign.
3042 (assign(const basic_string&)): Move allocator decision here.
3043 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
3045 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
3048 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3050 * testsuite/util/testsuite_allocator.h (memory_resource)
3051 (default_resource_mgr): Fix indentation.
3053 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
3054 Use operator-> to access raw pointer member.
3055 * testsuite/23_containers/vector/59829.cc: Likewise.
3056 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
3057 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
3058 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
3060 (PointerBase, PointerBase_void): Derive from NullablePointer and use
3061 its constructors and equality operators. Change converting
3062 constructors to use operator-> to access private member of the other
3064 (PointerBase_void::operator->()): Add, for access to private member.
3065 (operator-(PointerBase, PointerBase)): Change to hidden friend.
3066 (operator==(PointerBase, PointerBase)): Remove.
3067 (operator!=(PointerBase, PointerBase)): Remove.
3069 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
3070 not assume field called _M_head_impl is the first tuple element.
3071 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
3072 implementation more accurate.
3073 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
3074 empty pointer type and non-empty deleter.
3076 LWG 2899 - Make is_move_constructible correct for unique_ptr
3077 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
3078 move assignment operator.
3079 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
3080 (__uniq_ptr_data): New class template with conditionally deleted
3082 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
3083 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
3084 constructor and move assignment operator as defaulted.
3085 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
3086 __uniq_ptr_impl::release().
3087 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
3088 to __uniq_ptr_impl::reset(pointer).
3089 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3090 Check for new __uniq_ptr_data type.
3091 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
3093 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3095 PR libstdc++/90454.cc path construction from void*
3096 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
3097 pointers to void are rejected as well as void.
3098 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
3099 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
3101 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
3103 * doc/xml/manual/policy_data_structures.xml: Comment out stray
3104 <remark> elements. Fix formatting of bibliography references.
3106 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
3108 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
3110 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3112 Remove Profile Mode, deprecated since 7.1.0
3113 * doc/Makefile.am: Remove XML file for profile mode docs.
3114 * doc/Makefile.in: Regenerate.
3115 * doc/xml/authors.xml: Remove authors of profile mode docs.
3116 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
3118 * doc/xml/manual/debug.xml: Likewise.
3119 * doc/xml/manual/evolution.xml: Document removal of profile mode.
3120 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
3121 * doc/xml/manual/spine.xml: Remove profile mode author credit.
3122 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
3124 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
3126 * doc/html/*: Regenerate.
3127 * include/Makefile.am: Remove profile mode headers.
3128 * include/Makefile.in: Regenerate.
3129 * include/bits/c++config (std::__profile): Remove namespace.
3130 [_GLIBCXX_PROFILE]: Remove checks for macro.
3131 * include/profile/array: Remove.
3132 * include/profile/base.h: Remove.
3133 * include/profile/bitset: Remove.
3134 * include/profile/deque: Remove.
3135 * include/profile/forward_list: Remove.
3136 * include/profile/impl/profiler.h: Remove.
3137 * include/profile/impl/profiler_algos.h: Remove.
3138 * include/profile/impl/profiler_container_size.h: Remove.
3139 * include/profile/impl/profiler_hash_func.h: Remove.
3140 * include/profile/impl/profiler_hashtable_size.h: Remove.
3141 * include/profile/impl/profiler_list_to_slist.h: Remove.
3142 * include/profile/impl/profiler_list_to_vector.h: Remove.
3143 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
3144 * include/profile/impl/profiler_node.h: Remove.
3145 * include/profile/impl/profiler_state.h: Remove.
3146 * include/profile/impl/profiler_trace.h: Remove.
3147 * include/profile/impl/profiler_vector_size.h: Remove.
3148 * include/profile/impl/profiler_vector_to_list.h: Remove.
3149 * include/profile/iterator_tracker.h: Remove.
3150 * include/profile/list: Remove.
3151 * include/profile/map: Remove.
3152 * include/profile/map.h: Remove.
3153 * include/profile/multimap.h: Remove.
3154 * include/profile/multiset.h: Remove.
3155 * include/profile/ordered_base.h: Remove.
3156 * include/profile/set: Remove.
3157 * include/profile/set.h: Remove.
3158 * include/profile/unordered_base.h: Remove.
3159 * include/profile/unordered_map: Remove.
3160 * include/profile/unordered_set: Remove.
3161 * include/profile/vector: Remove.
3162 * scripts/run_doxygen: Do not process profile mode headers.
3163 * testsuite/23_containers/array/element_access/60497.cc: Don't use
3165 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3166 Remove dg-skip-if for profile mode.
3167 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
3168 preprocessor check for profile mode.
3169 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
3170 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
3172 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3174 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3175 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3176 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3177 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3178 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3180 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3182 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3184 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3186 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
3187 preprocessor check for profile mode.
3188 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
3190 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
3191 Remove dg-skip-if for profile mode.
3192 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
3193 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
3194 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
3195 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
3196 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
3197 * testsuite/Makefile.am: Remove profile_flags variable and
3198 * testsuite/Makefile.am: Remove profile_flags variable and
3199 check-profile target.
3200 * testsuite/Makefile.in: Regenerate.
3201 * testsuite/ext/profile/all.cc: Remove.
3202 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
3203 * testsuite/ext/profile/profiler_algos.cc: Remove.
3204 * testsuite/ext/profile/replace_new.cc: Remove.
3205 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
3206 preprocessor check for profile mode.
3207 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
3208 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
3209 (check_v3_target_normal_mode): Do not check for profile mode macro.
3210 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
3212 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
3213 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3214 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3215 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
3216 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
3217 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3218 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3219 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3220 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3221 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3223 Remove array_allocator extension, deprecated since 4.9.0
3224 * doc/xml/manual/allocator.xml: Remove documentation for
3226 * doc/xml/manual/evolution.xml: Document array_allocator removal.
3227 * doc/xml/manual/using.xml: Remove header from documentation.
3228 * include/Makefile.am: Remove <ext/array_allocator.h> header.
3229 * include/Makefile.in: Regenerate.
3230 * include/ext/array_allocator.h: Remove.
3231 * include/precompiled/extc++.h: Do not include removed header.
3232 * testsuite/ext/array_allocator/1.cc: Remove.
3233 * testsuite/ext/array_allocator/2.cc: Remove.
3234 * testsuite/ext/array_allocator/26875.cc: Remove.
3235 * testsuite/ext/array_allocator/3.cc: Remove.
3236 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
3237 * testsuite/ext/array_allocator/check_delete.cc: Remove.
3238 * testsuite/ext/array_allocator/check_new.cc: Remove.
3239 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
3240 * testsuite/ext/headers.cc: Do not include removed header.
3242 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
3244 * include/bits/stl_bvector.h
3245 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3247 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3249 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3251 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3253 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3255 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3257 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3259 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
3261 (_Bit_iterator::operator-(difference_type)): Likewise.
3262 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
3263 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
3265 (_Bit_const_iterator::operator-(difference_type)): Likewise.
3266 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
3268 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
3271 * testsuite/util/thread/all.h: Do not use remove_pointer for
3272 std::thread::native_handle_type.
3275 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
3276 (_Variant_storage<true, Types...>::_M_reset()))
3277 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
3278 (__get_storage): Likewise.
3279 (variant): Add noexcept to friend declarations for __get and
3283 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
3284 Use _Require for constraints.
3285 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
3287 (__uniq_ptr_hash): New base class with conditionally-disabled call
3289 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
3290 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3291 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
3293 * include/bits/shared_ptr.h: Improve docs.
3294 * include/bits/shared_ptr_base.h: Likewise.
3295 * include/bits/stl_uninitialized.h: Likewise.
3296 * include/bits/unique_ptr.h: Likewise.
3297 * libsupc++/new: Likewise.
3299 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
3301 * include/bits/stl_deque.h
3302 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3304 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3306 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3308 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3310 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3312 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3314 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
3316 (_Deque_iterator<>::operator-(difference_type)): Likewise.
3318 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
3321 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
3322 (test01): Reserve for number of insertions to avoid rehash during test.
3323 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3325 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3330 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
3332 * include/experimental/bits/fs_path.h: Improve docs.
3333 * include/experimental/bits/net.h: Fix wrong header name in comment.
3334 Do not document implementation details.
3335 * include/experimental/netfwd: Fix doxygen grouping.
3337 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3339 * include/bits/stl_pair.h: Improve docs.
3340 * include/std/tuple: Likewise.
3342 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
3344 * include/std/chrono: Improve docs.
3345 * include/std/ratio: Do not document implementation details.
3346 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
3348 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
3351 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
3352 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
3353 (__duration_common_type): New helper.
3354 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
3355 __duration_common_type.
3356 (__timepoint_common_type_wrapper): Replace with ...
3357 (__timepoint_common_type): New helper.
3358 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
3359 Use __time_point_common_type.
3360 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
3361 (__common_type_impl): If either argument is transformed by decay,
3362 use the common_type of the decayed types.
3363 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
3364 decayed, use __do_common_type_impl to get the common_type.
3365 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
3366 (__do_member_type_wrapper, __member_type_wrapper)
3367 (__expanded_common_type_wrapper): Remove.
3368 (__common_type_pack, __common_type_fold): New helpers.
3369 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
3370 __member_type_wrapper and __expanded_common_type_wrapper.
3371 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3372 Test zero-length template argument list.
3373 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3374 Test single argument cases and argument types that should decay.
3375 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3376 Adjust expected error.
3377 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
3379 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
3380 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
3381 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
3383 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
3385 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
3387 Make allocator propagation more consistent for
3388 operator+(basic_string) (P1165R1)
3389 * include/bits/basic_string.h
3390 (operator+(basic_string&&, basic_string&&): Changed resulting
3391 allocator to always be the one from the first parameter.
3392 * include/bits/basic_string.tcc
3393 (operator+(const _CharT*, const basic_string&)): Changed
3394 resulting allocator to be SOCCC on the second parameter's allocator.
3395 (operator+(_CharT, const basic_string&)): Likewise.
3396 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
3398 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
3401 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3403 * include/bits/regex.h: Improve docs.
3404 * include/bits/regex.tcc: Do not document implementation details.
3406 * testsuite/19_diagnostics/error_code/hash.cc: New test.
3408 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
3410 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3411 Add type printer for container types in std::__debug namespace.
3412 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
3413 (gdb-tests): Use distinct parameters for the type of test and use of
3415 (gdb-test): Check for regex test even if 'whatis' test.
3416 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
3418 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3419 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3420 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3421 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3422 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3423 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3424 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3426 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
3428 * include/std/system_error (error_category): Fix comment.
3431 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
3432 argument is an empty path.
3433 (absolute(const path&, error_code&)): Use invalid_argument as error
3434 code instead of no_such_file_or_directory.
3435 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
3436 of non-existent paths and empty paths with both overloads of absolute.
3438 * include/std/system_error (error_category, error_code)
3439 (error_condition): Improve docs.
3440 * libsupc++/exception: Add missing @addtogroup Doxygen command.
3441 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
3442 to class documentation. Suppress documentation for implementation
3444 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
3445 Suppress documentation for implementation details.
3447 * include/std/system_error (error_code): Remove friend declaration
3448 for hash<error_code>.
3449 (hash<error_code>::operator()): Use public member functions to access
3451 (hash<error_condition>::operator()): Use address of category, not
3452 its object representation.
3453 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
3454 Use public member functions to access value and category.
3455 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
3457 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
3459 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
3460 * include/bits/hashtable_policy.h
3461 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
3462 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
3463 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
3464 smaller than input value rather than always greater. Preserve
3465 _M_next_resize if called with 0 input. Use __builtin_floorl.
3466 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
3467 elements + number of insertions is greater than _M_next_resize. Start
3468 with 11 buckets if not told otherwise. Use __builtin_floorl.
3469 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
3470 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
3471 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
3472 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
3473 told otherwise. Use __builtin_floorl.
3474 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
3475 to also validate _Power2_rehash_policy.
3476 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
3479 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
3482 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3486 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3487 overflow warning with -Wpedantic -Wsystem-headers.
3489 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3492 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3493 * include/bits/move.h (swap): Remove extra parentheses.
3495 * include/experimental/bits/lfts_config.h: Improve doc markup.
3496 * include/experimental/optional: Improve docs.
3497 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3498 (__constexpr_addressof): Remove.
3499 (optional::operator->()): Use std::__addressof().
3500 * include/std/optional (optional::operator->()): Adjust whitespace.
3501 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3502 that operator-> is still constexpr with overloaded operator&. Change
3503 to compile-only test.
3504 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3507 * include/bits/shared_ptr.h: Improve docs.
3508 * include/bits/shared_ptr_atomic.h: Likewise.
3509 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3511 * include/bits/basic_string.h: Fix iterator/index confusion in
3513 * include/bits/range_access.h: Fix Doxygen warnings.
3514 * include/bits/refwrap.h: Do not document implementation details.
3515 (ref, cref): Group docs with reference_wrapper.
3516 * include/std/fstream: Fix Doxygen markup.
3517 * libsupc++/initializer_list (begin, end): Group docs with
3520 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3522 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3523 * include/std/mutex: Likewise.
3524 * include/std/shared_mutex: Likewise.
3526 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3527 * include/bits/fs_fwd.h: Likewise.
3528 * include/bits/fs_ops.h: Likewise.
3529 * include/bits/fs_path.h: Likewise.
3530 * include/std/filesystem: Likewise.
3532 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3533 * include/experimental/buffer: Likewise.
3534 * include/experimental/executor: Likewise.
3535 * include/experimental/internet: Likewise.
3536 * include/experimental/io_context: Likewise.
3537 * include/experimental/net: Likewise.
3538 * include/experimental/netfwd: Likewise.
3539 * include/experimental/socket: Likewise.
3540 * include/experimental/timer: Likewise.
3542 * doc/doxygen/doxygroups.cc: Move description of experimental group
3544 * include/experimental/algorithm: Add to libfund-ts doc group.
3545 * include/experimental/any: Likewise. Do not document implementation
3547 * include/experimental/array: Add to libfund-ts doc group.
3548 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3549 for Library Fundamentals.
3550 * include/experimental/chrono: Add to libfund-ts doc group.
3551 * include/experimental/deque: Likewise.
3552 * include/experimental/forward_list: Likewise.
3553 * include/experimental/functional: Likewise.
3554 * include/experimental/iterator: Likewise.
3555 * include/experimental/list: Likewise.
3556 * include/experimental/map: Likewise.
3557 * include/experimental/memory: Likewise.
3558 * include/experimental/memory_resource: Likewise. Improve docs.
3560 * include/experimental/numeric: Add to libfund-ts doc group.
3561 * include/experimental/optional: Likewise.
3562 * include/experimental/propagate_const: Likewise.
3563 * include/experimental/random: Likewise.
3564 * include/experimental/ratio: Likewise.
3565 * include/experimental/regex: Likewise.
3566 * include/experimental/set: Likewise.
3567 * include/experimental/source_location: Likewise.
3568 * include/experimental/string: Likewise.
3569 * include/experimental/string_view: Likewise.
3570 * include/experimental/system_error: Likewise.
3571 * include/experimental/tuple: Likewise.
3572 * include/experimental/type_traits: Likewise.
3573 * include/experimental/unordered_map: Likewise.
3574 * include/experimental/unordered_set: Likewise.
3575 * include/experimental/utility: Likewise.
3576 * include/experimental/vector: Likewise.
3577 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
3578 * testsuite/experimental/array/neg.cc: Adjust dg-error.
3579 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
3581 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
3582 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
3583 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
3584 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
3585 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
3587 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
3588 * include/experimental/bits/fs_fwd.h: Improve docs.
3589 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
3590 * include/experimental/bits/fs_path.h: Likewise.
3591 (path, filesystem_error, u8path): Improve docs.
3592 * include/experimental/filesystem: Link to docs for TS.
3594 * config/allocator/new_allocator_base.h (__allocator_base): Add
3595 workaround for Doxygen bug #6945.
3596 * include/std/memory: Improve docs. Define group for pointer safety.
3597 * include/std/scoped_allocator: Improve docs. Use "undocumented"
3598 conditional to suppress documentation for implementation details.
3600 * include/bits/specfun.h: Improve docs.
3601 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
3604 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
3605 (std::experimental): Add docs.
3606 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
3607 namespace to nothing when generating docs.
3608 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
3609 * include/std/chrono (std::chrono): Likewise.
3610 * include/std/functional (std::placeholders): Likewise.
3611 * include/std/thread (std::this_thread): Likewise.
3613 * include/parallel/settings.h: Fix Doxygen markup.
3615 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
3616 anything unless PB_DS_CLASS_C_DEC is defined.
3617 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
3618 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
3619 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
3620 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
3621 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
3622 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
3623 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
3625 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
3626 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
3627 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
3628 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
3629 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
3630 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
3631 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
3632 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
3633 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
3634 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
3635 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
3637 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
3638 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
3640 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
3643 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
3644 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
3645 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
3648 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3650 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
3651 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
3652 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
3653 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
3654 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
3655 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
3657 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
3658 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
3661 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
3664 * include/std/complex (__complex_proj): Return parameter unchanged.
3665 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
3666 floating-point types to take std::complex arguments.
3667 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
3668 floating-point types.
3669 * testsuite/26_numerics/complex/proj.cc: New test.
3671 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3673 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
3674 to _Lock_policyE[012].
3675 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3677 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
3679 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
3680 macros accidentally left in.
3681 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
3682 unnecessary -lstdc++fs option. Fix test for mingw.
3683 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3686 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3688 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3690 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
3692 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
3694 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
3695 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
3698 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
3700 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
3703 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
3704 class template and partial specialization.
3707 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
3709 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
3710 functions to convert a value to an integral type.
3711 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
3712 (fill_n): Convert _Size parameter to an integral type.
3713 * testsuite/25_algorithms/fill_n/87982.cc: New test.
3714 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
3715 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
3716 * testsuite/25_algorithms/generate_n/87982.cc: New test.
3717 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
3718 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
3720 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
3722 Adding noexcept-specification on tuple constructors (LWG 2899)
3723 * libstdc++-v3/include/std/tuple:
3724 (tuple()): Add noexcept-specification.
3725 (tuple(const _Elements&...)): Likewise
3726 (tuple(_UElements&&...)): Likewise
3727 (tuple(const tuple<_UElements...>&)): Likewise
3728 (tuple(tuple<_UElements...>&&)): Likewise
3729 (tuple(const _T1&, const _T2&)): Likewise
3730 (tuple(_U1&&, _U2&&)): Likewise
3731 (tuple(const tuple<_U1, _U2>&): Likewise
3732 (tuple(tuple<_U1, _U2>&&): Likewise
3733 (tuple(const pair<_U1, _U2>&): Likewise
3734 (tuple(pair<_U1, _U2>&&): Likewise
3735 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
3737 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
3740 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
3741 arguments with __restrict.
3743 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
3745 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3747 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
3749 * include/experimental/bits/fs_path.h
3750 (path::_S_convert_loc<_InputIterator>): Create const std::string to
3751 avoid redundant call to _S_convert_loc with non-const pointers.
3753 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
3754 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
3755 * testsuite/21_strings/basic_string/hash/hash.cc
3756 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
3757 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
3758 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
3760 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
3761 wstring::_M_replace_dispatch with more specific patterns.
3762 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
3763 Create const std::string to avoid redundant call to _S_convert_loc
3764 with non-const pointers.
3765 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
3766 avoid unnecessary basic_string::assign instantiations.
3768 * include/std/memory (__uses_alloc_args): Add string-literal to
3769 static_assert, to match the one in __uses_alloc.
3770 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
3771 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
3772 for recursive uses-allocator construction of nested pairs.
3773 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
3776 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3778 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3779 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3780 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3781 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3783 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3784 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3785 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3786 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3787 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3788 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3789 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3791 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3794 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3795 * include/std/scoped_allocator [__cplusplus > 201703L]
3796 (scoped_allocator_adaptor::construct): Define in terms of
3797 uses_allocator_construction_args, as per P0591R4.
3798 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3799 * testsuite/util/testsuite_allocator.h: Remove name of unused
3802 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3804 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3805 * doc/html/*: Regenerate.
3807 * include/bits/fs_path.h (operator<, operator<=, operator>)
3808 (operator>=, operator==, operator!=): Make hidden friends, as per
3810 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3811 string type in test.
3812 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3814 * include/std/any (any::any(ValueType&&)): Use __and_v.
3815 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3818 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3820 * include/std/type_traits (__result_of_memfun): Use remove_reference
3821 instead of __remove_cvref_t and remove redundant is_same check.
3822 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3824 * include/experimental/string_view (basic_string_view::pointer)
3825 (basic_string_view::reference): Fix to refer to non-const value_type.
3826 * include/bits/basic_string.h (basic_string): Use __sv_check and
3827 __sv_limit instead of basic_string_view::_M_check and
3828 basic_string_view::_M_limit.
3829 * include/std/string_view (__sv_check, __sv_limit): New
3830 helper functions to replace basic_string_view::_M_check and
3831 basic_string_view::_M_limit.
3832 (basic_string_view): Add static assertions to enforce ill-formed
3833 requirement for traits_type::char_type from P1148R0, and to enforce
3834 required properties of char-like types.
3835 (basic_string_view::pointer, basic_string_view::reference): Fix to
3836 refer to non-const value_type.
3837 (basic_string_view::operator[], basic_string_view::at)
3838 (basic_string_view::front, basic_string_view::back)
3839 (basic_string_view::data): Use const_reference and const_pointer
3840 typedefs for return types.
3841 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3842 (hash<wstring_view>): Fix argument_type typedef.
3843 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3844 char/1.cc: Fix expected return type of basic_string_view::data().
3845 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3846 wchar_t/1.cc: Likewise.
3847 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3848 char/1.cc: Likewise.
3849 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3850 wchar_t/1.cc: Likewise.
3851 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3853 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3854 Check reference and pointer typedefs.
3855 * testsuite/experimental/string_view/requirements/typedefs.cc:
3857 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3858 Fix expected return type of basic_string_view::data().
3859 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3861 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3863 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3867 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3868 Avoid a runtime check for types that can never be stored in std::any.
3869 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3872 PR libstdc++/90220 (partial)
3873 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3874 not attempt ill-formed static_cast to pointers to non-object types.
3875 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3878 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3879 prevent -Wcatch-value warning.
3881 * include/std/variant (__variant_construct): Use template parameter
3882 type instead of equivalent decltype-specifier.
3883 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3884 Replace forward with move.
3885 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3886 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3887 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3888 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3889 index after construction succeeds.
3890 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3891 if-constexpr checks that are always true. Use __remove_cvref_t instead
3892 of remove_reference so that is_nothrow_move_constructible check
3893 doesn't use a const rvalue parameter. In the potentially-throwing case
3894 construct a temporary and move assign it, as per LWG 2904.
3895 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3896 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3897 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3898 construct a temporary and move assign from it, as per LWG 2904.
3899 * testsuite/20_util/variant/exception_safety.cc: Check that
3900 assignment operators have strong exception safety guarantee.
3902 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3904 Document PSTL linker flags
3906 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3908 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3910 * include/std/variant (__detail::__variant::_Traits): Make
3911 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3912 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3914 (__detail::__variant::_Copy_assign_alias): Only depend on
3915 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3916 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3917 move assignment operators.
3920 * include/std/variant (variant::__not_self): New helper for the
3921 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3922 (variant::__to_type_impl): Remove.
3923 (variant::__to_type): Add default argument to check pack size, instead
3924 of using __to_type_impl.
3925 (variant::__accepted_type): Add default argument using __not_self.
3926 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3927 for variant(T&&) constructor constraint.
3928 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3929 Extract __accepted_type into a named template parameter for reuse in
3930 other constraints and in the exception specification.
3931 (variant::variant(in_place_type_t<T>, Args&&...))
3932 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3933 (variant::variant(in_place_index_t<T>, Args&&...))
3934 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3935 (variant::operator=T&&)): Remove redundant && from trait arguments.
3936 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3937 isn't used for in_place_type or in_place_index arguments.
3939 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3940 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3941 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3943 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3944 Bernd Edlinger <bernd.edlinger@hotmail.de>
3945 Jakub Jelinek <jakub@redhat.com>
3948 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3949 general-regs-only target attribute for ARM.
3951 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3954 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3955 specialization also depend on is_nothrow_move_constructible.
3956 * include/std/variant (__detail::__variant::__never_valueless()):
3957 Only true if the variant would have a move assignment operator.
3958 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3959 Check __never_valueless<T...>().
3960 (variant::emplace): Only perform non-throwing move assignments
3961 for never-valueless alternatives if the variant has a move assignment
3963 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3964 types can be emplaced into non-assignable variants.
3965 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3966 don't get copied when emplaced into non-assignable variants.
3968 * include/std/variant (__detail::__variant::__ref_cast): Remove
3970 (__detail::__variant::_Uninitialized::_M_get)
3971 (__detail::__variant::__get)
3972 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3974 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3976 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3978 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3979 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3980 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3981 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3983 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3985 Delegate PSTL configuration to pstl/pstl_config.h
3987 * include/bits/c++config: Remove explicit PSTL configuration
3988 macros and use definitions from <pstl/pstl_config.h>.
3990 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3992 Cleanup algorithm implementations
3993 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3995 (mismatch): Forward execution policy.
3996 (equal): Qualify call to std::equal().
3997 (partial_sort): Forward execution policy.
3998 (inplace_merge): Forward execution policy.
4000 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
4002 Improve implementation of parallel equal()
4003 * include/pstl/algorithm_impl.h
4004 (__internal::__brick_equal): use "4 iterator" version of
4006 (__internal::__brick_equal): use simd for random access
4007 iterators on unsequenced execution policies.
4008 (__internal::__pattern_equal): add "4 iterator" version
4009 (__internal::__pattern_equal): dispatch to simd __brick_equal
4010 for vector-only execution policies.
4011 (__internal::__pattern_equal): dispatch to __parallel_or for
4012 parallel execution policies.
4013 * include/pstl/glue_algorithm_impl.h
4014 (std::equal): dispatch to "4 iterator" version of
4015 __internal::__pattern_equal().
4017 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
4020 * include/bits/forward_list.h (operator==): Do not use operator!= to
4022 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
4023 earlier in the list, so that sort is stable.
4024 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
4025 * testsuite/23_containers/forward_list/comparable.cc: Test with
4026 types that meet the minimum EqualityComparable and LessThanComparable
4027 requirements. Remove irrelevant comment.
4029 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
4030 Do not depend on whether all alternative types are move constructible.
4031 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
4032 from the operand when deciding whether to perform the assignment.
4033 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
4034 with deleted move constructor and deleted move assignment operator.
4035 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
4036 behaviour of variants with DeletedMoves as an alternative.
4037 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
4038 (move_ctor, move_assign): Check that moving a variant with a
4039 DeletedMoves alternative falls back to copying instead of moving.
4041 * testsuite/20_util/variant/compile.cc: Remove empty string literals
4042 from static_assert declarations.
4044 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
4045 actually match its name.
4046 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
4047 (test_swap()): Fix result for MoveCtorOnly and check
4048 MoveCtorAndSwapOnly.
4050 * include/std/optional (optional::value_or(U&&) &&): Add missing
4051 constexpr specifier.
4052 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
4053 for disengaged optionals and rvalue optionals.
4054 * testsuite/20_util/optional/observers/4.cc: Likewise.
4056 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
4058 * include/pstl/algorithm_impl.h: Uglify identfiers.
4059 * include/pstl/numeric_impl.h: Uglify identfiers.
4060 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
4062 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
4064 * include/bits/c++config:
4065 Add definition for __PSTL_ASSERT.
4066 Add definition for __PSTL_ASSERT_MSG.
4067 * include/pstl/algorithm_impl.h: Replace use of assert().
4068 * include/pstl/numeric_impl.h: Replace use of assert().
4069 * include/pstl/parallel_backend_tbb.h:
4070 Replace use of assert().
4071 Replace use of __TBB_ASSERT().
4072 * include/pstl/parallel_backend_utils.h: Replace use of assert().
4074 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
4077 * src/c++17/memory_resource.cc
4078 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
4079 needed to allow placing a _Chunk at the end of the buffer.
4080 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
4082 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
4084 * doc/xml/faq.xml: Add information about emergency EH pool.
4085 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
4086 Move outdated information on mt_allocator to a separate section.
4087 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
4088 doesn't affect the default allocator.
4090 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
4094 * testsuite/20_util/variant/89851.cc: New test.
4096 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
4098 * include/std/variant: Adjust whitespace. Add comments.
4099 (_Multi_array): Leave primary template undefined.
4100 (_Multi_array<_Tp>): Define partial specialization for base case of
4102 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
4103 which is always a reference.
4104 (__gen_vtable::_S_apply()): Remove function, inline body into
4105 default member initializer.
4106 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
4108 * include/std/variant (__variant_idx_cookie): Add member type.
4109 (__visitor_result_type): Remove.
4110 (__do_visit): Use invoke_result instead of __visitor_result_type.
4111 * testsuite/20_util/variant/visit.cc: New test.
4114 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
4116 * testsuite/20_util/variant/90008.cc: New test.
4118 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
4120 * include/pstl/algorithm_impl.h: Add namespace qualification.
4121 * include/pstl/execution_defs.h: Add namespace qualification.
4122 * include/pstl/execution_impl.h: Add namespace qualification.
4123 * include/pstl/numeric_impl.h: Add namespace qualification.
4124 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
4125 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
4126 * include/pstl/parallel_backend_utils.h: Include <cassert>.
4128 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
4130 Fix visit<R> for variant.
4131 * include/std/variant (__do_visit): Add a template parameter
4132 for enforcing same return types for visit.
4133 (__gen_vtable_impl): Likewise.
4134 (_S_apply_single_alt): Adjust.
4135 (__visit_invoke_impl): New. Handle casting to void.
4136 (__do_visit_invoke): New. Enforces same return types.
4137 (__do_visit_invoke_r): New. Converts return types.
4138 (__visit_invoke): Adjust.
4139 (__gen_vtable): Add a template parameter for enforcing
4140 same return types for visit.
4141 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
4142 different return types.
4143 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
4144 visitors with different return types don't accidentally
4145 compile with regular visitation.
4147 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
4149 * testsuite/27_io/filesystem/iterators/caching.cc: Add
4150 dg-require-filesystem-ts.
4152 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
4154 * doc/xml/manual/status_cxx2020.xml: Update status.
4155 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
4156 * testsuite/20_util/variant/visit_r.cc: New test.
4158 * include/bits/fs_dir.h (directory_iterator::operator*)
4159 (directory_iterator::operator->): Add noexcept.
4160 (operator==, operator!=): Replace namespace-scope equality operators
4161 for directory iterators with hidden friends.
4164 * config/abi/pre/gnu.ver: Add missing exports.
4165 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
4168 * config/abi/pre/gnu.ver: Export new symbols.
4169 * include/bits/fs_dir.h (recursive_directory_iterator::options())
4170 (recursive_directory_iterator::recursion_pending())
4171 (recursive_directory_iterator::disable_recursion_pending()): Remove
4172 inline definitions. Make noexcept.
4173 (recursive_directory_iterator::depth())
4174 (recursive_directory_iterator::operator*())
4175 (recursive_directory_iterator::operator->()): Make noexcept.
4176 (recursive_directory_iterator::_M_options)
4177 (recursive_directory_iterator::_M_pending): Remove data members.
4178 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
4179 (recursive_directory_iterator::recursive_directory_iterator): Remove
4180 ctor-initializer. Use new constructor for _Dir_stack.
4181 (recursive_directory_iterator::options())
4182 (recursive_directory_iterator::recursion_pending())
4183 (recursive_directory_iterator::disable_recursion_pending()): Add
4184 non-inline definitions.
4185 (recursive_directory_iterator::depth()): Make noexcept.
4186 (recursive_directory_iterator::increment(error_code&))
4187 (recursive_directory_iterator::pop(error_code&)): Adjust to new
4188 location of options and recursion_pending members.
4189 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
4190 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
4191 user-declared move constructor and assignment operator, to make the
4194 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
4195 d_type == DT_UNKNOWN immediately.
4196 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
4198 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
4200 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
4202 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
4203 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
4206 PR libstdc++/87431 (again)
4207 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
4208 Define partial specialization for basic_string.
4209 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
4210 shared_ptr and weak_ptr.
4211 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
4213 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
4215 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
4217 * include/debug/vector (_Never_valueless_alt): Likewise for debug
4219 * include/std/any (_Never_valueless_alt): Define explicit
4220 specialization for any.
4221 * include/std/variant (_Never_valueless_alt): Define primary template.
4222 (__never_valueless): Use _Never_valueless_alt instead of
4223 is_trivially_copyable.
4224 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
4225 initializations to avoid try-catch overhead. Add special case for
4226 scalars produced by potentially-throwing conversions. Use
4227 _Never_valueless_alt instead of is_trivially_copyable for the
4228 remaining strong exception-safety cases.
4229 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
4230 * testsuite/20_util/variant/87431.cc: Run both test functions.
4231 * testsuite/20_util/variant/exception_safety.cc: New test.
4232 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
4233 so the variant becomes valueless.
4235 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
4238 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
4240 (variant::emplace<_Tp>): Return result of emplace<N> directly.
4242 * include/std/string (__hash_string_base): New class template defining
4243 operator() for hashing strings.
4244 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
4245 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
4246 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
4247 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
4249 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
4251 Use single-visitation in variant assignment and swap and relops.
4252 Also use indices instead of types when checking whether
4253 variants hold the same thing.
4254 * include/std/variant (__do_visit): Add a template parameter
4255 for index visitation, invoke with indices if index visitation
4257 (__variant_idx_cookie): New.
4258 (__visit_with_index): Likewise.
4259 (_Copy_assign_base::operator=): Do single-visitation with
4261 (_Move_assign_base::operator=): Likewise.
4262 (_Extra_visit_slot_needed): Adjust.
4263 (__visit_invoke): Call with indices if it's an index visitor.
4264 (relops): Do single-visitation with an index visitor.
4266 (__visitor_result_type): New.
4268 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
4270 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
4272 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4274 Don't revisit a variant we are already visiting.
4275 * include/std/variant (__variant_construct_single): New.
4276 (__variant_construct): Use it.
4277 (_M_destructive_move): Likewise.
4278 (_M_destructive_copy): Likewise.
4279 (_Copy_assign_base::operator=): Adjust.
4280 (_Move_assign_base::operator=): Likewise.
4283 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
4286 * include/bits/hashtable.h (_Hashtable): Move static assertions to
4287 destructor so they are not evaluated until the _Key type is complete.
4288 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4289 * testsuite/23_containers/set/85965.cc: New test.
4290 * testsuite/23_containers/unordered_set/85965.cc: New test.
4291 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
4292 with regexp matching the corresponding _Rb_tree specialization.
4293 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
4294 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
4295 * testsuite/23_containers/set/48101_neg.cc: Likewise.
4296 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
4297 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
4298 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
4299 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
4301 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4304 Fix based on a suggestion by Antony Polukhin.
4305 * include/std/variant (__never_valueless): New.
4307 (_Extra_visit_slot_needed): New.
4308 (_Multi_array): Use it.
4309 (_S_apply_all_alts): Likewise.
4311 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4314 Fix based on a suggestion by Antony Polukhin.
4315 * include/std/variant (__gen_vtable): Don't reserve an
4316 additional table slot, _Multi_array already does that.
4318 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4321 Fix based on a suggestion by Antony Polukhin.
4322 * include/std/variant (__variant_construct): Capture a pointer
4323 to the storage and visit just one variant.
4325 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
4327 * doc/xml/manual/backwards_compatibility.xml: Remove link to
4328 Doxygen-generated pages with unstable URL.
4329 * doc/xml/manual/concurrency_extensions.xml: Likewise.
4330 * doc/xml/manual/extensions.xml: Likewise.
4331 * doc/xml/manual/parallel_mode.xml: Likewise.
4332 * doc/xml/manual/support.xml: Likewise.
4334 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
4335 avoid -Wconversion warnings.
4337 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
4339 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
4340 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
4341 (allstamped): Add stamp-pstl.
4342 (install-headers): Add ptsl_builddir.
4343 * include/Makefile.in: Regenerate.
4344 * include/bits/c++config: Add pstl configuration.
4345 * include/pstl/LICENSE.txt: New file.
4346 * include/pstl/algorithm_fwd.h: New file.
4347 * include/pstl/algorithm_impl.h: New file.
4348 * include/pstl/execution_defs.h: New file.
4349 * include/pstl/execution_impl.h: New file.
4350 * include/pstl/glue_algorithm_defs.h: New file.
4351 * include/pstl/glue_algorithm_impl.h: New file.
4352 * include/pstl/glue_execution_defs.h: New file.
4353 * include/pstl/glue_memory_defs.h: New file.
4354 * include/pstl/glue_memory_impl.h: New file.
4355 * include/pstl/glue_numeric_defs.h: New file.
4356 * include/pstl/glue_numeric_impl.h: New file.
4357 * include/pstl/memory_impl.h: New file.
4358 * include/pstl/numeric_fwd.h: New file.
4359 * include/pstl/numeric_impl.h: New file.
4360 * include/pstl/parallel_backend.h: New file.
4361 * include/pstl/parallel_backend_tbb.h: New file.
4362 * include/pstl/parallel_backend_utils.h: New file.
4363 * include/pstl/parallel_impl.h: New file.
4364 * include/pstl/pstl_config.h: New file.
4365 * include/pstl/unseq_backend_simd.h: New file.
4366 * include/pstl/utils.h: New file.
4367 * include/std/algorithm: Include parallel algorithm implementations.
4368 * include/std/execution: New file.
4369 * include/std/memory: Include parallel algorithm implementations.
4370 * include/std/numeric: Include parallel algorithm implementations.
4371 * include/std/version: Add parallel algorithms feature test macro.
4372 * testsuite/util/pstl/pstl_test_config.h: New file.
4373 * testsuite/util/pstl/test_utils.h: New file.
4374 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4375 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4376 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4377 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4378 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4379 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4380 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4381 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4382 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4383 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4384 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4385 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4386 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4387 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4388 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4389 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4390 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4391 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4392 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4393 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4394 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4395 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4396 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4397 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4398 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4399 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4400 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4401 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4402 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4403 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4404 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4405 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4406 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4407 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4408 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4409 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4410 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4411 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4412 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4413 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4414 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4415 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4416 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4417 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4418 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4419 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4420 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4421 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4422 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4423 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4424 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4425 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4426 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4427 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4428 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4429 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4430 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4431 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4432 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4433 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4434 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4435 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4436 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4437 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4438 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4439 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4440 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4441 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4442 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4443 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4444 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4445 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4446 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4447 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4448 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4449 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4450 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4451 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4452 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4453 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4454 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4455 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4456 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4457 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4458 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4459 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4460 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4461 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4462 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4463 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4464 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4465 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4466 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4467 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4468 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4469 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4470 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4471 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4472 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4473 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4474 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4475 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4476 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4477 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4478 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4479 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4481 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
4483 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4484 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4485 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4486 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4487 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4488 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4489 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4490 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4491 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4492 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4493 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4494 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4495 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4496 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4497 when the special functions IS is enabled, not for C++17.
4498 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4500 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4501 without checks for special functions in C++17.
4502 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4506 * include/backward/hash_map: Use <> for includes not "".
4507 * include/backward/hash_set: Likewise.
4508 * include/backward/strstream: Likewise.
4509 * include/tr1/bessel_function.tcc: Likewise.
4510 * include/tr1/exp_integral.tcc: Likewise.
4511 * include/tr1/legendre_function.tcc: Likewise.
4512 * include/tr1/modified_bessel_func.tcc: Likewise.
4513 * include/tr1/riemann_zeta.tcc: Likewise.
4515 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4517 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4518 of extension allocators.
4519 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4520 Document new headers in 7.2, 8.1 and 9.1 releases.
4521 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4522 * doc/html/*: Regenerate.
4524 2019-03-12 John David Anglin <dave.anglin@bell.net>
4527 * testsuite/lib/libstdc++.exp: Locate libatomic.
4528 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4529 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4531 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4532 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4533 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4534 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4536 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4539 * configure.ac: Check for sockatmark.
4540 * crossconfig.m4: Check for sockatmark.
4541 * config.h.in: Regenerate.
4542 * configure: Regenerate.
4543 * include/experimental/internet (address_v4::_S_hton): Rename
4544 overloaded functions to _S_hton_16 and _S_ntoh_16.
4545 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4546 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4547 * include/experimental/socket (basic_socket::at_mark): Check
4548 _GLIBCXX_HAVE_SOCKATMARK.
4550 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4551 const variables instead of macros.
4554 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4555 Use correct type for len_aligned.
4556 * testsuite/20_util/hash/89629.cc: New test.
4558 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4561 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4562 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4563 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
4564 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
4565 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
4566 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
4567 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
4568 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
4569 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
4570 memory_order_seq_cst to int.
4572 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
4574 * doc/xml/manual/using.xml: Use link element instead of xref.
4575 * doc/html/*: Regenerate.
4577 * include/bits/fs_path.h (path::format): Add fixed underlying type.
4579 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
4582 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
4583 parameters in deduction guides.
4584 * include/debug/multimap.h (multimap): Likewise.
4585 * include/debug/set.h (multimap): Likewise.
4586 * include/debug/multiset.h (multimap): Likewise.
4587 * include/debug/unordered_map (unordered_map): Likewise.
4588 (unordered_multimap): Likewise.
4589 * include/debug/unordered_set (unordered_set): Likewise.
4590 (unordered_multiset): Likewise.
4593 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
4594 Invalidate all iterators in case of rehash.
4595 (unordered_multimap<>::_M_check_rehashed): Likewise.
4596 * include/debug/unordered_set
4597 (unordered_set<>::_M_check_rehashed): Likewise.
4598 (unordered_multiset<>::_M_check_rehashed): Likewise.
4599 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
4601 2019-03-07 Andreas Schwab <schwab@suse.de>
4603 * config/abi/post/riscv64-linux-gnu: New directory.
4604 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
4606 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
4608 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
4609 compile test to run. Fix typo.
4611 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
4612 * doc/html/*: Regenerate.
4614 P0356R5 Simplified partial function application
4615 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
4616 helpers for bind_front.
4617 (bind_front, __cpp_lib_bind_front): Define.
4618 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
4620 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4622 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
4623 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
4624 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
4625 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
4627 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4629 PR libstdc++/86655 - std::assoc_legendre should not constrain
4630 the value of m (or x).
4631 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
4632 __sph_legendre): If degree > order Don't throw, return 0.
4633 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
4634 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
4635 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
4636 * testsuite/tr1/5_numerical_facilities/special_functions/
4637 02_assoc_legendre/pr86655.cc: New test.
4638 * testsuite/tr1/5_numerical_facilities/special_functions/
4639 22_sph_legendre/pr86655.cc: New test.
4641 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4644 Also PR libstdc++/85517
4645 * include/std/variant (__do_visit): New.
4646 (__variant_cast): Likewise.
4647 (__variant_cookie): Likewise.
4648 (__erased_*): Remove.
4649 (_Variant_storage::_S_vtable): Likewise.
4650 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
4651 (_Variant_storage::__M_reset): Adjust.
4652 (__variant_construct): New.
4653 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
4654 __variant_construct.
4655 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
4656 (_Move_ctor_base::__M_destructive_copy): New.
4657 (_Move_ctor_base::__M_destructive_move): Adjust to use
4658 __variant_construct.
4659 (_Copy_assign_base::operator=): Adjust to use __do_visit.
4660 (_Copy_assign_alias): Adjust to check both copy assignment
4661 and copy construction for triviality.
4662 (_Move_assign_base::operator=): Adjust to use __do_visit.
4663 (_Multi_array): Add support for visitors that accept and return
4665 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
4666 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
4667 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
4668 a __variant_cookie temporary for a variant that is valueless and..
4669 (__gen_vtable_impl::__visit_invoke): ..adjust here.
4670 (__gen_vtable::_Array_type): Conditionally make space for
4671 the __variant_cookie visitor case.
4672 (__variant_construct_by_index): New.
4673 (get_if): Adjust to use std::addressof.
4674 (relops): Adjust to use __do_visit.
4675 (variant): Add __variant_cast and __variant_construct_by_index
4677 (variant::emplace): Use _M_reset() and __variant_construct_by_index
4678 instead of self-destruction.
4679 (variant::swap): Adjust to use __do_visit.
4680 (visit): Reimplement in terms of __do_visit.
4681 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
4682 * testsuite/20_util/variant/compile.cc: Adjust.
4683 * testsuite/20_util/variant/run.cc: Likewise.
4685 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4687 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
4689 * testsuite/experimental/feat-char8_t.cc: Likewise.
4691 * include/std/type_traits [C++20] (is_bounded_array)
4692 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
4694 * testsuite/20_util/is_bounded_array/requirements/
4695 explicit_instantiation.cc: New test.
4696 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
4698 * testsuite/20_util/is_bounded_array/value.cc: New test.
4699 * testsuite/20_util/is_unbounded_array/requirements/
4700 explicit_instantiation.cc: New test.
4701 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
4703 * testsuite/20_util/is_unbounded_array/value.cc: New test.
4705 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
4707 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
4709 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
4711 * include/c_compatibility/math.h [C++20] (lerp): Add using
4713 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
4714 (__lerp): Define function template to implement lerp.
4715 (lerp(float, float, float), lerp(double, double, double))
4716 (lerp(long double, long double, long double)): Define for C++20.
4717 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
4718 (midpoint(T, T), midpoint(T*, T*)): Define.
4719 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
4720 * testsuite/26_numerics/lerp.cc: New test.
4721 * testsuite/26_numerics/midpoint/floating.cc: New test.
4722 * testsuite/26_numerics/midpoint/integral.cc: New test.
4723 * testsuite/26_numerics/midpoint/pointer.cc: New test.
4725 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
4727 PR libstdc++/88996 Implement P0439R0
4728 Make std::memory_order a scoped enumeration.
4729 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
4730 add variables for the old enumerators. Adjust calls.
4731 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
4732 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
4734 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
4736 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
4739 * include/std/memory_resource (polymorphic_allocator): Add default
4740 template argument for C++20.
4741 (polymorphic_allocator::allocate_bytes)
4742 (polymorphic_allocator::deallocate_bytes)
4743 (polymorphic_allocator::allocate_object)
4744 (polymorphic_allocator::deallocate_object)
4745 (polymorphic_allocator::new_object)
4746 (polymorphic_allocator::delete_object): New member functions for
4748 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
4751 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
4754 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
4757 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
4759 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
4760 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
4762 * include/std/memory (uses_allocator_construction_args): New set of
4763 overloaded functions.
4764 (make_obj_using_allocator, uninitialized_construct_using_allocator):
4766 * include/std/memory_resource (polymorphic_allocator::construct)
4767 [__cplusplus > 201703l]: Replace all overloads with a single function
4768 using uses_allocator_construction_args.
4769 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
4771 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
4773 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
4776 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4777 stylesheet directories before check for xsltproc. Try to use
4778 xmlcatalog to find local stylesheet directory before trying hardcoded
4779 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4780 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4781 use xsltproc if xmlcatalog fails to find a local stylesheet.
4782 * configure.ac: Check for xmlcatalog.
4783 * Makefile.in: Regenerate.
4784 * configure: Likewise.
4785 * doc/Makefile.in: Likewise.
4786 * include/Makefile.in: Likewise.
4787 * libsupc++/Makefile.in: Likewise.
4788 * po/Makefile.in: Likewise.
4789 * python/Makefile.in: Likewise.
4790 * src/Makefile.in: Likewise.
4791 * src/c++11/Makefile.in: Likewise.
4792 * src/c++17/Makefile.in: Likewise.
4793 * src/c++98/Makefile.in: Likewise.
4794 * src/filesystem/Makefile.in: Likewise.
4795 * testsuite/Makefile.in: Likewise.
4797 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4800 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4801 container deduction guides.
4802 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4803 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4804 parameters in deduction guides.
4805 * include/bits/stl_multimap.h (multimap): Likewise.
4806 * include/bits/stl_multiset.h (multiset): Likewise.
4807 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4808 * include/bits/stl_set.h (set): Likewise.
4809 * include/bits/stl_stack.h (stack): Likewise.
4810 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4811 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4812 constrain parameters in deduction guides.
4813 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4815 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4817 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4818 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4819 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4820 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4822 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4824 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4827 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4828 to class template and partial specialization using void_t.
4829 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4831 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4834 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4835 copy and move members public.
4837 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4839 * include/std/type_traits (__underlying_type_impl): New helper to
4840 make underlying_type SFINAE-friendly.
4841 (underlying_type): Derive from __underlying_type_impl.
4842 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4846 * include/bits/char_traits.h (__constant_char_array): Check index is
4847 in range before dereferencing.
4848 (char_traits<char>::compare, char_traits<char>::find)
4849 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4850 immediately if n is zero.
4851 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4852 Remove workarounds for PR 67026.
4853 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4855 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4858 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4860 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4861 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4863 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4866 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4867 type to std::size_t and argument to type to long double.
4869 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4871 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4872 * config/abi/post/sparc64-linux-gnu: New directory.
4873 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4874 * config/abi/post/sparc64-linux-gnu/32: New directory.
4875 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4877 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4879 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4880 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4883 2019-02-22 Tom Honermann <tom@honermann.net>
4885 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4886 printers for u8string and u8string_view.
4888 2019-02-22 Tom Honermann <tom@honermann.net>
4890 * testsuite/18_support/byte/ops.cc: Validate
4891 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4892 std::to_integer<char32_t>.
4893 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4894 std::numeric_limits<char8_t>.
4895 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4896 std::numeric_limits<char8_t>::lowest().
4897 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4898 std::numeric_limits<char8_t>::max_digits10.
4899 * testsuite/18_support/type_info/fundamental.cc: Validate
4900 typeinfo for char8_t.
4901 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4902 std::from_chars with char8_t.
4903 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4904 Validate explicit instantiation of std::hash<char8_t>.
4905 * testsuite/20_util/is_integral/value.cc: Validate
4906 std::is_integral<char8_t>.
4907 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4908 Validate std::make_signed<char8_t>.
4909 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4910 Validate u8string construction from char8_t sources.
4911 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4913 * testsuite/21_strings/basic_string_view/operations/compare/
4914 char/70483.cc: Validate substr operations on u8string_view.
4915 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4916 the u8string_view typedef is defined.
4917 * testsuite/21_strings/char_traits/requirements/
4918 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4920 * testsuite/21_strings/char_traits/requirements/
4921 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4922 constexpr member functions.
4923 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4924 that the u8string typedef is defined.
4925 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4926 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4927 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4928 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4930 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4931 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4933 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4934 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4935 Validate std::atomic<char8_t>::is_always_lock_free
4936 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4937 Update line numbers.
4938 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4940 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4942 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4943 Validate std::experimental::pmr::u8string.
4944 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4945 u8string_view typedef is defined.
4946 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4947 char32_t to the typelists.
4949 2019-02-22 Tom Honermann <tom@honermann.net>
4951 * include/ext/typelist.h: Constrain a partial specialization of
4952 typelist::detail::append_ to only match chain<T1,T2>.
4954 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4957 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4958 class template with class. Replace move and copy member types with
4959 member alias templates, so they are only instantiated when needed.
4960 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4961 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4962 test for C++11/14/17 as well.
4963 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4966 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4969 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4970 _GLIBCXX_PURE to the alias declaration.
4972 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4974 * testsuite/21_strings/basic_string/literals/types.cc
4975 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4976 * testsuite/21_strings/basic_string/literals/values.cc
4977 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4978 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4979 potentially having different type.
4980 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4981 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4983 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4984 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4985 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4986 string literals only using basic character set.
4987 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4988 u8 literals to char.
4989 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4990 Test ATOMIC_CHAR8_T_LOCK_FREE.
4991 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4992 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4993 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4994 * testsuite/experimental/string_view/literals/types.cc
4995 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4997 * testsuite/experimental/string_view/literals/values.cc
4998 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5000 2019-02-19 Tom Honermann <tom@honermann.net>
5002 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
5003 from char16_32_t.cc; validates numeric_limits<char8_t>.
5004 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
5005 test cloned from types.cc; validates operator""s for char8_t
5007 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
5008 test cloned from values.cc; validates construction and comparison
5010 * testsuite/21_strings/basic_string/requirements/
5011 /explicit_instantiation/char8_t/1.cc: New test cloned from
5012 char16_t/1.cc; validates explicit instantiation of
5013 basic_string<char8_t>.
5014 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
5015 New test cloned from types.cc; validates operator""sv for char8_t
5016 returns u8string_view.
5017 * testsuite/21_strings/basic_string_view/literals/
5018 values-char8_t.cc: New test cloned from values.cc; validates
5019 construction and comparison of u8string_view values.
5020 * testsuite/21_strings/basic_string_view/requirements/
5021 explicit_instantiation/char8_t/1.cc: New test cloned from
5022 char16_t/1.cc; validates explicit instantiation of
5023 basic_string_view<char8_t>.
5024 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
5025 New test cloned from char16_t/65049.cc; validates that
5026 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
5027 * testsuite/21_strings/char_traits/requirements/char8_t/
5028 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
5029 that char_traits<char8_t> member typedefs are present and correct.
5030 * testsuite/21_strings/char_traits/requirements/
5031 explicit_instantiation/char8_t/1.cc: New test cloned from
5032 char16_t/1.cc; validates explicit instantiation of
5033 char_traits<char8_t>.
5034 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
5035 from char16_t.cc: validates
5036 codecvt<char16_t, char8_t, mbstate_t>.
5037 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
5038 from char32_t.cc: validates
5039 codecvt<char32_t, char8_t, mbstate_t>.
5040 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
5041 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
5042 codecvt<char32_t, char8_t, std::mbstate_t>.
5043 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
5044 test cloned from string.cc; validates filesystem::path construction
5046 * testsuite/experimental/feat-char8_t.cc: New test; validates that
5047 the __cpp_lib_char8_t feature test macro is defined with the
5049 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
5050 New test cloned from string.cc; validates filesystem::path
5051 construction from char8_t input.
5052 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
5053 test cloned from types.cc; validates operator""sv for char8_t
5054 returns u8string_view.
5055 * testsuite/experimental/string_view/literals/values-char8_t.cc:
5056 New test cloned from values.cc; validates construction and
5057 comparison of u8string_view values.
5058 * testsuite/experimental/string_view/requirements/
5059 explicit_instantiation/char8_t/1.cc: New test cloned from
5060 char16_t/1.cc; validates explicit instantiation of
5061 basic_string_view<char8_t>.
5062 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
5063 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
5066 2019-02-19 Tom Honermann <tom@honermann.net>
5068 P0482R5 char8_t: Standard library support
5069 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
5070 typeinfo symbols for char8_t.
5071 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
5072 (GLIBCXX_3.4.26): Add symbols for specializations of
5073 numeric_limits and codecvt that involve char8_t.
5074 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
5075 * include/bits/atomic_base.h: Add atomic_char8_t.
5076 * include/bits/basic_string.h: Add std::hash<u8string> and
5077 operator""s(const char8_t*, size_t).
5078 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
5080 * include/bits/char_traits.h: Add char_traits<char8_t>.
5081 * include/bits/codecvt.h: Add
5082 codecvt<char16_t, char8_t, mbstate_t>,
5083 codecvt<char32_t, char8_t, mbstate_t>,
5084 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5085 codecvt_byname<char32_t, char8_t, mbstate_t>.
5086 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
5087 recognize char8_t as an integral type.
5088 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
5090 (path::u8string): Return std::u8string when char8_t support is
5092 (path::generic_u8string): Likewise.
5093 (path::_S_convert): Handle conversion from char8_t input.
5094 (path::_S_str_convert): Likewise.
5095 * include/bits/functional_hash.h: Add hash<char8_t>.
5096 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
5098 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
5099 for new char8_t specializations.
5100 * include/bits/localefwd.h: Add missing declarations of
5101 codecvt<char16_t, char, mbstate_t> and
5102 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
5103 codecvt<char16_t, char8_t, mbstate_t> and
5104 codecvt<char32_t, char8_t, mbstate_t>.
5105 * include/bits/postypes.h: Add u8streampos
5106 * include/bits/stringfwd.h: Add declarations of
5107 char_traits<char8_t> and u8string.
5108 * include/c_global/cstddef: Add __byte_operand<char8_t>.
5109 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
5111 (path::u8string): Return std::u8string when char8_t support is
5113 (path::generic_u8string): Likewise.
5114 (path::_S_convert): Handle conversion from char8_t input.
5115 (path::_S_str_convert): Likewise.
5116 * include/experimental/string: Add u8string.
5117 * include/experimental/string_view: Add u8string_view,
5118 hash<experimental::u8string_view>, and
5119 operator""sv(const char8_t*, size_t).
5120 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
5121 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
5122 as a character type.
5123 * include/std/limits: Add numeric_limits<char8_t>.
5124 * include/std/string_view: Add u8string_view,
5125 hash<experimental::u8string_view>, and
5126 operator""sv(const char8_t*, size_t).
5127 * include/std/type_traits: Add __is_integral_helper<char8_t>,
5128 __make_unsigned<char8_t>, and __make_signed<char8_t>.
5129 * libsupc++/atomic_lockfree_defines.h: Define
5130 ATOMIC_CHAR8_T_LOCK_FREE.
5131 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
5132 codecvt.cc and limits.cc so that char8_t specializations of
5133 numeric_limits and codecvt and emitted.
5134 * src/c++11/Makefile.in: Likewise.
5135 * src/c++11/codecvt.cc: Define members of
5136 codecvt<char16_t, char8_t, mbstate_t>,
5137 codecvt<char32_t, char8_t, mbstate_t>,
5138 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5139 codecvt_byname<char32_t, char8_t, mbstate_t>.
5140 * src/c++11/limits.cc: Define members of
5141 numeric_limits<char8_t>.
5142 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
5143 locale_init.cc and localename.cc.
5144 * src/c++98/Makefile.in: Likewise.
5145 * src/c++98/locale_init.cc: Add initialization for the
5146 codecvt<char16_t, char8_t, mbstate_t> and
5147 codecvt<char32_t, char8_t, mbstate_t> facets.
5148 * src/c++98/localename.cc: Likewise.
5149 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
5151 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
5153 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
5154 * 27_io/filesystem/operations/resize_file.cc: Likewise.
5155 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
5157 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
5159 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
5160 * doc/html/*: Regenerate.
5162 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
5163 * doc/html/*: Regenerate.
5165 * doc/xml/manual/intro.xml: Document LWG 2586 status.
5166 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
5167 allocator type in is_constructible checks.
5168 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
5169 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
5170 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
5171 problematic type from LWG 2586 discussion.
5172 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
5173 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
5175 * configure.ac: Check for C11 timespec_get function.
5176 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
5178 * config.h.in: Regenerate.
5179 * configure: Regenerate.
5180 * include/c_global/ctime (timespec, timespec_get): Add to namespace
5181 std for C++17 and up.
5183 * doc/xml/manual/intro.xml: Document LWG 2537 status.
5184 * include/bits/stl_queue.h
5185 (priority_queue(const Compare&, const Container&, const Alloc&))
5186 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
5188 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
5190 * doc/xml/manual/intro.xml: Document LWG 2566 status.
5191 * include/bits/stl_queue.h (queue, priority_queue): Add static
5192 assertions to enforce LWG 2566 requirement on value_type.
5193 * include/bits/stl_stack.h (stack): Likewise.
5196 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
5198 * doc/xml/manual/intro.xml: Document LWG 2735 status.
5199 * include/bits/std_abs.h: Add comment about LWG 2735.
5200 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
5202 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
5205 * include/std/version [__cpp_impl_destroying_delete]
5206 (__cpp_lib_destroying_delete): Only define for C++2a and later.
5207 * libsupc++/new [__cpp_impl_destroying_delete]
5208 (__cpp_lib_destroying_delete): Likewise.
5209 (destroying_delete_t, destroying_delete): Likewise, but define even
5210 when __cpp_impl_destroying_delete is not defined.
5211 * testsuite/18_support/destroying_delete.cc: New test.
5213 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
5216 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
5217 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
5218 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
5219 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
5221 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
5224 * include/bits/fs_path.h (path::has_root_name)
5225 (path::has_root_directory, path::has_root_path)
5226 (path::has_relative_path, path::has_parent_path)
5227 (path::has_filename, path::has_stem, path::has_extension)
5228 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
5230 * src/c++17/fs_path.cc (path::has_root_name)
5231 (path::has_root_directory, path::has_root_path)
5232 (path::has_relative_path, path::has_parent_path)
5233 (path::has_filename, path::_M_find_extension): Add noexcept.
5235 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
5237 PR libstdc++/89102 (partial)
5238 * include/std/type_traits (common_type<>): Define.
5239 (common_type<T>): Derive from common_type<T, T>.
5240 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
5241 Test zero-length template argument list.
5242 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
5243 Test additional single argument cases.
5244 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
5245 Adjust expected error.
5247 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
5250 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
5252 * include/bits/stl_stack.h (stack): Likewise.
5253 * testsuite/23_containers/priority_queue/deduction.cc: New test.
5254 * testsuite/23_containers/queue/deduction.cc: New test.
5255 * testsuite/23_containers/stack/deduction.cc: New test.
5258 * include/std/type_traits (__is_convertible_helper)
5259 (__is_convertible_helper<_From, _To, false>): Revert changes to
5260 support is_nothrow_convertible.
5261 (__is_nt_convertible_helper): New helper.
5262 (is_nothrow_convertible): Use __is_nt_convertible_helper.
5264 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
5265 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
5268 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
5269 __is_alloc_insertable_impl. Replace single type member with two
5270 members, one for each of copy and move insertable.
5271 (__is_move_insertable): New trait for internal use.
5272 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
5273 (vector::_S_nothrow_relocate(true_type)): New functions to
5274 conditionally check if __relocate_a can throw.
5275 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
5276 on __is_move_insertable.
5277 (vector::_S_do_relocate): New overloaded functions to conditionally
5279 (vector::_S_relocate): New function that dispatches to _S_do_relocate
5280 based on _S_use_relocate.
5281 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5282 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
5283 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
5286 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
5287 parameter unnamed. Add message to static assertion.
5288 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5289 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
5292 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
5295 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
5297 (__is_bitwise_relocatable): ... to this.
5298 (__relocate_a_1): Adapt.
5299 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
5300 (__is_bitwise_relocatable): ... to this.
5302 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
5305 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
5306 final component as well as from _M_pathname. Append the dot using
5307 operator+= instead of only to _M_pathname.
5308 (path::_M_find_extension): Reformat slightly.
5309 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5310 Add more test cases.
5312 2019-01-30 Ulrich Drepper <drepper@redhat.com>
5314 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
5316 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
5318 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
5319 constexpr specifiers from arg and proj.
5321 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
5322 __shared_ptr instantiations used by gcc4-compatible ABI.
5324 * include/experimental/forward_list (experimental::erase): Qualify
5326 * include/experimental/list (experimental::erase): Likewise.
5327 * include/std/forward_list (std::erase): Likewise.
5328 * include/std/list (std::erase): Likewise.
5330 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
5332 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
5333 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
5334 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
5335 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
5336 * testsuite/ext/array_allocator/26875.cc: Likewise.
5337 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
5338 * testsuite/util/replacement_memory_operators.h: Likewise.
5339 * testsuite/util/testsuite_allocator.h: Likewise.
5341 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
5342 normal mode vector, even for debug mode.
5343 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
5344 Define alias template for normal mode vector.
5346 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
5349 * config/locale/generic/c_locale.h (__convert_from_v)
5350 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5351 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5352 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
5353 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5355 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
5358 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
5359 data member with static member function _S_use_relocate().
5360 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5361 (vector::_M_default_append): Use _S_use_relocate() instead of
5364 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
5367 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
5370 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
5371 write to stderr instead of using printf.
5373 2019-01-21 Jakub Jelinek <jakub@redhat.com>
5376 * include/bits/char_traits.h (__constant_string_p,
5377 __constant_char_array_p): Use __builtin_is_constant_evaluated if
5380 2019-01-20 Ulrich Drepper <drepper@redhat.com>
5382 Implement C++20 P0600r1.
5383 * include/backward/hash_map: Add nodiscard attribute to empty.
5384 * include/backward/hash_set: Likewise.
5385 * backward/hashtable.h: Likewise.
5386 * include/bits/basic_string.h: Likewise.
5387 * include/bits/forward_list.h: Likewise.
5388 * include/bits/hashtable.h: Likewise.
5389 * include/bits/regex.h: Likewise.
5390 * include/bits/stl_deque.h: Likewise.
5391 * include/bits/stl_list.h: Likewise.
5392 * include/bits/stl_map.h: Likewise.
5393 * include/bits/stl_multimap.h: Likewise.
5394 * include/bits/stl_multiset.h: Likewise.
5395 * include/bits/stl_queue.h: Likewise.
5396 * include/bits/stl_set.h: Likewise.
5397 * include/bits/stl_stack.h: Likewise.
5398 * include/bits/stl_tree.h: Likewise.
5399 * include/bits/stl_vector.h: Likewise.
5400 * include/bits/unordered_map.h: Likewise.
5401 * include/bits/unordered_set.h: Likewise.
5402 * include/debug/array: Likewise.
5403 * include/experimental/any: Likewise.
5404 * include/experimental/bits/fs_path.h: Likewise.
5405 * include/experimental/internet: Likewise.
5406 * include/experimental/string_view: Likewise.
5407 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
5409 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
5411 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
5413 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
5415 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
5417 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
5419 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
5421 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
5423 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5424 info_fn_imps.hpp: Likewise.
5425 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5426 left_child_next_sibling_heap_.hpp: Likewise.
5427 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
5429 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
5431 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
5433 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
5435 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
5437 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
5439 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
5441 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
5442 * include/ext/pb_ds/trie_policy.hpp: Likewise.
5443 * include/ext/rope: Likewise.
5444 * include/ext/slist: Likewise.
5445 * include/ext/vstring.h: Likewise.
5446 * include/profile/array: Likewise.
5447 * include/std/array: Likewise.
5448 * include/tr1/array: Likewise.
5449 * include/tr1/hashtable.h: Likewise.
5450 * include/tr1/regex: Likewise.
5451 * include/tr2/dynamic_bitset: Likewise.
5452 * include/bits/alloc_traits.h: Add nodiscard attribute to
5454 * include/experimental/memory_resource: Likewise.
5455 * include/ext/alloc_traits.h: Likewise.
5456 * include/ext/array_allocator.h: Likewise.
5457 * include/ext/bitmap_allocator.h: Likewise.
5458 * include/ext/debug_allocator.h: Likewise.
5459 * include/ext/extptr_allocator.h: Likewise.
5460 * include/ext/mt_allocator.h: Likewise.
5461 * include/ext/new_allocator.h: Likewise.
5462 * include/ext/pool_allocator.h: Likewise.
5463 * include/ext/throw_allocator.h: Likewise.
5464 * include/std/scoped_allocator: Likewise.
5465 * libsupc++/eh_alloc.cc: Likewise.
5466 * include/std/future: Add nodiscard attribute to async.
5467 * libsupc++/new: Add nodiscard attribute to new.
5469 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
5474 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
5475 * include/bits/shared_ptr.h
5476 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
5477 (allocate_shared): Change to use new tag type.
5478 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
5479 Declare new member function.
5480 (_Sp_alloc_shared_tag): Define new type.
5481 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
5482 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
5483 _Sp_make_shared_tag::_S_eq to check type_info.
5484 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5485 Constrain to prevent being called with _Sp_alloc_shared_tag.
5486 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5487 Replace constructor with ...
5488 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5489 reference parameter so address of the new object can be returned to
5490 the caller. Obtain the allocator from the tag type.
5491 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5492 constructor with ...
5493 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5494 to the __shared_count constructor.
5495 (__allocate_shared): Change to use new tag type.
5496 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5498 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5500 * src/c++17/fs_ops.cc
5501 (equivalent(const path&, const path&, error_code&))
5502 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5503 compare files instead of relying on incomplete info returned by stat.
5506 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5507 if the path is already absolute.
5508 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5509 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5512 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5513 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5514 of filesystem::exists.
5515 (create_directories(const path&, error_code&)): Add assertions.
5516 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5517 Add workaround for bug in _wstat for paths with trailing slash.
5518 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5519 for expected behaviour on mingw.
5520 * testsuite/experimental/filesystem/operations/create_directories.cc:
5522 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5523 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5524 not test permissions on mingw targets.
5526 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5528 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5529 constructors and open members taking wide strings. Fix patterns for
5530 filesystem::path members to match wstring_view parameters. Add
5531 exports for shared_ptr members used by directory iterators.
5532 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5533 error code parameter if the file doesn't exist.
5534 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5536 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5537 values for mingw targets, where "/" is not an absolute path. Do not
5538 test symlinks on mingw targets.
5539 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5540 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5542 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5543 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5544 that each component of the path is created.
5545 * testsuite/experimental/filesystem/operations/create_directories.cc:
5547 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5548 permissions on mingw targets.
5549 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5550 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5551 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5552 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5554 * testsuite/experimental/filesystem/operations/permissions.cc:
5556 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5557 symlinks or permissions on mingw targets.
5558 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5559 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5560 symlinks on mingw targets.
5561 * testsuite/experimental/filesystem/operations/remove_all.cc:
5563 * testsuite/27_io/filesystem/operations/status.cc: Do not test
5564 permissions on mingw targets.
5565 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
5566 test symlinks on mingw targets.
5567 * testsuite/experimental/filesystem/operations/space.cc: Fix test
5570 2019-02-14 Ulrich Drepper <drepper@redhat.com>
5573 Warn about unused comparisons of shared_ptr/unique_ptr
5574 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
5575 * include/bits/shared_ptr.h: Use it for operator ==, !=,
5576 <, <=, >, >= for shared_ptr.
5577 * include/bits/unique_ptr.h: Likewise for unique_ptr.
5579 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
5581 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
5582 as 201611L, because P0497R0 changes are supported.
5583 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
5585 * include/bits/erase_if.h [__cplusplus > 201703L]
5586 (__cpp_lib_erase_if): Only define for C++2a.
5587 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5588 (__cpp_lib_null_iterators): Define.
5589 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5590 (__cpp_lib_null_iterators): Define.
5591 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
5593 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
5595 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
5597 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
5598 changes are supported.
5599 * include/std/optional (__cpp_lib_optional): Likewise.
5600 * include/std/variant (__cpp_lib_variant): Likewise.
5601 * include/std/version [!__STRICT_ANSI__]
5602 (__cpp_lib_uncaught_exceptions): Define as long integer.
5603 [__cplusplus >= 201703L] (__cpp_lib_any)
5604 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
5605 (__cpp_lib_variant): Define for C++17.
5606 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
5608 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
5611 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
5613 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
5617 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
5619 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
5622 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5624 * doc/xml/manual/intro.xml: Include new section.
5625 * doc/xml/manual/status_cxx2017.xml: Document more
5626 implementation-defined properties of the library.
5627 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
5628 * doc/html/*: Regenerate.
5630 * include/bits/refwrap.h [__cplusplus > 201703L]
5631 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
5632 (_Reference_wrapper_base_memfun): Do not define for C++2a.
5633 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
5635 (reference_wrapper::operator()): Add static assertion.
5636 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
5638 * include/std/chrono (duration_values::zero(), duration_values::min())
5639 (duration_values::max()): Add noexcept.
5640 (duration::zero(), duration::min(), duration::max()): Likewise.
5641 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
5642 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
5643 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
5645 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
5647 2019-01-11 Jakub Jelinek <jakub@redhat.com>
5649 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
5650 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
5652 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5655 * include/bits/functional_hash.h (hash<nullptr_t>): Define
5656 specialization for C++17 (P0513R0, LWG 2817).
5657 * testsuite/20_util/hash/nullptr.cc: New test.
5660 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
5661 pattern for std::basic_stringbuf::str().
5663 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
5664 basic_ostream::operator<< patterns.
5666 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5668 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
5669 test failures on targets with 32-bit time_t.
5671 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
5672 * include/std/deque: Likewise.
5673 * include/std/forward_list: Likewise.
5674 * include/std/list: Likewise.
5675 * include/std/string: Likewise.
5676 * include/std/vector: Likewise.
5677 * include/std/version: Likewise.
5678 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
5679 * testsuite/23_containers/deque/erasure.cc: Likewise.
5680 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5681 * testsuite/23_containers/list/erasure.cc: Likewise.
5682 * testsuite/23_containers/map/erasure.cc: Likewise.
5683 * testsuite/23_containers/set/erasure.cc: Likewise.
5684 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5685 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5686 * testsuite/23_containers/vector/erasure.cc: Likewise.
5688 * include/experimental/internet [AI_NUMERICSERV]
5689 (resolver_base::numeric_service): Define conditionally.
5690 * testsuite/experimental/net/internet/resolver/base.cc: Test it
5692 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
5695 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
5696 Jonathan Wakely <jwakely@redhat.com>
5699 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
5700 (GLIBCXX_3.4.26): Add new exports.
5701 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
5702 correct list of sources.
5703 * include/Makefile.in: Regenerate.
5704 * include/std/ostream (operator<<(nullptr_t)): New member function.
5705 * src/c++17/ostream-inst.cc: New file.
5706 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
5709 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5711 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
5712 of the source file containing the caller.
5713 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
5714 directories created by test.
5715 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5717 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5719 * testsuite/experimental/filesystem/iterators/
5720 recursive_directory_iterator.cc: Likewise.
5722 2019-01-10 Jakub Jelinek <jakub@redhat.com>
5724 PR tree-optimization/88775
5725 * include/bits/stl_function.h (greater<_Tp*>::operator(),
5726 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
5727 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
5728 instead of __builtin_constant_p if available. Don't bother with
5729 the pointer comparison in C++11 and earlier.
5731 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5735 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
5738 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
5740 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
5741 for filesystem::path. Give variables more distinctive names.
5743 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
5744 member function to perform non-trivial assignment.
5745 (_Optional_payload_base::_M_move_assign): Likewise.
5746 (_Optional_payload<T, true, false, true>::operator=)
5747 (_Optional_payload<T, true, true, false>::operator=)
5748 (_Optional_payload<T, true, false, false>::operator=): Call
5749 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
5752 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
5753 test std::complex<long double> if long double format is IBM128.
5754 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
5757 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5759 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
5760 for old std::unique_ptr layout.
5761 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
5762 to become valueless. Add filesystem::path tests.
5765 * include/std/optional (_Optional_payload_base): New class template
5766 for common code hoisted from _Optional_payload specializations. Use
5767 a template for the union, to allow a partial specialization for
5768 types with non-trivial destructors. Add constructors for in-place
5769 initialization to the union.
5770 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
5771 to perform non-trivial copy construction, instead of relying on
5772 non-standard copy elision in a delegating constructor.
5773 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
5774 non-trivial move construction.
5775 (_Optional_payload): Derive from _Optional_payload_base and use it
5776 for everything except the non-trivial assignment operators, which are
5778 (_Optional_payload<false, C, M>): Derive from the specialization
5779 _Optional_payload<true, false, false> and add a destructor.
5780 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5781 Forward to corresponding members of _Optional_payload.
5782 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5783 Hoist common members from _Optional_base.
5784 (_Optional_base): Make all members and base class public.
5785 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5786 _Optional_base_impl.
5787 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5788 support for new std::optional layout.
5789 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5792 * include/bits/locale_conv.h: Use <> for includes not "".
5793 * include/ext/random: Likewise.
5794 * include/ext/vstring.h: Likewise.
5796 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5798 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5799 (GLIBCXX_3.4.21): Likewise.
5801 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5804 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5805 to match the one that controls whether utimbuf and utime are declared.
5807 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5810 * include/bits/char_traits.h (char_traits::move): Do not pass null
5811 pointers to memmove.
5812 * include/bits/locale_facets.h
5813 (ctype<char>::widen(const char*, const char*, char*)): Do not
5814 pass null pointers to memcpy.
5815 (ctype<char>::narrow(const char*, const char*, char, char*)):
5817 (ctype<char>::do_widen(const char*, const char*, char*)):
5819 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5822 * doc/xml/manual/spine.xml: Update copyright years.
5823 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5824 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5825 for C++17 filesystem library.
5826 * doc/html/*: Regenerate.
5828 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5829 * config.h.in: Regenerate.
5830 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5831 alphabetically and add missing entries for copy_symlink,
5832 hard_link_count, rename, and resize_file.
5833 * configure: Regenerate.
5834 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5835 used unconditionally.
5836 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5837 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5838 supports truncating to zero length.
5839 * testsuite/27_io/filesystem/operations/all.cc: New test.
5840 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5842 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5845 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5846 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5847 * config.h.in: Regenerate.
5848 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5849 remaining std::filesystem types and functions.
5850 * configure: Regenerate.
5851 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5852 * src/c++17/Makefile.in: Regenerate.
5853 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5854 here, and change name of included file.
5855 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5856 here, and change name of included file.
5857 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5858 path to dir-common.h.
5859 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5860 path to ops-common.h. Disable -Wunused-parameter warnings.
5861 (internal_file_clock): Define unconditionally.
5862 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5864 (do_copy_file, do_space): Move definitions to ops.common.h.
5865 (copy, file_size, hard_link_count, last_write_time, space): Only
5866 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5868 (last_write_time, read_symlink): Remove unused attributes from
5870 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5871 * src/filesystem/Makefile.in: Regenerate.
5872 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5873 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5874 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5875 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5876 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5877 dummy types and functions instead of using #error.
5878 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5879 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5881 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5882 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5883 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5884 to account for new namespace.
5885 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5886 -lstdc++fs from dg-options.
5887 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5888 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5889 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5890 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5891 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5893 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5894 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5896 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5897 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5898 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5899 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5900 * testsuite/27_io/filesystem/operations/create_directories.cc:
5902 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5903 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5904 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5905 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5906 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5907 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5908 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5909 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5910 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5911 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5912 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5913 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5914 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5915 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5916 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5917 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5918 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5919 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5921 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5925 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5926 typeinfo and vtables less greedy.
5927 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5928 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5929 * src/c++17/Makefile.in: Regenerate.
5930 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5931 here, and change name of included file.
5932 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5933 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5935 * src/filesystem/Makefile.in: Regenerate.
5936 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5937 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5938 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5939 from dg-options and remove dg-require-filesystem-ts.
5940 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5941 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5942 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5943 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5944 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5945 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5946 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5947 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5948 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5949 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5950 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5951 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5952 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5953 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5954 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5955 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5956 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5957 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5958 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5959 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5960 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5962 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5963 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5964 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5965 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5966 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5967 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5968 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5969 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5970 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5971 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5972 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5973 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5975 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5977 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5979 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5981 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5982 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5983 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5984 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5985 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5986 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5987 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5988 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5989 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5990 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5992 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5993 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5994 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5995 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5996 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5999 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
6000 Check is_trivially_copyable instead of is_scalar.
6001 (variant::emplace<N, Args>(Args&&...)): If construction of the new
6002 contained value can throw and its type is trivially copyable then
6003 construct into a temporary variant and move from it, to provide the
6004 strong exception safety guarantee.
6005 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
6007 * testsuite/20_util/variant/87431.cc: New test.
6008 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
6009 conversion causes valueless state.
6012 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
6013 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
6014 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
6015 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
6016 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
6018 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
6020 * include/bits/fs_fwd.h (__file_clock): Define new clock.
6021 (file_time_type): Redefine in terms of __file_clock.
6022 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
6024 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
6026 (internal_file_lock): New helper type for accessing __file_clock.
6027 (do_copy_file): Use internal_file_lock to convert system time to
6029 (last_write_time(const path&, error_code&)): Likewise.
6030 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
6032 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
6034 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
6035 for const member functions of std::basic_string.
6036 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
6038 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
6039 Make non-standard constructor private.
6040 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
6042 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
6043 explicit instantiations for C++17 as well as earlier dialects.
6044 * src/c++17/Makefile.am: Add new source files.
6045 * src/c++17/Makefile.in: Regenerate.
6046 * src/c++17/cow-string-inst.cc: New file defining explicit
6047 instantiations for basic_string member functions added in C++17.
6048 * src/c++17/string-inst.cc: Likewise.
6050 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
6051 copy/move constructors for old std::basic_string.
6052 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
6053 (basic_string::reference, basic_string::const_reference): Define
6054 as plain references for C++11 and later.
6055 (basic_string::basic_string()): Put constructor body outside
6056 preprocessor conditional groups.
6057 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
6058 instead of copying it.
6059 (basic_string::basic_string(const basic_string&, const _Alloc&)):
6061 (basic_string::basic_string(basic_string&&, const _Alloc&)):
6063 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
6064 cases for old basic_string.
6065 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
6066 allocator-extended constructors unconditionally. Add extra members to
6067 allocator type when using old string ABI.
6068 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
6070 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
6072 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
6073 -fno-inline added to test flags.
6075 * testsuite/21_strings/basic_string/requirements/
6076 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
6078 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
6079 assertion failures with old std::string ABI.
6081 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
6083 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
6084 functions that will only erase elements at the end.
6085 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
6086 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
6087 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
6089 (path::_List::pop_back()): Define.
6090 (path::_List::_M_erase_from(const_iterator)): Define.
6091 (path::operator/=(const path&)): Use pop_back to remove last component
6092 and _M_erase_from to remove multiple components.
6093 (path::_M_append(basic_string_view<value_type>)): Likewise.
6094 (path::operator+=(const path&)): Likewise.
6095 (path::_M_concat(basic_string_view<value_type>)): Likewise.
6096 (path::remove_filename()): Likewise.
6097 (path::lexically_normal()): Use _List::_Impl iterators instead of
6098 path::iterator. Use pop_back to remove components from the end. Clear
6099 trailing filename, instead of using erase(const_iterator) to remove
6100 a non-final component.
6101 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
6103 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
6105 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
6106 incorrect treatment of empty filename after trailing slash.
6107 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
6109 * testsuite/21_strings/basic_string/modifiers/assign/char/
6110 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
6112 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
6113 move_assign_optim.cc: Likewise.
6115 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6116 Jakub Jelinek <jakub@redhat.com>
6119 * include/experimental/memory: Replace UTF-8 quote characters.
6120 * include/std/future: Replace UTF-8 "em dash" characters.
6122 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6125 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
6126 * include/debug/forward_list: Likewise.
6127 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
6129 * include/experimental/chrono: Likewise.
6130 * include/experimental/functional: Likewise.
6131 * include/experimental/ratio: Likewise.
6132 * include/experimental/system_error: Likewise.
6133 * include/experimental/tuple: Likewise.
6134 * include/experimental/type_traits: Likewise.
6135 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
6136 * include/parallel/multiseq_selection.h: Likewise.
6139 * config/abi/pre/gnu.ver: Add missing exports.
6140 * testsuite/22_locale/collate_byname/88681.cc: New test.
6141 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
6142 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
6144 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
6146 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
6147 initializer_list<value_type> and from input iterator ranges.
6148 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
6150 * testsuite/experimental/string_view/element_access/char/empty.cc:
6151 Fix year range in copyright header.
6153 2019-01-02 Joel Brobecker <brobecker@adacore.com>
6155 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
6156 Fix year range in copyright header.
6158 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6160 Update copyright years.
6162 Copyright (C) 2019 Free Software Foundation, Inc.
6164 Copying and distribution of this file, with or without modification,
6165 are permitted in any medium without royalty provided the copyright
6166 notice and this notice are preserved.