1 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
2 Jonathan Wakely <jwakely@redhat.com>
4 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
5 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
6 deallocate node if insertion fails.
7 (_Hashtable::_M_insert_multi_node): Likewise.
8 (_Hashtable::_M_reinsert_node): Pass additional key argument.
9 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
10 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
11 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
12 (_Hashtable::extract(const _Key&)): Likewise.
13 (_Hashtable::_M_merge_unique): Pass additional key argument.
14 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
16 (_Hashtable::_M_insert): Likewise.
17 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
18 (_Hashtable_alloc): Add comments to functions with misleading names.
20 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
22 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
24 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
25 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
26 header for std::allocator.
27 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
28 using-declaration for std::size_t.
29 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
31 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
33 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
34 * testsuite/experimental/map/erasure.cc: Include <string> for
36 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
38 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
40 * include/experimental/type_traits (experimental::nonesuch): Use
41 pragma to disable -Wctor-dtor-privacy warnings.
42 * include/std/type_traits (__is_convertible_helper<From, To, false>)
43 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
45 * include/std/version (__cpp_lib_bind_front): Add missing macro.
47 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
49 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
50 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
51 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
52 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
54 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
55 (variant::emplace): Change static_assert messages from "should be"
57 (hash<monostate>::operator()): Remove name of unused parameter.
59 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
62 * include/Makefile.am: Add new <bits/charconv.h> header.
63 * include/Makefile.in: Regenerate.
64 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
65 (to_string(long), to_string(unsigned long), to_string(long long))
66 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
67 * include/bits/charconv.h: New header.
68 (__detail::__to_chars_len): Move here from <charconv>.
69 (__detail::__to_chars_10_impl): New function extracted from
70 __detail::__to_chars_10.
71 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
72 (__to_chars_unsigned_type): New class template that reuses
73 __make_unsigned_selector_base::__select to pick a type.
74 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
75 (__detail::__to_chars_len): Move to new header.
76 (__detail::__to_chars_10): Add inline specifier. Move code doing the
77 output to __detail::__to_chars_10_impl and call that.
78 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
79 * testsuite/21_strings/basic_string/numeric_conversions/char/
80 to_string.cc: Fix reference in comment. Remove unused variable.
81 * testsuite/21_strings/basic_string/numeric_conversions/char/
82 to_string_int.cc: New test.
84 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
86 Fix ConstexprIterator requirements tests - No constexpr algorithms!
87 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
88 Replace copy with hand-rolled loop.
89 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
92 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
94 Test for C++20 p0858 - ConstexprIterator requirements.
95 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
97 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
100 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
102 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
104 * include/bits/c++config: Rename all macros of the form __PSTL* to
106 * include/std/algorithm: Likewise.
107 * include/std/execution: Likewise.
108 * include/std/numeric: Likewise.
109 * include/std/memory: Likewise.
110 * include/pstl/glue_memory_impl.h: Likewise.
111 * include/pstl/numeric_impl.h: Likewise.
112 * include/pstl/glue_memory_defs.h: Likewise.
113 * include/pstl/execution_defs.h: Likewise.
114 * include/pstl/utils.h: Likewise.
115 * include/pstl/algorithm_fwd.h: Likewise.
116 * include/pstl/unseq_backend_simd.h: Likewise.
117 * include/pstl/glue_execution_defs.h: Likewise.
118 * include/pstl/algorithm_impl.h: Likewise.
119 * include/pstl/parallel_impl.h: Likewise.
120 * include/pstl/memory_impl.h: Likewise.
121 * include/pstl/glue_numeric_defs.h: Likewise.
122 * include/pstl/parallel_backend_utils.h: Likewise.
123 * include/pstl/glue_algorithm_defs.h: Likewise.
124 * include/pstl/parallel_backend.h: Likewise.
125 * include/pstl/glue_numeric_impl.h: Likewise.
126 * include/pstl/parallel_backend_tbb.h: Likewise.
127 * include/pstl/numeric_fwd.h: Likewise.
128 * include/pstl/glue_algorithm_impl.h: Likewise.
129 * include/pstl/execution_impl.h: Likewise.
130 * include/pstl/pstl_config.h: Likewise.
131 * testsuite/util/pstl/pstl_test_config.h: Likewise.
132 * testsuite/util/pstl/test_utils.h: Likewise.
133 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
135 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
137 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
139 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
140 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
141 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
142 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
143 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
145 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
146 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
147 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
148 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
149 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
151 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
152 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
153 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
154 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
155 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
157 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
158 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
159 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
161 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
163 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
164 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
165 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
167 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
169 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
171 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
173 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
175 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
177 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
179 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
181 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
183 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
185 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
187 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
189 Rename header guards to be consistent with upstream project's
191 * include/pstl/glue_memory_impl.h: Rename all macros of the form
192 _PSTL_(.*)_H to _PSTL_\U\1_H.
193 * include/pstl/numeric_impl.h: Likewise.
194 * include/pstl/glue_memory_defs.h: Likewise.
195 * include/pstl/execution_defs.h: Likewise.
196 * include/pstl/utils.h: Likewise.
197 * include/pstl/algorithm_fwd.h: Likewise.
198 * include/pstl/unseq_backend_simd.h: Likewise.
199 * include/pstl/glue_execution_defs.h: Likewise.
200 * include/pstl/algorithm_impl.h: Likewise.
201 * include/pstl/parallel_impl.h: Likewise.
202 * include/pstl/memory_impl.h: Likewise.
203 * include/pstl/glue_numeric_defs.h: Likewise.
204 * include/pstl/parallel_backend_utils.h: Likewise.
205 * include/pstl/glue_algorithm_defs.h: Likewise.
206 * include/pstl/parallel_backend.h: Likewise.
207 * include/pstl/glue_numeric_impl.h: Likewise.
208 * include/pstl/parallel_backend_tbb.h: Likewise.
209 * include/pstl/numeric_fwd.h: Likewise.
210 * include/pstl/glue_algorithm_impl.h: Likewise.
211 * include/pstl/execution_impl.h: Likewise.
212 * include/pstl/pstl_config.h: Likewise.
213 * testsuite/util/pstl/pstl_test_config.h: Likewise.
215 Synchronize libstdc++ parallel algorithms with upstream
217 * include/pstl/algorithm_fwd.h: Synchronize with
218 upstream PSTL project.
219 * include/pstl/algorithm_impl.h: Likewise.
220 * include/pstl/execution_defs.h: Likewise.
221 * include/pstl/execution_impl.h: Likewise.
222 * include/pstl/glue_algorithm_impl.h: Likewise.
223 * include/pstl/glue_execution_defs.h: Likewise.
224 * include/pstl/numeric_fwd.h: Likewise.
225 * include/pstl/numeric_impl.h: Likewise.
226 * include/pstl/parallel_backend.h: Likewise.
227 * include/pstl/pstl_config.h: Likewise.
228 * include/pstl/unseq_backend_simd.h: Likewise.
229 * include/pstl/parallel_backend_serial.h: New file.
230 * include/Makefile.am (pstl_headers): Add
231 parallel_backend_serial.h.
232 * include/Makefile.in: Regenerate.
234 Clean up non-conforming names
235 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
236 Uglfiy copy_range1 and copy_range2
237 (__pattern_walk2_n): Rename local n to __n
238 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
239 Rename parameter _T to _Tp.
241 Integrate non-TBB serial backend support
242 * include/bits/c++config: Adjust TBB detection logic to select serial
243 PSTL backend if no TBB present.
244 * testsuite/utils/pstl/test_utils.h: Remove check for
245 _PSTL_USE_PAR_POLICIES
247 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
249 * testsuite/24_iterators/container_access.cc: Move dg-options before
250 dg-do directive so the target check uses the -std option.
253 * configure: Regenerate.
254 * src/Makefile.am (stamp-debug): Also test for missing makefile.
255 * src/Makefile.in: Regenerate.
257 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
259 * include/std/array: Do not include <stdexcept>.
260 * include/std/optional: Include <exception> and
261 <bits/exception_defines.h> instead of <stdexcept>.
262 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
264 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
266 * testsuite/23_containers/map/erasure.cc: Include <string>.
267 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
269 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
270 dg-prune-output for different C++98 diagnostic.
271 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
273 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
275 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
277 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
279 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
281 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
283 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
285 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
287 * testsuite/23_containers/vector/requirements/dr438/
288 constructor_1_neg.cc: Likewise.
289 * testsuite/23_containers/vector/requirements/dr438/
290 constructor_2_neg.cc: Likewise.
291 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
293 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
295 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
296 Do not test allocator rebinding extension for C++2a.
297 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
298 dg-do directive for C++17 and C++2a.
300 * testsuite/23_containers/deque/requirements/explicit_instantiation/
301 1_c++0x.cc: Remove redundant test.
302 * testsuite/23_containers/deque/requirements/explicit_instantiation/
303 2.cc: Use target selector instead of preprocessor condition.
304 * testsuite/23_containers/deque/requirements/explicit_instantiation/
305 3.cc: Do not run test for C++2a.
306 * testsuite/23_containers/forward_list/requirements/
307 explicit_instantiation/3.cc: Likewise.
308 * testsuite/23_containers/forward_list/requirements/
309 explicit_instantiation/5.cc: Do not test allocator rebinding extension
311 * testsuite/23_containers/list/requirements/explicit_instantiation/
312 1_c++0x.cc: Remove redundant test.
313 * testsuite/23_containers/list/requirements/explicit_instantiation/
314 2.cc: Use target selector instead of preprocessor condition.
315 * testsuite/23_containers/list/requirements/explicit_instantiation/
316 3.cc: Do not run test for C++2a.
317 * testsuite/23_containers/list/requirements/explicit_instantiation/
318 5.cc: Do not test allocator rebinding extension for C++2a.
319 * testsuite/23_containers/map/requirements/explicit_instantiation/
320 1_c++0x.cc: Remove redundant test.
321 * testsuite/23_containers/map/requirements/explicit_instantiation/
322 2.cc: Adjust comment.
323 * testsuite/23_containers/map/requirements/explicit_instantiation/
324 3.cc: Do not run test for C++2a.
325 * testsuite/23_containers/map/requirements/explicit_instantiation/
326 5.cc: Do not test allocator rebinding extension for C++2a.
327 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
328 1_c++0x.cc: Remove redundant test.
329 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
330 3.cc: Do not run test for C++2a.
331 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
332 5.cc: Do not test allocator rebinding extension for C++2a.
333 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
334 3.cc: Do not run test for C++2a.
335 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
336 5.cc: Do not test allocator rebinding extension for C++2a.
337 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
338 Do not run test for C++2a.
339 * testsuite/23_containers/set/requirements/explicit_instantiation/
340 1_c++0x.cc: Remove redundant test.
341 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
342 Do not test allocator rebinding extension for C++2a.
343 * testsuite/23_containers/unordered_map/requirements/
344 explicit_instantiation/3.cc: Likewise.
345 * testsuite/23_containers/unordered_map/requirements/
346 explicit_instantiation/5.cc: Do not test allocator rebinding extension
348 * testsuite/23_containers/unordered_multimap/requirements/
349 explicit_instantiation/3.cc: Do not run test for C++2a.
350 * testsuite/23_containers/unordered_multimap/requirements/
351 explicit_instantiation/5.cc: Do not test allocator rebinding extension
353 * testsuite/23_containers/unordered_multiset/requirements/
354 explicit_instantiation/3.cc: Do not run test for C++2a.
355 * testsuite/23_containers/unordered_multiset/requirements/
356 explicit_instantiation/5.cc: Do not test allocator rebinding extension
358 * testsuite/23_containers/unordered_set/requirements/
359 explicit_instantiation/3.cc: Do not run test for C++2a.
360 * testsuite/23_containers/unordered_set/requirements/
361 explicit_instantiation/5.cc: Do not test allocator rebinding extension
363 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
364 2.cc: Remove redundant test.
365 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
366 3.cc: Do not run test for C++2a.
367 * testsuite/23_containers/vector/requirements/explicit_instantiation/
370 * include/std/type_traits (is_empty, is_polymorphic, is_final)
371 (is_abstract, is_aggregate): Remove static_assert.
372 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
374 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
375 missing -std=gnu++17 option.
376 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
377 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
378 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
381 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
382 * testsuite/18_support/set_unexpected.cc: Likewise.
383 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
385 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
386 function to be valid in C++11.
387 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
388 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
389 include Library Fundamentals or Networking headers in C++11 mode.
390 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
392 * include/std/tuple (_TC): Replace with _TupleConstraints.
393 (_TupleConstraints): New helper for SFINAE constraints, with more
394 expressive member functions to reduce duplication when used.
395 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
396 (tuple::_TCC): Replace dummy type parameter with bool non-type
397 parameter that can be used to check the pack size.
398 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
399 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
400 checking constraints in constructors.
401 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
403 (tuple::tuple): Use new helpers to reduce repitition in constraints.
404 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
405 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
406 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
407 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
408 constraints in constructors.
409 (tuple::__is_alloc_arg()): New SFINAE helpers.
410 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
412 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
413 * testsuite/20_util/tuple/cons/90700.cc: New test.
414 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
415 to meet new constraint on allocator-extended default constructor.
417 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
419 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
420 * include/bits/stl_multimap.h (multimap): Likewise.
422 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
424 Rename variables and cleanup comments.
425 * include/bits/hashtable_policy.h
426 * include/bits/hashtable.h
428 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
430 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
431 Fix bgcolor for P0340R3.
432 * doc/html/*: Regenerate.
435 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
436 <experimental/memory_resource>.
437 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
438 P0339R6, P0340R3, P1164R1 and P1357R1.
439 * doc/html/*: Regenerate.
441 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
442 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
443 allocator::value_type assertion for C++2a.
444 * include/bits/hashtable.h: Likewise.
445 * include/bits/stl_deque.h: Likewise.
446 * include/bits/stl_list.h: Likewise.
447 * include/bits/stl_map.h: Likewise.
448 * include/bits/stl_multimap.h: Likewise.
449 * include/bits/stl_multiset.h: Likewise.
450 * include/bits/stl_set.h: Likewise.
451 * include/bits/stl_vector.h: Likewise.
452 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
453 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
454 * testsuite/23_containers/list/48101-3_neg.cc: New test.
455 * testsuite/23_containers/map/48101-3_neg.cc: New test.
456 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
457 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
458 * testsuite/23_containers/set/48101-3_neg.cc: New test.
459 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
460 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
461 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
462 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
463 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
465 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
467 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
469 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
471 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
473 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
475 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
477 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
479 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
482 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
483 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
484 * libsupc++/eh_term_handler.h: New header defining
485 _GLIBCXX_DEFAULT_TERM_HANDLER.
486 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
487 (set_terminate): Restore default handler when argument is null.
488 (set_unexpected): Likewise.
489 * testsuite/18_support/set_terminate.cc: New test.
490 * testsuite/18_support/set_unexpected.cc: New test.
492 * include/backward/hashtable.h (size_t, ptrdiff_t)
493 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
494 (distance, vector, pair, __iterator_category): Remove
495 using-declarations that add these names to namespace __gnu_cxx.
496 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
497 * include/ext/debug_allocator.h (size_t): Likewise.
498 * include/ext/functional (size_t, unary_function, binary_function)
499 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
501 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
502 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
503 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
504 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
505 * include/ext/numeric (iota): Fix outdated comment.
506 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
507 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
508 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
509 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
510 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
512 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
513 (allocator, __true_type, __false_type): Likewise.
515 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
518 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
519 New helpers for checking preconditions in traits.
520 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
521 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
522 (is_destructible, is_nothrow_destructible, is_constructible)
523 (is_default_constructible, is_copy_constructible)
524 (is_move_constructible, is_nothrow_default_constructible)
525 (is_nothrow_constructible, is_nothrow_copy_constructible)
526 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
527 (is_nothrow_assignable, is_nothrow_copy_assignable)
528 (is_nothrow_move_assignable, is_trivially_constructible)
529 (is_trivially_copy_constructible, is_trivially_move_constructible)
530 is_trivially_assignable, is_trivially_copy_assignable)
531 (is_trivially_move_assignable, is_trivially_destructible)
532 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
533 (is_invocable_r, is_nothrow_invocable)
534 (has_unique_object_representations, is_aggregate): Add static_asserts
535 to make sure that type traits are not misused with incomplete types.
536 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
537 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
538 base characteristics without assertions that can be reused in other
540 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
541 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
543 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
544 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
545 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
546 * testsuite/20_util/is_class/value.cc: Check incomplete type.
547 * testsuite/20_util/is_function/value.cc: Likewise.
548 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
549 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
551 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
552 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
553 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
554 * testsuite/20_util/is_union/value.cc: Likewise.
555 * testsuite/20_util/is_void/value.cc: Likewise.
556 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
558 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
560 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
561 Add new private member function.
562 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
563 (random_device::_M_init_pretr1(const string&)): Call new private
564 member with string data.
565 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
567 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
568 test using COW strings.
569 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
570 a value from the device.
571 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
572 Fix typo in token string.
574 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
576 LWG2788 basic_string spurious use of a default constructible allocator
577 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
578 (basic_string::_M_replace_dispatch): Construct temporary string with
579 the current allocator.
580 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
581 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
583 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
585 * doc/xml/manual/diagnostics.xml: Update list of headers that define
587 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
588 section about new/delete overloads. Improve section on verbose
590 * doc/html/*: Regenerate.
592 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
593 P0811R3. Change status of P1353R0.
594 * doc/html/*: Regenerate.
596 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
597 documentation of implementation-defined types for [thread.req.native].
598 * doc/xml/manual/status_cxx2017.xml: Update documentation of
599 implementation-defined strings for [variant.bad.access]. Fix typo in
600 documentation of implementation-defined support for [fs.conform.9945].
601 * doc/html/*: Regenerate.
603 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
606 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
607 that fails on mingw-w64.
610 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
611 (status(const path&, error_code&)): Use parent_path() to remove
613 (symlink_status(const path&, error_code&)): Duplicate workaround for
614 bug in _wstat for paths with trailing slash.
615 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
617 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
618 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
620 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
621 once instead of building it iteratively.
623 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
625 PR libstdc++/85494 use rdseed and rand_s in std::random_device
626 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
627 the assembler supports rdseed.
628 * config.h.in: Regenerate.
629 * configure: Regenerate.
630 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
631 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
632 * doc/html/*: Regenerate.
633 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
634 * include/bits/random.h (random_device::random_device()): Always call
635 _M_init rather than _M_init_pretr1.
636 (random_device::random_device(const string&)): Likewise.
637 (random_device::operator()()): Always call _M_getval().
638 (random_device::_M_file): Replace first member of union with an
639 anonymous struct, with _M_file as its first member.
640 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
641 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
642 (USE_MT19937): Define if none of the above are defined.
643 (USE_POSIX_FILE_IO): Define.
644 (_M_strtoul): Remove.
645 [USE_RDSEED] (__x86_rdseed): Define new function.
646 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
647 (random_device::_M_init(const string&)): Initialize new union members.
648 Add support for "rdseed" and "rand_s" tokens. Decide what the
649 "default" token does according to which USE_* macros are defined.
650 [USE_POSIX_FILE_IO]: Store a file descriptor.
651 [USE_MT19937]: Forward to _M_init_pretr1 instead.
652 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
653 code from _M_strtoul.
654 [!USE_MT19937]: Call _M_init, transforming the old default token or
655 numeric tokens to "default".
656 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
657 (random_device::_M_getval()): Use new union members to obtain a
658 random number from the stored function pointer or file descriptor.
659 [USE_MT19937]: Obtain a value from the mt19937 engine.
660 (random_device::_M_getval_pretr1()): Call _M_getval().
661 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
663 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
664 * testsuite/26_numerics/random/random_device/85494.cc: New test.
666 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
669 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
670 _M_split_cmpts() for a path with multiple components.
671 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
672 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
673 components and reserve space in vector. Return early when there is
675 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
676 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
678 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
679 form of std::equals for C++11 compatibility.
681 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
683 * doc/xml/manual/appendix_contributing.xml: Update pointer to
684 C++ standard at ansi.org.
686 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
688 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
689 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
692 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
693 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
695 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
697 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
699 * testsuite/20_util/function_objects/invoke/3.cc: New test.
700 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
701 "compile" test to "run".
703 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
704 * doc/html/*: Regenerate.
705 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
706 rvalue aliasing constructor.
707 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
708 (reinterpret_pointer_cast): Add overloads taking rvalues.
709 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
710 Add rvalue aliasing constructor.
711 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
712 "run" and check return values as well as types.
713 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
714 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
715 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
716 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
719 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
720 * doc/xml/manual/intro.xml: Likewise.
721 * include/std/future (__create_task_state): Add default arguments
722 to make providing an allocator optional.
723 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
724 instead of delegating to another constructor.
725 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
726 define allocator-extended constructors for C++17 and later.
727 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
729 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
730 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
731 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
733 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
735 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
736 Don't run the libstdc++/83237 part on simulator targets.
738 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
740 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
742 * doc/html/*: Regenerate.
744 * include/experimental/any (__any_caster): Use RTTI if comparing
745 addresses fails, to support non-unique addresses in shared libraries.
746 * include/std/any (__any_caster): Likewise.
749 * include/experimental/any (__any_caster): Constrain to only be
750 callable for object types. Use remove_cv_t instead of decay_t.
751 If the type decays or isn't copy constructible, compare the manager
752 function to a dummy specialization.
753 (__any_caster): Add overload constrained for non-object types.
754 (any::_Manager_internal<_Op>): Add dummy specialization.
755 * testsuite/experimental/any/misc/any_cast.cc: Test function types
758 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
761 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
762 reversed arguments to uninitialized_copy_n.
763 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
764 is unchanged by copy assignment.
765 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
766 compare path components.
769 * include/experimental/memory_resource: Add system header pragma and
770 do not define anything unless compiled as C++14 or later.
771 (__resource_adaptor_common::__guaranteed_alignment): Remove.
772 (__resource_adaptor_imp::do_allocate): If the requested alignment
773 is a fundamental alignment then either allocate directly from _M_alloc
774 or call the new _M_allocate function.
775 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
776 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
777 of the allocator rebound to a POD type with the specified alignment.
778 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
779 * testsuite/experimental/memory_resource/new_delete_resource.cc:
780 Adjust expected allocation sizes.
781 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
782 xfail for Solaris x86.
784 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
786 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
787 * include/pstl/execution_defs.h (__enable_if_execution_policy):
788 Use std::__remove_cvref_t when building with GCC.
790 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
793 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
794 Use "additional_flags" to pass -ltbb to v3_target_compile command.
795 Use check_v3_target_prop_cached to cache the result of the test.
797 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
799 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
802 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
803 Changed v3_target_compile check from preprocess to executable.
804 Added "-ltbb" to v3_target_compile flags.
806 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
808 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
809 Add check for Thread Building Blocks 2018 or later.
811 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
813 * testsuite/experimental/names.cc: Only include Networking TS headers
814 on targets with the necessary Gthreads support.
816 2019-05-20 Marek Polacek <polacek@redhat.com>
818 CWG 2094 - volatile scalars are trivially copyable.
820 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
821 result for volatile int.
823 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
825 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
826 * testsuite/experimental/names.cc: Include <experimental/filesystem>
829 PR c++/90532 Ensure __is_constructible(T[]) is false
830 * include/std/type_traits (__do_is_default_constructible_impl)
831 (__is_default_constructible_atom, __is_default_constructible_safe):
833 (is_default_constructible): Use is_constructible.
834 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
835 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
836 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
837 * testsuite/20_util/is_trivially_default_constructible/value.cc:
840 2019-05-20 Pádraig Brady <pbrady@fb.com>
842 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
843 to the deallocator with -fsized-deallocation.
845 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
847 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
848 test by passing correct alignment to deallocate function.
850 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
853 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
854 Raise exception if unique_ptr tuple member has unknown structure.
855 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
856 Adjust worker to support new __uniq_ptr_data base class. Do not
857 assume field called _M_head_impl is the first tuple element.
859 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
861 * include/bits/stl_deque.h
862 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
863 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
864 (_Deque_base::_Deque_impl_data): New.
865 (_Deque_base::_Deque_impl): Inherit latter.
866 (_Deque_base::_Deque_impl::_M_swap_data): Move...
867 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
868 (_Deque_base::_Deque_impl()): Add noexcept qualification.
869 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
870 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
871 (deque<>::deque()): Default.
872 (deque<>::deque(deque&&)): Default.
873 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
874 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
875 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
876 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
878 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
879 (deque<>::resize(size_type, const value_type&)): Share a single
881 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
883 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
884 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
885 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
886 * testsuite/23_containers/deque/allocator/default_init.cc: New.
888 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
891 * include/std/variant (holds_alternative, get, get_if): Improve
892 static assertion messages.
893 (bad_variant_access::bad_variant_access()): Change default message.
894 (__throw_bad_variant_access(bool)): New overload.
895 (get): Use new overload.
896 (visit, visit<R>): Improve exception message.
898 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
899 targets. Add more cases from P0608R3.
900 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
902 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
903 * include/experimental/type_traits (is_detected_exact)
904 (is_detected_exact_v): Likewise.
905 * include/pstl/execution_defs.h (is_execution_policy)
906 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
907 * include/pstl/execution_impl.h (__policy_traits): Likewise.
908 * testsuite/17_intro/names.cc: Check for more non-reserved names.
909 * testsuite/experimental/names.cc: New test.
912 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
913 assertions from the destructor.
914 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
915 Move static_assert for hash function to here.
916 (_Hash_table_base::_M_equals): Move static_assert for equality
918 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
920 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
921 the value directly instead of calling _S_value.
922 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
923 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
924 _S_key(_Const_Link_type).
925 * testsuite/23_containers/set/85965.cc: Check construction,
926 destruction, assignment and size() do not trigger the assertions.
927 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
928 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
930 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
931 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
932 * testsuite/23_containers/set/48101_neg.cc: Likewise.
933 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
934 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
935 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
936 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
938 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
939 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
942 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
944 * doc/html/*: Regenerate.
945 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
946 of decay_t (P0777R1).
948 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
950 Move from state of allocators (LWG2593)
951 * include/bits/stl_deque.h
952 (_Deque_base(_Deque_base&&, false_type)): Remove.
953 (_Deque_base(_Deque_base&&, true_type)): Remove.
954 (_Deque_base(_Deque_base&&)): Adapt.
955 (_Deque_base::_M_move_impl()): Remove.
956 * testsuite/util/testsuite_allocator.h
957 (propagating_allocator(propagating_allocator&&)): Preserve move from
959 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
961 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
963 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
964 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
965 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
967 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
969 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
970 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
972 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
974 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
976 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
978 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
980 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
982 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
984 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
987 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
989 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
990 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
992 * include/std/variant (__overload_set): Remove.
994 (_Build_FUN): New class template to define a single FUN overload,
995 with specializations to prevent unwanted conversions, as per P0608R3.
996 (_Build_FUNs): New class template to build an overload set of FUN.
997 (_FUN_type): New alias template to perform overload resolution.
998 (__accepted_type): Use integer_constant base for failure case. Use
999 _FUN_type for successful case.
1000 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1001 (variant::variant(_Tp&&)): Likewise.
1002 (variant::operator=(_Tp&&)): Likewise.
1004 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1005 Replace raw visitation with a runtime check for the valueless state
1006 and a non-raw visitor.
1007 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1008 (variant::index()): Remove branch.
1009 (variant::swap(variant&)): Use valueless_by_exception() instead of
1010 comparing the index to variant_npos, and add likelihood attribute.
1012 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1013 (_Hashtable_base::_Equal_hash_code): Define new class template.
1014 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1017 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1018 Replace with _M_get non-static member function.
1019 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1021 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1022 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1024 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1025 _S_get accessors for members in EBO helpers.
1026 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1027 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1029 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1031 (_Hashtable_base::_M_eq()): Remove non-const overload.
1033 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1035 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1037 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1039 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1042 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1044 * config/os/solaris/solaris2.10: Move to ...
1045 * config/os/solaris: ... this.
1046 * configure.host (os_include_dir): Adapt.
1047 (abi_baseline_pair): Remove Solaris 10 handling.
1048 * config/abi/post/i386-solaris2.10: Remove.
1049 * config/abi/post/sparc-solaris2.10: Remove.
1050 * config/abi/post/i386-solaris2.11: Rename to ...
1051 * config/abi/post/i386-solaris: ... this.
1052 * config/abi/post/sparc-solaris2.11: Rename to ...
1053 * config/abi/post/sparc-solaris: ... this.
1055 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1058 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1061 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1063 * include/std/variant (__visit_with_index): Remove typedef.
1064 (__deduce_visit_result): New tag type.
1065 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1066 visitation of possibly-valueless variants, forwarding to __do_visit
1067 with the relevant tag type.
1068 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1069 and make lambda return void.
1070 (__variant_construct): Likewise.
1071 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1072 __raw_idx_visit and make lambda return void.
1073 (_Multi_array::__untag_result): Add metafunction to check the function
1074 pointer type for a tag type that dictates the kind of visitation.
1075 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1076 Use decltype(auto) instead of tagged function pointer type.
1077 (__gen_vtable_impl): Remove bool non-type parameter and unused
1078 _Variant_tuple parameter.
1079 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1080 (__gen_vtable_impl::__do_visit_invoke): Remove.
1081 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1082 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1083 for the visit<R> case, rather than dispatching to separate functions.
1084 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1086 (variant::swap): Likewise.
1087 (__do_visit): Replace two non-type template parameters with a single
1088 type parameter, so that the caller must specify the visitor's return
1089 type (or one of the tag types).
1090 (visit): Deduce a return type from the visitor and use the
1091 __deduce_visit_result tag to enforce that all overloads return the
1093 (visit<R>): Call __do_visit<R> with explicit result type.
1094 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1097 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1099 nonesuch is insufficiently useless (lwg2996)
1100 * include/std/type_traits (struct __nonesuch): Added private base
1101 class to make __nonesuch not an aggregate and removed deleted default
1103 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1104 (operator=(const pair&)): Use __nonesuch instead of
1105 __nonesuch_no_braces.
1106 (operator=(pair&&)): Likewise
1107 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1108 of __nonesuch_no_braces.
1109 (operator=(tuple&&)): Likewise
1110 * include/experimental/type_traits (struct nonesuch): Added private
1111 base class to make nonesuch not an aggregate and removed deleted
1112 default constructor.
1113 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1114 * testsuite/experimental/type_traits/nonesuch.cc: New.
1116 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1118 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1119 (_Function_handler): Remove partial specializations for void return
1120 types and pointers to member.
1121 (_Function_handler::_M_manager): Adapt to removal of
1122 _Simple_type_wrapper.
1123 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1124 * include/std/functional (_Bind_result::__enable_if_void)
1125 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1126 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1128 * include/std/future (__future_base::_Task_state::_M_run)
1129 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1130 change return type of lambda expressions.
1132 * include/bits/invoke.h (__invoke_r): Define new function implementing
1133 the INVOKE<R> pseudo-function.
1134 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1135 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1137 * include/std/type_traits (__is_nt_convertible_helper): Define it
1138 unconditionally, not only for C++20.
1139 (__is_nothrow_convertible): Define internal trait for use in C++11.
1140 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1141 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1142 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1143 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1144 that has nothrow explicit conversion but potentially-throwing implicit
1146 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1147 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1148 function to only consider implicit conversions.
1149 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1151 * include/std/iterator: Include <iosfwd> instead of <istream> and
1154 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1155 Remove unused, non-standard function.
1157 * include/bits/regex.h (match_results::max_size()): Adjust return
1158 value to account for prefix/suffix/unmatched subs.
1159 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1160 reset the contained sub matches.
1161 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1162 function to set result state following a failed match.
1163 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1164 sub_match states after _M_resize. Use _M_establish_failed_match.
1167 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1168 Replace single _Callable parameter with variadic _Args pack, to
1169 forward them directly to the tuple of decayed copies.
1170 * testsuite/30_threads/thread/cons/69724.cc: New test.
1172 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1174 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1175 * include/bits/basic_string.h: (operator=(const basic_string&):
1176 Move allocator decision to assign.
1177 (assign(const basic_string&)): Move allocator decision here.
1178 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1180 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1183 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1185 * testsuite/util/testsuite_allocator.h (memory_resource)
1186 (default_resource_mgr): Fix indentation.
1188 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1189 Use operator-> to access raw pointer member.
1190 * testsuite/23_containers/vector/59829.cc: Likewise.
1191 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1192 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1193 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1195 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1196 its constructors and equality operators. Change converting
1197 constructors to use operator-> to access private member of the other
1199 (PointerBase_void::operator->()): Add, for access to private member.
1200 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1201 (operator==(PointerBase, PointerBase)): Remove.
1202 (operator!=(PointerBase, PointerBase)): Remove.
1204 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1205 not assume field called _M_head_impl is the first tuple element.
1206 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1207 implementation more accurate.
1208 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1209 empty pointer type and non-empty deleter.
1211 LWG 2899 - Make is_move_constructible correct for unique_ptr
1212 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1213 move assignment operator.
1214 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1215 (__uniq_ptr_data): New class template with conditionally deleted
1217 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1218 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1219 constructor and move assignment operator as defaulted.
1220 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1221 __uniq_ptr_impl::release().
1222 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1223 to __uniq_ptr_impl::reset(pointer).
1224 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1225 Check for new __uniq_ptr_data type.
1226 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1228 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1230 PR libstdc++/90454.cc path construction from void*
1231 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1232 pointers to void are rejected as well as void.
1233 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1234 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1236 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1238 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1239 <remark> elements. Fix formatting of bibliography references.
1241 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1243 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1245 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1247 Remove Profile Mode, deprecated since 7.1.0
1248 * doc/Makefile.am: Remove XML file for profile mode docs.
1249 * doc/Makefile.in: Regenerate.
1250 * doc/xml/authors.xml: Remove authors of profile mode docs.
1251 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1253 * doc/xml/manual/debug.xml: Likewise.
1254 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1255 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1256 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1257 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1259 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1261 * doc/html/*: Regenerate.
1262 * include/Makefile.am: Remove profile mode headers.
1263 * include/Makefile.in: Regenerate.
1264 * include/bits/c++config (std::__profile): Remove namespace.
1265 [_GLIBCXX_PROFILE]: Remove checks for macro.
1266 * include/profile/array: Remove.
1267 * include/profile/base.h: Remove.
1268 * include/profile/bitset: Remove.
1269 * include/profile/deque: Remove.
1270 * include/profile/forward_list: Remove.
1271 * include/profile/impl/profiler.h: Remove.
1272 * include/profile/impl/profiler_algos.h: Remove.
1273 * include/profile/impl/profiler_container_size.h: Remove.
1274 * include/profile/impl/profiler_hash_func.h: Remove.
1275 * include/profile/impl/profiler_hashtable_size.h: Remove.
1276 * include/profile/impl/profiler_list_to_slist.h: Remove.
1277 * include/profile/impl/profiler_list_to_vector.h: Remove.
1278 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1279 * include/profile/impl/profiler_node.h: Remove.
1280 * include/profile/impl/profiler_state.h: Remove.
1281 * include/profile/impl/profiler_trace.h: Remove.
1282 * include/profile/impl/profiler_vector_size.h: Remove.
1283 * include/profile/impl/profiler_vector_to_list.h: Remove.
1284 * include/profile/iterator_tracker.h: Remove.
1285 * include/profile/list: Remove.
1286 * include/profile/map: Remove.
1287 * include/profile/map.h: Remove.
1288 * include/profile/multimap.h: Remove.
1289 * include/profile/multiset.h: Remove.
1290 * include/profile/ordered_base.h: Remove.
1291 * include/profile/set: Remove.
1292 * include/profile/set.h: Remove.
1293 * include/profile/unordered_base.h: Remove.
1294 * include/profile/unordered_map: Remove.
1295 * include/profile/unordered_set: Remove.
1296 * include/profile/vector: Remove.
1297 * scripts/run_doxygen: Do not process profile mode headers.
1298 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1300 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1301 Remove dg-skip-if for profile mode.
1302 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1303 preprocessor check for profile mode.
1304 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1305 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1307 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1309 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1310 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1311 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1312 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1313 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1315 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1317 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1319 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1321 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1322 preprocessor check for profile mode.
1323 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1325 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1326 Remove dg-skip-if for profile mode.
1327 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1328 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1329 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1330 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1331 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1332 * testsuite/Makefile.am: Remove profile_flags variable and
1333 * testsuite/Makefile.am: Remove profile_flags variable and
1334 check-profile target.
1335 * testsuite/Makefile.in: Regenerate.
1336 * testsuite/ext/profile/all.cc: Remove.
1337 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1338 * testsuite/ext/profile/profiler_algos.cc: Remove.
1339 * testsuite/ext/profile/replace_new.cc: Remove.
1340 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1341 preprocessor check for profile mode.
1342 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1343 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1344 (check_v3_target_normal_mode): Do not check for profile mode macro.
1345 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1347 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1348 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1349 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1350 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1351 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1352 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1353 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1354 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1355 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1356 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1358 Remove array_allocator extension, deprecated since 4.9.0
1359 * doc/xml/manual/allocator.xml: Remove documentation for
1361 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1362 * doc/xml/manual/using.xml: Remove header from documentation.
1363 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1364 * include/Makefile.in: Regenerate.
1365 * include/ext/array_allocator.h: Remove.
1366 * include/precompiled/extc++.h: Do not include removed header.
1367 * testsuite/ext/array_allocator/1.cc: Remove.
1368 * testsuite/ext/array_allocator/2.cc: Remove.
1369 * testsuite/ext/array_allocator/26875.cc: Remove.
1370 * testsuite/ext/array_allocator/3.cc: Remove.
1371 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1372 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1373 * testsuite/ext/array_allocator/check_new.cc: Remove.
1374 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1375 * testsuite/ext/headers.cc: Do not include removed header.
1377 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1379 * include/bits/stl_bvector.h
1380 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1382 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1384 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1386 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1388 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1390 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1392 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1394 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1396 (_Bit_iterator::operator-(difference_type)): Likewise.
1397 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1398 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1400 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1401 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1403 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1406 * testsuite/util/thread/all.h: Do not use remove_pointer for
1407 std::thread::native_handle_type.
1410 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1411 (_Variant_storage<true, Types...>::_M_reset()))
1412 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1413 (__get_storage): Likewise.
1414 (variant): Add noexcept to friend declarations for __get and
1418 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1419 Use _Require for constraints.
1420 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1422 (__uniq_ptr_hash): New base class with conditionally-disabled call
1424 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1425 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1426 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1428 * include/bits/shared_ptr.h: Improve docs.
1429 * include/bits/shared_ptr_base.h: Likewise.
1430 * include/bits/stl_uninitialized.h: Likewise.
1431 * include/bits/unique_ptr.h: Likewise.
1432 * libsupc++/new: Likewise.
1434 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1436 * include/bits/stl_deque.h
1437 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1439 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1441 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1443 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1445 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1447 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1449 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1451 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1453 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1456 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1457 (test01): Reserve for number of insertions to avoid rehash during test.
1458 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1460 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1465 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1467 * include/experimental/bits/fs_path.h: Improve docs.
1468 * include/experimental/bits/net.h: Fix wrong header name in comment.
1469 Do not document implementation details.
1470 * include/experimental/netfwd: Fix doxygen grouping.
1472 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1474 * include/bits/stl_pair.h: Improve docs.
1475 * include/std/tuple: Likewise.
1477 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1479 * include/std/chrono: Improve docs.
1480 * include/std/ratio: Do not document implementation details.
1481 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1483 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1486 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1487 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1488 (__duration_common_type): New helper.
1489 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1490 __duration_common_type.
1491 (__timepoint_common_type_wrapper): Replace with ...
1492 (__timepoint_common_type): New helper.
1493 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1494 Use __time_point_common_type.
1495 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1496 (__common_type_impl): If either argument is transformed by decay,
1497 use the common_type of the decayed types.
1498 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1499 decayed, use __do_common_type_impl to get the common_type.
1500 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1501 (__do_member_type_wrapper, __member_type_wrapper)
1502 (__expanded_common_type_wrapper): Remove.
1503 (__common_type_pack, __common_type_fold): New helpers.
1504 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1505 __member_type_wrapper and __expanded_common_type_wrapper.
1506 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1507 Test zero-length template argument list.
1508 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1509 Test single argument cases and argument types that should decay.
1510 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1511 Adjust expected error.
1512 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1514 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1515 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1516 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1518 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1520 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1522 Make allocator propagation more consistent for
1523 operator+(basic_string) (P1165R1)
1524 * include/bits/basic_string.h
1525 (operator+(basic_string&&, basic_string&&): Changed resulting
1526 allocator to always be the one from the first parameter.
1527 * include/bits/basic_string.tcc
1528 (operator+(const _CharT*, const basic_string&)): Changed
1529 resulting allocator to be SOCCC on the second parameter's allocator.
1530 (operator+(_CharT, const basic_string&)): Likewise.
1531 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1533 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1536 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1538 * include/bits/regex.h: Improve docs.
1539 * include/bits/regex.tcc: Do not document implementation details.
1541 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1543 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1545 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1546 Add type printer for container types in std::__debug namespace.
1547 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1548 (gdb-tests): Use distinct parameters for the type of test and use of
1550 (gdb-test): Check for regex test even if 'whatis' test.
1551 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1553 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1554 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1555 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1556 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1557 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1558 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1559 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1561 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1563 * include/std/system_error (error_category): Fix comment.
1566 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1567 argument is an empty path.
1568 (absolute(const path&, error_code&)): Use invalid_argument as error
1569 code instead of no_such_file_or_directory.
1570 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1571 of non-existent paths and empty paths with both overloads of absolute.
1573 * include/std/system_error (error_category, error_code)
1574 (error_condition): Improve docs.
1575 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1576 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1577 to class documentation. Suppress documentation for implementation
1579 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1580 Suppress documentation for implementation details.
1582 * include/std/system_error (error_code): Remove friend declaration
1583 for hash<error_code>.
1584 (hash<error_code>::operator()): Use public member functions to access
1586 (hash<error_condition>::operator()): Use address of category, not
1587 its object representation.
1588 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1589 Use public member functions to access value and category.
1590 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1592 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1594 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1595 * include/bits/hashtable_policy.h
1596 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1597 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1598 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1599 smaller than input value rather than always greater. Preserve
1600 _M_next_resize if called with 0 input. Use __builtin_floorl.
1601 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1602 elements + number of insertions is greater than _M_next_resize. Start
1603 with 11 buckets if not told otherwise. Use __builtin_floorl.
1604 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1605 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1606 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1607 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1608 told otherwise. Use __builtin_floorl.
1609 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1610 to also validate _Power2_rehash_policy.
1611 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1614 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1617 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1621 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1622 overflow warning with -Wpedantic -Wsystem-headers.
1624 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1627 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1628 * include/bits/move.h (swap): Remove extra parentheses.
1630 * include/experimental/bits/lfts_config.h: Improve doc markup.
1631 * include/experimental/optional: Improve docs.
1632 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1633 (__constexpr_addressof): Remove.
1634 (optional::operator->()): Use std::__addressof().
1635 * include/std/optional (optional::operator->()): Adjust whitespace.
1636 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1637 that operator-> is still constexpr with overloaded operator&. Change
1638 to compile-only test.
1639 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1642 * include/bits/shared_ptr.h: Improve docs.
1643 * include/bits/shared_ptr_atomic.h: Likewise.
1644 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1646 * include/bits/basic_string.h: Fix iterator/index confusion in
1648 * include/bits/range_access.h: Fix Doxygen warnings.
1649 * include/bits/refwrap.h: Do not document implementation details.
1650 (ref, cref): Group docs with reference_wrapper.
1651 * include/std/fstream: Fix Doxygen markup.
1652 * libsupc++/initializer_list (begin, end): Group docs with
1655 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1657 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1658 * include/std/mutex: Likewise.
1659 * include/std/shared_mutex: Likewise.
1661 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1662 * include/bits/fs_fwd.h: Likewise.
1663 * include/bits/fs_ops.h: Likewise.
1664 * include/bits/fs_path.h: Likewise.
1665 * include/std/filesystem: Likewise.
1667 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1668 * include/experimental/buffer: Likewise.
1669 * include/experimental/executor: Likewise.
1670 * include/experimental/internet: Likewise.
1671 * include/experimental/io_context: Likewise.
1672 * include/experimental/net: Likewise.
1673 * include/experimental/netfwd: Likewise.
1674 * include/experimental/socket: Likewise.
1675 * include/experimental/timer: Likewise.
1677 * doc/doxygen/doxygroups.cc: Move description of experimental group
1679 * include/experimental/algorithm: Add to libfund-ts doc group.
1680 * include/experimental/any: Likewise. Do not document implementation
1682 * include/experimental/array: Add to libfund-ts doc group.
1683 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1684 for Library Fundamentals.
1685 * include/experimental/chrono: Add to libfund-ts doc group.
1686 * include/experimental/deque: Likewise.
1687 * include/experimental/forward_list: Likewise.
1688 * include/experimental/functional: Likewise.
1689 * include/experimental/iterator: Likewise.
1690 * include/experimental/list: Likewise.
1691 * include/experimental/map: Likewise.
1692 * include/experimental/memory: Likewise.
1693 * include/experimental/memory_resource: Likewise. Improve docs.
1695 * include/experimental/numeric: Add to libfund-ts doc group.
1696 * include/experimental/optional: Likewise.
1697 * include/experimental/propagate_const: Likewise.
1698 * include/experimental/random: Likewise.
1699 * include/experimental/ratio: Likewise.
1700 * include/experimental/regex: Likewise.
1701 * include/experimental/set: Likewise.
1702 * include/experimental/source_location: Likewise.
1703 * include/experimental/string: Likewise.
1704 * include/experimental/string_view: Likewise.
1705 * include/experimental/system_error: Likewise.
1706 * include/experimental/tuple: Likewise.
1707 * include/experimental/type_traits: Likewise.
1708 * include/experimental/unordered_map: Likewise.
1709 * include/experimental/unordered_set: Likewise.
1710 * include/experimental/utility: Likewise.
1711 * include/experimental/vector: Likewise.
1712 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1713 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1714 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1716 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1717 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1718 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1719 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1720 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1722 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1723 * include/experimental/bits/fs_fwd.h: Improve docs.
1724 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1725 * include/experimental/bits/fs_path.h: Likewise.
1726 (path, filesystem_error, u8path): Improve docs.
1727 * include/experimental/filesystem: Link to docs for TS.
1729 * config/allocator/new_allocator_base.h (__allocator_base): Add
1730 workaround for Doxygen bug #6945.
1731 * include/std/memory: Improve docs. Define group for pointer safety.
1732 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1733 conditional to suppress documentation for implementation details.
1735 * include/bits/specfun.h: Improve docs.
1736 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1739 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1740 (std::experimental): Add docs.
1741 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1742 namespace to nothing when generating docs.
1743 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1744 * include/std/chrono (std::chrono): Likewise.
1745 * include/std/functional (std::placeholders): Likewise.
1746 * include/std/thread (std::this_thread): Likewise.
1748 * include/parallel/settings.h: Fix Doxygen markup.
1750 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1751 anything unless PB_DS_CLASS_C_DEC is defined.
1752 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1753 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1754 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1755 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1756 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1757 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1758 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1760 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1761 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1762 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1763 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1764 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1765 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1766 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1767 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1768 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1769 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1770 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1772 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1773 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1775 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1778 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1779 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1780 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1783 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1785 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1786 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1787 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1788 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1789 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1790 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1792 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1793 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1796 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1799 * include/std/complex (__complex_proj): Return parameter unchanged.
1800 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1801 floating-point types to take std::complex arguments.
1802 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1803 floating-point types.
1804 * testsuite/26_numerics/complex/proj.cc: New test.
1806 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1808 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1809 to _Lock_policyE[012].
1810 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1812 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1814 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1815 macros accidentally left in.
1816 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1817 unnecessary -lstdc++fs option. Fix test for mingw.
1818 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1821 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1823 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1825 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1827 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1829 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1830 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1833 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1835 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1838 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1839 class template and partial specialization.
1842 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1844 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1845 functions to convert a value to an integral type.
1846 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1847 (fill_n): Convert _Size parameter to an integral type.
1848 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1849 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1850 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1851 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1852 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1853 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1855 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1857 Adding noexcept-specification on tuple constructors (LWG 2899)
1858 * libstdc++-v3/include/std/tuple:
1859 (tuple()): Add noexcept-specification.
1860 (tuple(const _Elements&...)): Likewise
1861 (tuple(_UElements&&...)): Likewise
1862 (tuple(const tuple<_UElements...>&)): Likewise
1863 (tuple(tuple<_UElements...>&&)): Likewise
1864 (tuple(const _T1&, const _T2&)): Likewise
1865 (tuple(_U1&&, _U2&&)): Likewise
1866 (tuple(const tuple<_U1, _U2>&): Likewise
1867 (tuple(tuple<_U1, _U2>&&): Likewise
1868 (tuple(const pair<_U1, _U2>&): Likewise
1869 (tuple(pair<_U1, _U2>&&): Likewise
1870 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1872 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1875 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1876 arguments with __restrict.
1878 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1880 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1882 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1884 * include/experimental/bits/fs_path.h
1885 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1886 avoid redundant call to _S_convert_loc with non-const pointers.
1888 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1889 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1890 * testsuite/21_strings/basic_string/hash/hash.cc
1891 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1892 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1893 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1895 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1896 wstring::_M_replace_dispatch with more specific patterns.
1897 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1898 Create const std::string to avoid redundant call to _S_convert_loc
1899 with non-const pointers.
1900 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1901 avoid unnecessary basic_string::assign instantiations.
1903 * include/std/memory (__uses_alloc_args): Add string-literal to
1904 static_assert, to match the one in __uses_alloc.
1905 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1906 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1907 for recursive uses-allocator construction of nested pairs.
1908 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1911 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1913 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1914 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1915 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1916 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1918 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1919 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1920 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1921 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1922 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1923 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1924 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1926 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1929 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1930 * include/std/scoped_allocator [__cplusplus > 201703L]
1931 (scoped_allocator_adaptor::construct): Define in terms of
1932 uses_allocator_construction_args, as per P0591R4.
1933 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1934 * testsuite/util/testsuite_allocator.h: Remove name of unused
1937 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1939 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1940 * doc/html/*: Regenerate.
1942 * include/bits/fs_path.h (operator<, operator<=, operator>)
1943 (operator>=, operator==, operator!=): Make hidden friends, as per
1945 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1946 string type in test.
1947 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1949 * include/std/any (any::any(ValueType&&)): Use __and_v.
1950 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1953 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1955 * include/std/type_traits (__result_of_memfun): Use remove_reference
1956 instead of __remove_cvref_t and remove redundant is_same check.
1957 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1959 * include/experimental/string_view (basic_string_view::pointer)
1960 (basic_string_view::reference): Fix to refer to non-const value_type.
1961 * include/bits/basic_string.h (basic_string): Use __sv_check and
1962 __sv_limit instead of basic_string_view::_M_check and
1963 basic_string_view::_M_limit.
1964 * include/std/string_view (__sv_check, __sv_limit): New
1965 helper functions to replace basic_string_view::_M_check and
1966 basic_string_view::_M_limit.
1967 (basic_string_view): Add static assertions to enforce ill-formed
1968 requirement for traits_type::char_type from P1148R0, and to enforce
1969 required properties of char-like types.
1970 (basic_string_view::pointer, basic_string_view::reference): Fix to
1971 refer to non-const value_type.
1972 (basic_string_view::operator[], basic_string_view::at)
1973 (basic_string_view::front, basic_string_view::back)
1974 (basic_string_view::data): Use const_reference and const_pointer
1975 typedefs for return types.
1976 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1977 (hash<wstring_view>): Fix argument_type typedef.
1978 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1979 char/1.cc: Fix expected return type of basic_string_view::data().
1980 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1981 wchar_t/1.cc: Likewise.
1982 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1983 char/1.cc: Likewise.
1984 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1985 wchar_t/1.cc: Likewise.
1986 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1988 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1989 Check reference and pointer typedefs.
1990 * testsuite/experimental/string_view/requirements/typedefs.cc:
1992 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1993 Fix expected return type of basic_string_view::data().
1994 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1996 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1998 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2002 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2003 Avoid a runtime check for types that can never be stored in std::any.
2004 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2007 PR libstdc++/90220 (partial)
2008 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2009 not attempt ill-formed static_cast to pointers to non-object types.
2010 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2013 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2014 prevent -Wcatch-value warning.
2016 * include/std/variant (__variant_construct): Use template parameter
2017 type instead of equivalent decltype-specifier.
2018 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2019 Replace forward with move.
2020 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2021 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2022 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2023 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2024 index after construction succeeds.
2025 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2026 if-constexpr checks that are always true. Use __remove_cvref_t instead
2027 of remove_reference so that is_nothrow_move_constructible check
2028 doesn't use a const rvalue parameter. In the potentially-throwing case
2029 construct a temporary and move assign it, as per LWG 2904.
2030 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2031 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2032 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2033 construct a temporary and move assign from it, as per LWG 2904.
2034 * testsuite/20_util/variant/exception_safety.cc: Check that
2035 assignment operators have strong exception safety guarantee.
2037 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2039 Document PSTL linker flags
2041 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2043 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2045 * include/std/variant (__detail::__variant::_Traits): Make
2046 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2047 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2049 (__detail::__variant::_Copy_assign_alias): Only depend on
2050 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2051 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2052 move assignment operators.
2055 * include/std/variant (variant::__not_self): New helper for the
2056 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2057 (variant::__to_type_impl): Remove.
2058 (variant::__to_type): Add default argument to check pack size, instead
2059 of using __to_type_impl.
2060 (variant::__accepted_type): Add default argument using __not_self.
2061 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2062 for variant(T&&) constructor constraint.
2063 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2064 Extract __accepted_type into a named template parameter for reuse in
2065 other constraints and in the exception specification.
2066 (variant::variant(in_place_type_t<T>, Args&&...))
2067 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2068 (variant::variant(in_place_index_t<T>, Args&&...))
2069 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2070 (variant::operator=T&&)): Remove redundant && from trait arguments.
2071 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2072 isn't used for in_place_type or in_place_index arguments.
2074 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2075 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2076 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2078 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2079 Bernd Edlinger <bernd.edlinger@hotmail.de>
2080 Jakub Jelinek <jakub@redhat.com>
2083 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2084 general-regs-only target attribute for ARM.
2086 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2089 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2090 specialization also depend on is_nothrow_move_constructible.
2091 * include/std/variant (__detail::__variant::__never_valueless()):
2092 Only true if the variant would have a move assignment operator.
2093 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2094 Check __never_valueless<T...>().
2095 (variant::emplace): Only perform non-throwing move assignments
2096 for never-valueless alternatives if the variant has a move assignment
2098 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2099 types can be emplaced into non-assignable variants.
2100 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2101 don't get copied when emplaced into non-assignable variants.
2103 * include/std/variant (__detail::__variant::__ref_cast): Remove
2105 (__detail::__variant::_Uninitialized::_M_get)
2106 (__detail::__variant::__get)
2107 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2109 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2111 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2113 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2114 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2115 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2116 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2118 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2120 Delegate PSTL configuration to pstl/pstl_config.h
2122 * include/bits/c++config: Remove explicit PSTL configuration
2123 macros and use definitions from <pstl/pstl_config.h>.
2125 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2127 Cleanup algorithm implementations
2128 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2130 (mismatch): Forward execution policy.
2131 (equal): Qualify call to std::equal().
2132 (partial_sort): Forward execution policy.
2133 (inplace_merge): Forward execution policy.
2135 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2137 Improve implementation of parallel equal()
2138 * include/pstl/algorithm_impl.h
2139 (__internal::__brick_equal): use "4 iterator" version of
2141 (__internal::__brick_equal): use simd for random access
2142 iterators on unsequenced execution policies.
2143 (__internal::__pattern_equal): add "4 iterator" version
2144 (__internal::__pattern_equal): dispatch to simd __brick_equal
2145 for vector-only execution policies.
2146 (__internal::__pattern_equal): dispatch to __parallel_or for
2147 parallel execution policies.
2148 * include/pstl/glue_algorithm_impl.h
2149 (std::equal): dispatch to "4 iterator" version of
2150 __internal::__pattern_equal().
2152 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2155 * include/bits/forward_list.h (operator==): Do not use operator!= to
2157 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2158 earlier in the list, so that sort is stable.
2159 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2160 * testsuite/23_containers/forward_list/comparable.cc: Test with
2161 types that meet the minimum EqualityComparable and LessThanComparable
2162 requirements. Remove irrelevant comment.
2164 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2165 Do not depend on whether all alternative types are move constructible.
2166 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2167 from the operand when deciding whether to perform the assignment.
2168 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2169 with deleted move constructor and deleted move assignment operator.
2170 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2171 behaviour of variants with DeletedMoves as an alternative.
2172 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2173 (move_ctor, move_assign): Check that moving a variant with a
2174 DeletedMoves alternative falls back to copying instead of moving.
2176 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2177 from static_assert declarations.
2179 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2180 actually match its name.
2181 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2182 (test_swap()): Fix result for MoveCtorOnly and check
2183 MoveCtorAndSwapOnly.
2185 * include/std/optional (optional::value_or(U&&) &&): Add missing
2186 constexpr specifier.
2187 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2188 for disengaged optionals and rvalue optionals.
2189 * testsuite/20_util/optional/observers/4.cc: Likewise.
2191 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2193 * include/pstl/algorithm_impl.h: Uglify identfiers.
2194 * include/pstl/numeric_impl.h: Uglify identfiers.
2195 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2197 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2199 * include/bits/c++config:
2200 Add definition for __PSTL_ASSERT.
2201 Add definition for __PSTL_ASSERT_MSG.
2202 * include/pstl/algorithm_impl.h: Replace use of assert().
2203 * include/pstl/numeric_impl.h: Replace use of assert().
2204 * include/pstl/parallel_backend_tbb.h:
2205 Replace use of assert().
2206 Replace use of __TBB_ASSERT().
2207 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2209 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2212 * src/c++17/memory_resource.cc
2213 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2214 needed to allow placing a _Chunk at the end of the buffer.
2215 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2217 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2219 * doc/xml/faq.xml: Add information about emergency EH pool.
2220 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2221 Move outdated information on mt_allocator to a separate section.
2222 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2223 doesn't affect the default allocator.
2225 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2229 * testsuite/20_util/variant/89851.cc: New test.
2231 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2233 * include/std/variant: Adjust whitespace. Add comments.
2234 (_Multi_array): Leave primary template undefined.
2235 (_Multi_array<_Tp>): Define partial specialization for base case of
2237 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2238 which is always a reference.
2239 (__gen_vtable::_S_apply()): Remove function, inline body into
2240 default member initializer.
2241 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2243 * include/std/variant (__variant_idx_cookie): Add member type.
2244 (__visitor_result_type): Remove.
2245 (__do_visit): Use invoke_result instead of __visitor_result_type.
2246 * testsuite/20_util/variant/visit.cc: New test.
2249 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2251 * testsuite/20_util/variant/90008.cc: New test.
2253 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2255 * include/pstl/algorithm_impl.h: Add namespace qualification.
2256 * include/pstl/execution_defs.h: Add namespace qualification.
2257 * include/pstl/execution_impl.h: Add namespace qualification.
2258 * include/pstl/numeric_impl.h: Add namespace qualification.
2259 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2260 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2261 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2263 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2265 Fix visit<R> for variant.
2266 * include/std/variant (__do_visit): Add a template parameter
2267 for enforcing same return types for visit.
2268 (__gen_vtable_impl): Likewise.
2269 (_S_apply_single_alt): Adjust.
2270 (__visit_invoke_impl): New. Handle casting to void.
2271 (__do_visit_invoke): New. Enforces same return types.
2272 (__do_visit_invoke_r): New. Converts return types.
2273 (__visit_invoke): Adjust.
2274 (__gen_vtable): Add a template parameter for enforcing
2275 same return types for visit.
2276 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2277 different return types.
2278 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2279 visitors with different return types don't accidentally
2280 compile with regular visitation.
2282 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2284 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2285 dg-require-filesystem-ts.
2287 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2289 * doc/xml/manual/status_cxx2020.xml: Update status.
2290 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2291 * testsuite/20_util/variant/visit_r.cc: New test.
2293 * include/bits/fs_dir.h (directory_iterator::operator*)
2294 (directory_iterator::operator->): Add noexcept.
2295 (operator==, operator!=): Replace namespace-scope equality operators
2296 for directory iterators with hidden friends.
2299 * config/abi/pre/gnu.ver: Add missing exports.
2300 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2303 * config/abi/pre/gnu.ver: Export new symbols.
2304 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2305 (recursive_directory_iterator::recursion_pending())
2306 (recursive_directory_iterator::disable_recursion_pending()): Remove
2307 inline definitions. Make noexcept.
2308 (recursive_directory_iterator::depth())
2309 (recursive_directory_iterator::operator*())
2310 (recursive_directory_iterator::operator->()): Make noexcept.
2311 (recursive_directory_iterator::_M_options)
2312 (recursive_directory_iterator::_M_pending): Remove data members.
2313 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2314 (recursive_directory_iterator::recursive_directory_iterator): Remove
2315 ctor-initializer. Use new constructor for _Dir_stack.
2316 (recursive_directory_iterator::options())
2317 (recursive_directory_iterator::recursion_pending())
2318 (recursive_directory_iterator::disable_recursion_pending()): Add
2319 non-inline definitions.
2320 (recursive_directory_iterator::depth()): Make noexcept.
2321 (recursive_directory_iterator::increment(error_code&))
2322 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2323 location of options and recursion_pending members.
2324 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2325 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2326 user-declared move constructor and assignment operator, to make the
2329 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2330 d_type == DT_UNKNOWN immediately.
2331 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2333 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2335 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2337 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2338 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2341 PR libstdc++/87431 (again)
2342 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2343 Define partial specialization for basic_string.
2344 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2345 shared_ptr and weak_ptr.
2346 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2348 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2350 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2352 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2354 * include/std/any (_Never_valueless_alt): Define explicit
2355 specialization for any.
2356 * include/std/variant (_Never_valueless_alt): Define primary template.
2357 (__never_valueless): Use _Never_valueless_alt instead of
2358 is_trivially_copyable.
2359 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2360 initializations to avoid try-catch overhead. Add special case for
2361 scalars produced by potentially-throwing conversions. Use
2362 _Never_valueless_alt instead of is_trivially_copyable for the
2363 remaining strong exception-safety cases.
2364 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2365 * testsuite/20_util/variant/87431.cc: Run both test functions.
2366 * testsuite/20_util/variant/exception_safety.cc: New test.
2367 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2368 so the variant becomes valueless.
2370 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2373 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2375 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2377 * include/std/string (__hash_string_base): New class template defining
2378 operator() for hashing strings.
2379 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2380 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2381 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2382 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2384 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2386 Use single-visitation in variant assignment and swap and relops.
2387 Also use indices instead of types when checking whether
2388 variants hold the same thing.
2389 * include/std/variant (__do_visit): Add a template parameter
2390 for index visitation, invoke with indices if index visitation
2392 (__variant_idx_cookie): New.
2393 (__visit_with_index): Likewise.
2394 (_Copy_assign_base::operator=): Do single-visitation with
2396 (_Move_assign_base::operator=): Likewise.
2397 (_Extra_visit_slot_needed): Adjust.
2398 (__visit_invoke): Call with indices if it's an index visitor.
2399 (relops): Do single-visitation with an index visitor.
2401 (__visitor_result_type): New.
2403 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2405 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2407 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2409 Don't revisit a variant we are already visiting.
2410 * include/std/variant (__variant_construct_single): New.
2411 (__variant_construct): Use it.
2412 (_M_destructive_move): Likewise.
2413 (_M_destructive_copy): Likewise.
2414 (_Copy_assign_base::operator=): Adjust.
2415 (_Move_assign_base::operator=): Likewise.
2418 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2421 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2422 destructor so they are not evaluated until the _Key type is complete.
2423 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2424 * testsuite/23_containers/set/85965.cc: New test.
2425 * testsuite/23_containers/unordered_set/85965.cc: New test.
2426 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2427 with regexp matching the corresponding _Rb_tree specialization.
2428 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2429 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2430 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2431 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2432 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2433 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2434 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2436 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2439 Fix based on a suggestion by Antony Polukhin.
2440 * include/std/variant (__never_valueless): New.
2442 (_Extra_visit_slot_needed): New.
2443 (_Multi_array): Use it.
2444 (_S_apply_all_alts): Likewise.
2446 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2449 Fix based on a suggestion by Antony Polukhin.
2450 * include/std/variant (__gen_vtable): Don't reserve an
2451 additional table slot, _Multi_array already does that.
2453 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2456 Fix based on a suggestion by Antony Polukhin.
2457 * include/std/variant (__variant_construct): Capture a pointer
2458 to the storage and visit just one variant.
2460 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2462 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2463 Doxygen-generated pages with unstable URL.
2464 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2465 * doc/xml/manual/extensions.xml: Likewise.
2466 * doc/xml/manual/parallel_mode.xml: Likewise.
2467 * doc/xml/manual/support.xml: Likewise.
2469 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2470 avoid -Wconversion warnings.
2472 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2474 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2475 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2476 (allstamped): Add stamp-pstl.
2477 (install-headers): Add ptsl_builddir.
2478 * include/Makefile.in: Regenerate.
2479 * include/bits/c++config: Add pstl configuration.
2480 * include/pstl/LICENSE.txt: New file.
2481 * include/pstl/algorithm_fwd.h: New file.
2482 * include/pstl/algorithm_impl.h: New file.
2483 * include/pstl/execution_defs.h: New file.
2484 * include/pstl/execution_impl.h: New file.
2485 * include/pstl/glue_algorithm_defs.h: New file.
2486 * include/pstl/glue_algorithm_impl.h: New file.
2487 * include/pstl/glue_execution_defs.h: New file.
2488 * include/pstl/glue_memory_defs.h: New file.
2489 * include/pstl/glue_memory_impl.h: New file.
2490 * include/pstl/glue_numeric_defs.h: New file.
2491 * include/pstl/glue_numeric_impl.h: New file.
2492 * include/pstl/memory_impl.h: New file.
2493 * include/pstl/numeric_fwd.h: New file.
2494 * include/pstl/numeric_impl.h: New file.
2495 * include/pstl/parallel_backend.h: New file.
2496 * include/pstl/parallel_backend_tbb.h: New file.
2497 * include/pstl/parallel_backend_utils.h: New file.
2498 * include/pstl/parallel_impl.h: New file.
2499 * include/pstl/pstl_config.h: New file.
2500 * include/pstl/unseq_backend_simd.h: New file.
2501 * include/pstl/utils.h: New file.
2502 * include/std/algorithm: Include parallel algorithm implementations.
2503 * include/std/execution: New file.
2504 * include/std/memory: Include parallel algorithm implementations.
2505 * include/std/numeric: Include parallel algorithm implementations.
2506 * include/std/version: Add parallel algorithms feature test macro.
2507 * testsuite/util/pstl/pstl_test_config.h: New file.
2508 * testsuite/util/pstl/test_utils.h: New file.
2509 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2510 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2511 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2512 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2513 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2514 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2515 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2516 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2517 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2518 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2519 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2520 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2521 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2522 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2523 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2524 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2525 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2526 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2527 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2528 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2529 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2530 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2531 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2532 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2533 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2534 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2535 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2536 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2537 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2538 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2539 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2540 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2541 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2542 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2543 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2544 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2545 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2546 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2547 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2548 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2549 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2550 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2551 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2552 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2553 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2554 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2555 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2556 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2557 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2558 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2559 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2560 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2561 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2562 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2563 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2564 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2565 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2566 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2567 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2568 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2569 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2570 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2571 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2572 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2573 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2574 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2575 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2576 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2577 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2578 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2579 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2580 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2581 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2582 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2583 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2584 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2585 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2586 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2587 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2588 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2589 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2590 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2591 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2592 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2593 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2594 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2595 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2596 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2597 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2598 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2599 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2600 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2601 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2602 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2603 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2604 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2605 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2606 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2607 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2608 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2609 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2610 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2611 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2612 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2613 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2614 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2616 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2618 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2619 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2620 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2621 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2622 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2623 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2624 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2625 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2626 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2627 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2628 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2629 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2630 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2631 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2632 when the special functions IS is enabled, not for C++17.
2633 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2635 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2636 without checks for special functions in C++17.
2637 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2641 * include/backward/hash_map: Use <> for includes not "".
2642 * include/backward/hash_set: Likewise.
2643 * include/backward/strstream: Likewise.
2644 * include/tr1/bessel_function.tcc: Likewise.
2645 * include/tr1/exp_integral.tcc: Likewise.
2646 * include/tr1/legendre_function.tcc: Likewise.
2647 * include/tr1/modified_bessel_func.tcc: Likewise.
2648 * include/tr1/riemann_zeta.tcc: Likewise.
2650 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2652 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2653 of extension allocators.
2654 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2655 Document new headers in 7.2, 8.1 and 9.1 releases.
2656 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2657 * doc/html/*: Regenerate.
2659 2019-03-12 John David Anglin <dave.anglin@bell.net>
2662 * testsuite/lib/libstdc++.exp: Locate libatomic.
2663 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2664 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2666 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2667 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2668 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2669 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2671 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2674 * configure.ac: Check for sockatmark.
2675 * crossconfig.m4: Check for sockatmark.
2676 * config.h.in: Regenerate.
2677 * configure: Regenerate.
2678 * include/experimental/internet (address_v4::_S_hton): Rename
2679 overloaded functions to _S_hton_16 and _S_ntoh_16.
2680 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2681 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2682 * include/experimental/socket (basic_socket::at_mark): Check
2683 _GLIBCXX_HAVE_SOCKATMARK.
2685 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2686 const variables instead of macros.
2689 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2690 Use correct type for len_aligned.
2691 * testsuite/20_util/hash/89629.cc: New test.
2693 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2696 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2697 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2698 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2699 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2700 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2701 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2702 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2703 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2704 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2705 memory_order_seq_cst to int.
2707 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2709 * doc/xml/manual/using.xml: Use link element instead of xref.
2710 * doc/html/*: Regenerate.
2712 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2714 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2717 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2718 parameters in deduction guides.
2719 * include/debug/multimap.h (multimap): Likewise.
2720 * include/debug/set.h (multimap): Likewise.
2721 * include/debug/multiset.h (multimap): Likewise.
2722 * include/debug/unordered_map (unordered_map): Likewise.
2723 (unordered_multimap): Likewise.
2724 * include/debug/unordered_set (unordered_set): Likewise.
2725 (unordered_multiset): Likewise.
2728 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2729 Invalidate all iterators in case of rehash.
2730 (unordered_multimap<>::_M_check_rehashed): Likewise.
2731 * include/debug/unordered_set
2732 (unordered_set<>::_M_check_rehashed): Likewise.
2733 (unordered_multiset<>::_M_check_rehashed): Likewise.
2734 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2736 2019-03-07 Andreas Schwab <schwab@suse.de>
2738 * config/abi/post/riscv64-linux-gnu: New directory.
2739 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2741 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2743 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2744 compile test to run. Fix typo.
2746 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2747 * doc/html/*: Regenerate.
2749 P0356R5 Simplified partial function application
2750 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2751 helpers for bind_front.
2752 (bind_front, __cpp_lib_bind_front): Define.
2753 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2755 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2757 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2758 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2759 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2760 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2762 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2764 PR libstdc++/86655 - std::assoc_legendre should not constrain
2765 the value of m (or x).
2766 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2767 __sph_legendre): If degree > order Don't throw, return 0.
2768 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2769 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2770 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2771 * testsuite/tr1/5_numerical_facilities/special_functions/
2772 02_assoc_legendre/pr86655.cc: New test.
2773 * testsuite/tr1/5_numerical_facilities/special_functions/
2774 22_sph_legendre/pr86655.cc: New test.
2776 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2779 Also PR libstdc++/85517
2780 * include/std/variant (__do_visit): New.
2781 (__variant_cast): Likewise.
2782 (__variant_cookie): Likewise.
2783 (__erased_*): Remove.
2784 (_Variant_storage::_S_vtable): Likewise.
2785 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2786 (_Variant_storage::__M_reset): Adjust.
2787 (__variant_construct): New.
2788 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2789 __variant_construct.
2790 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2791 (_Move_ctor_base::__M_destructive_copy): New.
2792 (_Move_ctor_base::__M_destructive_move): Adjust to use
2793 __variant_construct.
2794 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2795 (_Copy_assign_alias): Adjust to check both copy assignment
2796 and copy construction for triviality.
2797 (_Move_assign_base::operator=): Adjust to use __do_visit.
2798 (_Multi_array): Add support for visitors that accept and return
2800 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2801 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2802 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2803 a __variant_cookie temporary for a variant that is valueless and..
2804 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2805 (__gen_vtable::_Array_type): Conditionally make space for
2806 the __variant_cookie visitor case.
2807 (__variant_construct_by_index): New.
2808 (get_if): Adjust to use std::addressof.
2809 (relops): Adjust to use __do_visit.
2810 (variant): Add __variant_cast and __variant_construct_by_index
2812 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2813 instead of self-destruction.
2814 (variant::swap): Adjust to use __do_visit.
2815 (visit): Reimplement in terms of __do_visit.
2816 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2817 * testsuite/20_util/variant/compile.cc: Adjust.
2818 * testsuite/20_util/variant/run.cc: Likewise.
2820 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2822 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2824 * testsuite/experimental/feat-char8_t.cc: Likewise.
2826 * include/std/type_traits [C++20] (is_bounded_array)
2827 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2829 * testsuite/20_util/is_bounded_array/requirements/
2830 explicit_instantiation.cc: New test.
2831 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2833 * testsuite/20_util/is_bounded_array/value.cc: New test.
2834 * testsuite/20_util/is_unbounded_array/requirements/
2835 explicit_instantiation.cc: New test.
2836 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2838 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2840 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2842 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2844 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2846 * include/c_compatibility/math.h [C++20] (lerp): Add using
2848 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2849 (__lerp): Define function template to implement lerp.
2850 (lerp(float, float, float), lerp(double, double, double))
2851 (lerp(long double, long double, long double)): Define for C++20.
2852 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2853 (midpoint(T, T), midpoint(T*, T*)): Define.
2854 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2855 * testsuite/26_numerics/lerp.cc: New test.
2856 * testsuite/26_numerics/midpoint/floating.cc: New test.
2857 * testsuite/26_numerics/midpoint/integral.cc: New test.
2858 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2860 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2862 PR libstdc++/88996 Implement P0439R0
2863 Make std::memory_order a scoped enumeration.
2864 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2865 add variables for the old enumerators. Adjust calls.
2866 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2867 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2869 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2871 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2874 * include/std/memory_resource (polymorphic_allocator): Add default
2875 template argument for C++20.
2876 (polymorphic_allocator::allocate_bytes)
2877 (polymorphic_allocator::deallocate_bytes)
2878 (polymorphic_allocator::allocate_object)
2879 (polymorphic_allocator::deallocate_object)
2880 (polymorphic_allocator::new_object)
2881 (polymorphic_allocator::delete_object): New member functions for
2883 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2886 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2889 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2892 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2894 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2895 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2897 * include/std/memory (uses_allocator_construction_args): New set of
2898 overloaded functions.
2899 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2901 * include/std/memory_resource (polymorphic_allocator::construct)
2902 [__cplusplus > 201703l]: Replace all overloads with a single function
2903 using uses_allocator_construction_args.
2904 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2906 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2908 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2911 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2912 stylesheet directories before check for xsltproc. Try to use
2913 xmlcatalog to find local stylesheet directory before trying hardcoded
2914 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2915 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2916 use xsltproc if xmlcatalog fails to find a local stylesheet.
2917 * configure.ac: Check for xmlcatalog.
2918 * Makefile.in: Regenerate.
2919 * configure: Likewise.
2920 * doc/Makefile.in: Likewise.
2921 * include/Makefile.in: Likewise.
2922 * libsupc++/Makefile.in: Likewise.
2923 * po/Makefile.in: Likewise.
2924 * python/Makefile.in: Likewise.
2925 * src/Makefile.in: Likewise.
2926 * src/c++11/Makefile.in: Likewise.
2927 * src/c++17/Makefile.in: Likewise.
2928 * src/c++98/Makefile.in: Likewise.
2929 * src/filesystem/Makefile.in: Likewise.
2930 * testsuite/Makefile.in: Likewise.
2932 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2935 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2936 container deduction guides.
2937 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2938 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2939 parameters in deduction guides.
2940 * include/bits/stl_multimap.h (multimap): Likewise.
2941 * include/bits/stl_multiset.h (multiset): Likewise.
2942 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2943 * include/bits/stl_set.h (set): Likewise.
2944 * include/bits/stl_stack.h (stack): Likewise.
2945 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2946 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2947 constrain parameters in deduction guides.
2948 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2950 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2952 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2953 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2954 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2955 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2957 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2959 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2962 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2963 to class template and partial specialization using void_t.
2964 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2966 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2969 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2970 copy and move members public.
2972 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2974 * include/std/type_traits (__underlying_type_impl): New helper to
2975 make underlying_type SFINAE-friendly.
2976 (underlying_type): Derive from __underlying_type_impl.
2977 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2981 * include/bits/char_traits.h (__constant_char_array): Check index is
2982 in range before dereferencing.
2983 (char_traits<char>::compare, char_traits<char>::find)
2984 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2985 immediately if n is zero.
2986 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2987 Remove workarounds for PR 67026.
2988 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2990 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2993 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2995 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2996 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2998 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3001 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3002 type to std::size_t and argument to type to long double.
3004 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3006 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3007 * config/abi/post/sparc64-linux-gnu: New directory.
3008 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3009 * config/abi/post/sparc64-linux-gnu/32: New directory.
3010 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3012 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3014 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3015 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3018 2019-02-22 Tom Honermann <tom@honermann.net>
3020 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3021 printers for u8string and u8string_view.
3023 2019-02-22 Tom Honermann <tom@honermann.net>
3025 * testsuite/18_support/byte/ops.cc: Validate
3026 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3027 std::to_integer<char32_t>.
3028 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3029 std::numeric_limits<char8_t>.
3030 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3031 std::numeric_limits<char8_t>::lowest().
3032 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3033 std::numeric_limits<char8_t>::max_digits10.
3034 * testsuite/18_support/type_info/fundamental.cc: Validate
3035 typeinfo for char8_t.
3036 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3037 std::from_chars with char8_t.
3038 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3039 Validate explicit instantiation of std::hash<char8_t>.
3040 * testsuite/20_util/is_integral/value.cc: Validate
3041 std::is_integral<char8_t>.
3042 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3043 Validate std::make_signed<char8_t>.
3044 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3045 Validate u8string construction from char8_t sources.
3046 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3048 * testsuite/21_strings/basic_string_view/operations/compare/
3049 char/70483.cc: Validate substr operations on u8string_view.
3050 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3051 the u8string_view typedef is defined.
3052 * testsuite/21_strings/char_traits/requirements/
3053 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3055 * testsuite/21_strings/char_traits/requirements/
3056 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3057 constexpr member functions.
3058 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3059 that the u8string typedef is defined.
3060 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3061 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3062 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3063 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3065 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3066 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3068 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3069 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3070 Validate std::atomic<char8_t>::is_always_lock_free
3071 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3072 Update line numbers.
3073 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3075 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3077 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3078 Validate std::experimental::pmr::u8string.
3079 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3080 u8string_view typedef is defined.
3081 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3082 char32_t to the typelists.
3084 2019-02-22 Tom Honermann <tom@honermann.net>
3086 * include/ext/typelist.h: Constrain a partial specialization of
3087 typelist::detail::append_ to only match chain<T1,T2>.
3089 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3092 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3093 class template with class. Replace move and copy member types with
3094 member alias templates, so they are only instantiated when needed.
3095 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3096 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3097 test for C++11/14/17 as well.
3098 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3101 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3104 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3105 _GLIBCXX_PURE to the alias declaration.
3107 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3109 * testsuite/21_strings/basic_string/literals/types.cc
3110 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3111 * testsuite/21_strings/basic_string/literals/values.cc
3112 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3113 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3114 potentially having different type.
3115 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3116 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3118 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3119 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3120 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3121 string literals only using basic character set.
3122 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3123 u8 literals to char.
3124 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3125 Test ATOMIC_CHAR8_T_LOCK_FREE.
3126 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3127 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3128 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3129 * testsuite/experimental/string_view/literals/types.cc
3130 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3132 * testsuite/experimental/string_view/literals/values.cc
3133 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3135 2019-02-19 Tom Honermann <tom@honermann.net>
3137 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3138 from char16_32_t.cc; validates numeric_limits<char8_t>.
3139 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3140 test cloned from types.cc; validates operator""s for char8_t
3142 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3143 test cloned from values.cc; validates construction and comparison
3145 * testsuite/21_strings/basic_string/requirements/
3146 /explicit_instantiation/char8_t/1.cc: New test cloned from
3147 char16_t/1.cc; validates explicit instantiation of
3148 basic_string<char8_t>.
3149 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3150 New test cloned from types.cc; validates operator""sv for char8_t
3151 returns u8string_view.
3152 * testsuite/21_strings/basic_string_view/literals/
3153 values-char8_t.cc: New test cloned from values.cc; validates
3154 construction and comparison of u8string_view values.
3155 * testsuite/21_strings/basic_string_view/requirements/
3156 explicit_instantiation/char8_t/1.cc: New test cloned from
3157 char16_t/1.cc; validates explicit instantiation of
3158 basic_string_view<char8_t>.
3159 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3160 New test cloned from char16_t/65049.cc; validates that
3161 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3162 * testsuite/21_strings/char_traits/requirements/char8_t/
3163 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3164 that char_traits<char8_t> member typedefs are present and correct.
3165 * testsuite/21_strings/char_traits/requirements/
3166 explicit_instantiation/char8_t/1.cc: New test cloned from
3167 char16_t/1.cc; validates explicit instantiation of
3168 char_traits<char8_t>.
3169 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3170 from char16_t.cc: validates
3171 codecvt<char16_t, char8_t, mbstate_t>.
3172 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3173 from char32_t.cc: validates
3174 codecvt<char32_t, char8_t, mbstate_t>.
3175 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3176 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3177 codecvt<char32_t, char8_t, std::mbstate_t>.
3178 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3179 test cloned from string.cc; validates filesystem::path construction
3181 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3182 the __cpp_lib_char8_t feature test macro is defined with the
3184 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3185 New test cloned from string.cc; validates filesystem::path
3186 construction from char8_t input.
3187 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3188 test cloned from types.cc; validates operator""sv for char8_t
3189 returns u8string_view.
3190 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3191 New test cloned from values.cc; validates construction and
3192 comparison of u8string_view values.
3193 * testsuite/experimental/string_view/requirements/
3194 explicit_instantiation/char8_t/1.cc: New test cloned from
3195 char16_t/1.cc; validates explicit instantiation of
3196 basic_string_view<char8_t>.
3197 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3198 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3201 2019-02-19 Tom Honermann <tom@honermann.net>
3203 P0482R5 char8_t: Standard library support
3204 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3205 typeinfo symbols for char8_t.
3206 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3207 (GLIBCXX_3.4.26): Add symbols for specializations of
3208 numeric_limits and codecvt that involve char8_t.
3209 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3210 * include/bits/atomic_base.h: Add atomic_char8_t.
3211 * include/bits/basic_string.h: Add std::hash<u8string> and
3212 operator""s(const char8_t*, size_t).
3213 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3215 * include/bits/char_traits.h: Add char_traits<char8_t>.
3216 * include/bits/codecvt.h: Add
3217 codecvt<char16_t, char8_t, mbstate_t>,
3218 codecvt<char32_t, char8_t, mbstate_t>,
3219 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3220 codecvt_byname<char32_t, char8_t, mbstate_t>.
3221 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3222 recognize char8_t as an integral type.
3223 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3225 (path::u8string): Return std::u8string when char8_t support is
3227 (path::generic_u8string): Likewise.
3228 (path::_S_convert): Handle conversion from char8_t input.
3229 (path::_S_str_convert): Likewise.
3230 * include/bits/functional_hash.h: Add hash<char8_t>.
3231 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3233 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3234 for new char8_t specializations.
3235 * include/bits/localefwd.h: Add missing declarations of
3236 codecvt<char16_t, char, mbstate_t> and
3237 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3238 codecvt<char16_t, char8_t, mbstate_t> and
3239 codecvt<char32_t, char8_t, mbstate_t>.
3240 * include/bits/postypes.h: Add u8streampos
3241 * include/bits/stringfwd.h: Add declarations of
3242 char_traits<char8_t> and u8string.
3243 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3244 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3246 (path::u8string): Return std::u8string when char8_t support is
3248 (path::generic_u8string): Likewise.
3249 (path::_S_convert): Handle conversion from char8_t input.
3250 (path::_S_str_convert): Likewise.
3251 * include/experimental/string: Add u8string.
3252 * include/experimental/string_view: Add u8string_view,
3253 hash<experimental::u8string_view>, and
3254 operator""sv(const char8_t*, size_t).
3255 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3256 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3257 as a character type.
3258 * include/std/limits: Add numeric_limits<char8_t>.
3259 * include/std/string_view: Add u8string_view,
3260 hash<experimental::u8string_view>, and
3261 operator""sv(const char8_t*, size_t).
3262 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3263 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3264 * libsupc++/atomic_lockfree_defines.h: Define
3265 ATOMIC_CHAR8_T_LOCK_FREE.
3266 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3267 codecvt.cc and limits.cc so that char8_t specializations of
3268 numeric_limits and codecvt and emitted.
3269 * src/c++11/Makefile.in: Likewise.
3270 * src/c++11/codecvt.cc: Define members of
3271 codecvt<char16_t, char8_t, mbstate_t>,
3272 codecvt<char32_t, char8_t, mbstate_t>,
3273 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3274 codecvt_byname<char32_t, char8_t, mbstate_t>.
3275 * src/c++11/limits.cc: Define members of
3276 numeric_limits<char8_t>.
3277 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3278 locale_init.cc and localename.cc.
3279 * src/c++98/Makefile.in: Likewise.
3280 * src/c++98/locale_init.cc: Add initialization for the
3281 codecvt<char16_t, char8_t, mbstate_t> and
3282 codecvt<char32_t, char8_t, mbstate_t> facets.
3283 * src/c++98/localename.cc: Likewise.
3284 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3286 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3288 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3289 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3290 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3292 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3294 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3295 * doc/html/*: Regenerate.
3297 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3298 * doc/html/*: Regenerate.
3300 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3301 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3302 allocator type in is_constructible checks.
3303 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3304 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3305 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3306 problematic type from LWG 2586 discussion.
3307 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3308 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3310 * configure.ac: Check for C11 timespec_get function.
3311 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3313 * config.h.in: Regenerate.
3314 * configure: Regenerate.
3315 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3316 std for C++17 and up.
3318 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3319 * include/bits/stl_queue.h
3320 (priority_queue(const Compare&, const Container&, const Alloc&))
3321 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3323 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3325 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3326 * include/bits/stl_queue.h (queue, priority_queue): Add static
3327 assertions to enforce LWG 2566 requirement on value_type.
3328 * include/bits/stl_stack.h (stack): Likewise.
3331 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3333 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3334 * include/bits/std_abs.h: Add comment about LWG 2735.
3335 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3337 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3340 * include/std/version [__cpp_impl_destroying_delete]
3341 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3342 * libsupc++/new [__cpp_impl_destroying_delete]
3343 (__cpp_lib_destroying_delete): Likewise.
3344 (destroying_delete_t, destroying_delete): Likewise, but define even
3345 when __cpp_impl_destroying_delete is not defined.
3346 * testsuite/18_support/destroying_delete.cc: New test.
3348 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3351 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3352 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3353 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3354 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3356 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3359 * include/bits/fs_path.h (path::has_root_name)
3360 (path::has_root_directory, path::has_root_path)
3361 (path::has_relative_path, path::has_parent_path)
3362 (path::has_filename, path::has_stem, path::has_extension)
3363 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3365 * src/c++17/fs_path.cc (path::has_root_name)
3366 (path::has_root_directory, path::has_root_path)
3367 (path::has_relative_path, path::has_parent_path)
3368 (path::has_filename, path::_M_find_extension): Add noexcept.
3370 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3372 PR libstdc++/89102 (partial)
3373 * include/std/type_traits (common_type<>): Define.
3374 (common_type<T>): Derive from common_type<T, T>.
3375 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3376 Test zero-length template argument list.
3377 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3378 Test additional single argument cases.
3379 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3380 Adjust expected error.
3382 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3385 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3387 * include/bits/stl_stack.h (stack): Likewise.
3388 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3389 * testsuite/23_containers/queue/deduction.cc: New test.
3390 * testsuite/23_containers/stack/deduction.cc: New test.
3393 * include/std/type_traits (__is_convertible_helper)
3394 (__is_convertible_helper<_From, _To, false>): Revert changes to
3395 support is_nothrow_convertible.
3396 (__is_nt_convertible_helper): New helper.
3397 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3399 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3400 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3403 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3404 __is_alloc_insertable_impl. Replace single type member with two
3405 members, one for each of copy and move insertable.
3406 (__is_move_insertable): New trait for internal use.
3407 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3408 (vector::_S_nothrow_relocate(true_type)): New functions to
3409 conditionally check if __relocate_a can throw.
3410 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3411 on __is_move_insertable.
3412 (vector::_S_do_relocate): New overloaded functions to conditionally
3414 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3415 based on _S_use_relocate.
3416 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3417 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3418 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3421 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3422 parameter unnamed. Add message to static assertion.
3423 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3424 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3427 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3430 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3432 (__is_bitwise_relocatable): ... to this.
3433 (__relocate_a_1): Adapt.
3434 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3435 (__is_bitwise_relocatable): ... to this.
3437 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3440 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3441 final component as well as from _M_pathname. Append the dot using
3442 operator+= instead of only to _M_pathname.
3443 (path::_M_find_extension): Reformat slightly.
3444 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3445 Add more test cases.
3447 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3449 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3451 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3453 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3454 constexpr specifiers from arg and proj.
3456 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3457 __shared_ptr instantiations used by gcc4-compatible ABI.
3459 * include/experimental/forward_list (experimental::erase): Qualify
3461 * include/experimental/list (experimental::erase): Likewise.
3462 * include/std/forward_list (std::erase): Likewise.
3463 * include/std/list (std::erase): Likewise.
3465 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3467 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3468 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3469 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3470 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3471 * testsuite/ext/array_allocator/26875.cc: Likewise.
3472 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3473 * testsuite/util/replacement_memory_operators.h: Likewise.
3474 * testsuite/util/testsuite_allocator.h: Likewise.
3476 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3477 normal mode vector, even for debug mode.
3478 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3479 Define alias template for normal mode vector.
3481 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3484 * config/locale/generic/c_locale.h (__convert_from_v)
3485 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3486 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3487 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3488 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3490 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3493 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3494 data member with static member function _S_use_relocate().
3495 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3496 (vector::_M_default_append): Use _S_use_relocate() instead of
3499 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3502 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3505 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3506 write to stderr instead of using printf.
3508 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3511 * include/bits/char_traits.h (__constant_string_p,
3512 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3515 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3517 Implement C++20 P0600r1.
3518 * include/backward/hash_map: Add nodiscard attribute to empty.
3519 * include/backward/hash_set: Likewise.
3520 * backward/hashtable.h: Likewise.
3521 * include/bits/basic_string.h: Likewise.
3522 * include/bits/forward_list.h: Likewise.
3523 * include/bits/hashtable.h: Likewise.
3524 * include/bits/regex.h: Likewise.
3525 * include/bits/stl_deque.h: Likewise.
3526 * include/bits/stl_list.h: Likewise.
3527 * include/bits/stl_map.h: Likewise.
3528 * include/bits/stl_multimap.h: Likewise.
3529 * include/bits/stl_multiset.h: Likewise.
3530 * include/bits/stl_queue.h: Likewise.
3531 * include/bits/stl_set.h: Likewise.
3532 * include/bits/stl_stack.h: Likewise.
3533 * include/bits/stl_tree.h: Likewise.
3534 * include/bits/stl_vector.h: Likewise.
3535 * include/bits/unordered_map.h: Likewise.
3536 * include/bits/unordered_set.h: Likewise.
3537 * include/debug/array: Likewise.
3538 * include/experimental/any: Likewise.
3539 * include/experimental/bits/fs_path.h: Likewise.
3540 * include/experimental/internet: Likewise.
3541 * include/experimental/string_view: Likewise.
3542 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3544 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3546 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3548 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3550 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3552 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3554 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3556 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3558 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3559 info_fn_imps.hpp: Likewise.
3560 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3561 left_child_next_sibling_heap_.hpp: Likewise.
3562 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3564 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3566 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3568 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3570 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3572 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3574 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3576 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3577 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3578 * include/ext/rope: Likewise.
3579 * include/ext/slist: Likewise.
3580 * include/ext/vstring.h: Likewise.
3581 * include/profile/array: Likewise.
3582 * include/std/array: Likewise.
3583 * include/tr1/array: Likewise.
3584 * include/tr1/hashtable.h: Likewise.
3585 * include/tr1/regex: Likewise.
3586 * include/tr2/dynamic_bitset: Likewise.
3587 * include/bits/alloc_traits.h: Add nodiscard attribute to
3589 * include/experimental/memory_resource: Likewise.
3590 * include/ext/alloc_traits.h: Likewise.
3591 * include/ext/array_allocator.h: Likewise.
3592 * include/ext/bitmap_allocator.h: Likewise.
3593 * include/ext/debug_allocator.h: Likewise.
3594 * include/ext/extptr_allocator.h: Likewise.
3595 * include/ext/mt_allocator.h: Likewise.
3596 * include/ext/new_allocator.h: Likewise.
3597 * include/ext/pool_allocator.h: Likewise.
3598 * include/ext/throw_allocator.h: Likewise.
3599 * include/std/scoped_allocator: Likewise.
3600 * libsupc++/eh_alloc.cc: Likewise.
3601 * include/std/future: Add nodiscard attribute to async.
3602 * libsupc++/new: Add nodiscard attribute to new.
3604 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3609 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3610 * include/bits/shared_ptr.h
3611 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3612 (allocate_shared): Change to use new tag type.
3613 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3614 Declare new member function.
3615 (_Sp_alloc_shared_tag): Define new type.
3616 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3617 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3618 _Sp_make_shared_tag::_S_eq to check type_info.
3619 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3620 Constrain to prevent being called with _Sp_alloc_shared_tag.
3621 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3622 Replace constructor with ...
3623 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3624 reference parameter so address of the new object can be returned to
3625 the caller. Obtain the allocator from the tag type.
3626 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3627 constructor with ...
3628 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3629 to the __shared_count constructor.
3630 (__allocate_shared): Change to use new tag type.
3631 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3633 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3635 * src/c++17/fs_ops.cc
3636 (equivalent(const path&, const path&, error_code&))
3637 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3638 compare files instead of relying on incomplete info returned by stat.
3641 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3642 if the path is already absolute.
3643 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3644 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3647 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3648 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3649 of filesystem::exists.
3650 (create_directories(const path&, error_code&)): Add assertions.
3651 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3652 Add workaround for bug in _wstat for paths with trailing slash.
3653 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3654 for expected behaviour on mingw.
3655 * testsuite/experimental/filesystem/operations/create_directories.cc:
3657 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3658 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3659 not test permissions on mingw targets.
3661 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3663 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3664 constructors and open members taking wide strings. Fix patterns for
3665 filesystem::path members to match wstring_view parameters. Add
3666 exports for shared_ptr members used by directory iterators.
3667 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3668 error code parameter if the file doesn't exist.
3669 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3671 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3672 values for mingw targets, where "/" is not an absolute path. Do not
3673 test symlinks on mingw targets.
3674 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3675 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3677 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3678 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3679 that each component of the path is created.
3680 * testsuite/experimental/filesystem/operations/create_directories.cc:
3682 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3683 permissions on mingw targets.
3684 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3685 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3686 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3687 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3689 * testsuite/experimental/filesystem/operations/permissions.cc:
3691 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3692 symlinks or permissions on mingw targets.
3693 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3694 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3695 symlinks on mingw targets.
3696 * testsuite/experimental/filesystem/operations/remove_all.cc:
3698 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3699 permissions on mingw targets.
3700 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3701 test symlinks on mingw targets.
3702 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3705 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3708 Warn about unused comparisons of shared_ptr/unique_ptr
3709 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3710 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3711 <, <=, >, >= for shared_ptr.
3712 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3714 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3716 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3717 as 201611L, because P0497R0 changes are supported.
3718 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3720 * include/bits/erase_if.h [__cplusplus > 201703L]
3721 (__cpp_lib_erase_if): Only define for C++2a.
3722 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3723 (__cpp_lib_null_iterators): Define.
3724 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3725 (__cpp_lib_null_iterators): Define.
3726 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3728 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3730 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3732 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3733 changes are supported.
3734 * include/std/optional (__cpp_lib_optional): Likewise.
3735 * include/std/variant (__cpp_lib_variant): Likewise.
3736 * include/std/version [!__STRICT_ANSI__]
3737 (__cpp_lib_uncaught_exceptions): Define as long integer.
3738 [__cplusplus >= 201703L] (__cpp_lib_any)
3739 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3740 (__cpp_lib_variant): Define for C++17.
3741 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3743 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3746 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3748 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3752 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3754 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3757 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3759 * doc/xml/manual/intro.xml: Include new section.
3760 * doc/xml/manual/status_cxx2017.xml: Document more
3761 implementation-defined properties of the library.
3762 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3763 * doc/html/*: Regenerate.
3765 * include/bits/refwrap.h [__cplusplus > 201703L]
3766 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3767 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3768 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3770 (reference_wrapper::operator()): Add static assertion.
3771 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3773 * include/std/chrono (duration_values::zero(), duration_values::min())
3774 (duration_values::max()): Add noexcept.
3775 (duration::zero(), duration::min(), duration::max()): Likewise.
3776 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3777 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3778 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3780 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3782 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3784 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3785 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3787 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3790 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3791 specialization for C++17 (P0513R0, LWG 2817).
3792 * testsuite/20_util/hash/nullptr.cc: New test.
3795 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3796 pattern for std::basic_stringbuf::str().
3798 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3799 basic_ostream::operator<< patterns.
3801 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3803 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3804 test failures on targets with 32-bit time_t.
3806 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3807 * include/std/deque: Likewise.
3808 * include/std/forward_list: Likewise.
3809 * include/std/list: Likewise.
3810 * include/std/string: Likewise.
3811 * include/std/vector: Likewise.
3812 * include/std/version: Likewise.
3813 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3814 * testsuite/23_containers/deque/erasure.cc: Likewise.
3815 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3816 * testsuite/23_containers/list/erasure.cc: Likewise.
3817 * testsuite/23_containers/map/erasure.cc: Likewise.
3818 * testsuite/23_containers/set/erasure.cc: Likewise.
3819 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3820 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3821 * testsuite/23_containers/vector/erasure.cc: Likewise.
3823 * include/experimental/internet [AI_NUMERICSERV]
3824 (resolver_base::numeric_service): Define conditionally.
3825 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3827 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3830 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3831 Jonathan Wakely <jwakely@redhat.com>
3834 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3835 (GLIBCXX_3.4.26): Add new exports.
3836 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3837 correct list of sources.
3838 * include/Makefile.in: Regenerate.
3839 * include/std/ostream (operator<<(nullptr_t)): New member function.
3840 * src/c++17/ostream-inst.cc: New file.
3841 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3844 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3846 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3847 of the source file containing the caller.
3848 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3849 directories created by test.
3850 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3852 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3854 * testsuite/experimental/filesystem/iterators/
3855 recursive_directory_iterator.cc: Likewise.
3857 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3859 PR tree-optimization/88775
3860 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3861 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3862 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3863 instead of __builtin_constant_p if available. Don't bother with
3864 the pointer comparison in C++11 and earlier.
3866 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3870 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3873 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3875 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3876 for filesystem::path. Give variables more distinctive names.
3878 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3879 member function to perform non-trivial assignment.
3880 (_Optional_payload_base::_M_move_assign): Likewise.
3881 (_Optional_payload<T, true, false, true>::operator=)
3882 (_Optional_payload<T, true, true, false>::operator=)
3883 (_Optional_payload<T, true, false, false>::operator=): Call
3884 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3887 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3888 test std::complex<long double> if long double format is IBM128.
3889 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3892 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3894 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3895 for old std::unique_ptr layout.
3896 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3897 to become valueless. Add filesystem::path tests.
3900 * include/std/optional (_Optional_payload_base): New class template
3901 for common code hoisted from _Optional_payload specializations. Use
3902 a template for the union, to allow a partial specialization for
3903 types with non-trivial destructors. Add constructors for in-place
3904 initialization to the union.
3905 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3906 to perform non-trivial copy construction, instead of relying on
3907 non-standard copy elision in a delegating constructor.
3908 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3909 non-trivial move construction.
3910 (_Optional_payload): Derive from _Optional_payload_base and use it
3911 for everything except the non-trivial assignment operators, which are
3913 (_Optional_payload<false, C, M>): Derive from the specialization
3914 _Optional_payload<true, false, false> and add a destructor.
3915 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3916 Forward to corresponding members of _Optional_payload.
3917 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3918 Hoist common members from _Optional_base.
3919 (_Optional_base): Make all members and base class public.
3920 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3921 _Optional_base_impl.
3922 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3923 support for new std::optional layout.
3924 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3927 * include/bits/locale_conv.h: Use <> for includes not "".
3928 * include/ext/random: Likewise.
3929 * include/ext/vstring.h: Likewise.
3931 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3933 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3934 (GLIBCXX_3.4.21): Likewise.
3936 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3939 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3940 to match the one that controls whether utimbuf and utime are declared.
3942 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3945 * include/bits/char_traits.h (char_traits::move): Do not pass null
3946 pointers to memmove.
3947 * include/bits/locale_facets.h
3948 (ctype<char>::widen(const char*, const char*, char*)): Do not
3949 pass null pointers to memcpy.
3950 (ctype<char>::narrow(const char*, const char*, char, char*)):
3952 (ctype<char>::do_widen(const char*, const char*, char*)):
3954 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3957 * doc/xml/manual/spine.xml: Update copyright years.
3958 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3959 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3960 for C++17 filesystem library.
3961 * doc/html/*: Regenerate.
3963 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3964 * config.h.in: Regenerate.
3965 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3966 alphabetically and add missing entries for copy_symlink,
3967 hard_link_count, rename, and resize_file.
3968 * configure: Regenerate.
3969 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3970 used unconditionally.
3971 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3972 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3973 supports truncating to zero length.
3974 * testsuite/27_io/filesystem/operations/all.cc: New test.
3975 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3977 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3980 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3981 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3982 * config.h.in: Regenerate.
3983 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3984 remaining std::filesystem types and functions.
3985 * configure: Regenerate.
3986 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3987 * src/c++17/Makefile.in: Regenerate.
3988 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3989 here, and change name of included file.
3990 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3991 here, and change name of included file.
3992 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3993 path to dir-common.h.
3994 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3995 path to ops-common.h. Disable -Wunused-parameter warnings.
3996 (internal_file_clock): Define unconditionally.
3997 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3999 (do_copy_file, do_space): Move definitions to ops.common.h.
4000 (copy, file_size, hard_link_count, last_write_time, space): Only
4001 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4003 (last_write_time, read_symlink): Remove unused attributes from
4005 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4006 * src/filesystem/Makefile.in: Regenerate.
4007 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4008 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4009 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4010 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4011 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4012 dummy types and functions instead of using #error.
4013 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4014 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4016 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4017 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4018 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4019 to account for new namespace.
4020 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4021 -lstdc++fs from dg-options.
4022 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4023 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4024 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4025 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4026 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4028 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4029 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4031 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4032 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4033 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4034 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4035 * testsuite/27_io/filesystem/operations/create_directories.cc:
4037 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4038 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4039 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4040 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4041 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4042 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4043 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4044 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4045 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4046 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4047 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4048 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4049 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4050 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4051 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4052 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4053 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4054 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4056 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4060 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4061 typeinfo and vtables less greedy.
4062 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4063 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4064 * src/c++17/Makefile.in: Regenerate.
4065 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4066 here, and change name of included file.
4067 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4068 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4070 * src/filesystem/Makefile.in: Regenerate.
4071 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4072 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4073 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4074 from dg-options and remove dg-require-filesystem-ts.
4075 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4076 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4077 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4078 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4079 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4080 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4081 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4082 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4083 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4084 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4085 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4086 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4087 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4088 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4089 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4090 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4091 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4092 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4093 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4094 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4095 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4097 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4098 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4099 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4100 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4101 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4102 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4103 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4104 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4105 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4106 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4107 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4108 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4110 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4112 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4114 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4116 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4117 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4118 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4119 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4120 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4121 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4122 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4123 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4124 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4125 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4127 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4128 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4129 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4130 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4131 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4134 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4135 Check is_trivially_copyable instead of is_scalar.
4136 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4137 contained value can throw and its type is trivially copyable then
4138 construct into a temporary variant and move from it, to provide the
4139 strong exception safety guarantee.
4140 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4142 * testsuite/20_util/variant/87431.cc: New test.
4143 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4144 conversion causes valueless state.
4147 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4148 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4149 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4150 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4151 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4153 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4155 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4156 (file_time_type): Redefine in terms of __file_clock.
4157 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4159 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4161 (internal_file_lock): New helper type for accessing __file_clock.
4162 (do_copy_file): Use internal_file_lock to convert system time to
4164 (last_write_time(const path&, error_code&)): Likewise.
4165 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4167 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4169 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4170 for const member functions of std::basic_string.
4171 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4173 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4174 Make non-standard constructor private.
4175 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4177 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4178 explicit instantiations for C++17 as well as earlier dialects.
4179 * src/c++17/Makefile.am: Add new source files.
4180 * src/c++17/Makefile.in: Regenerate.
4181 * src/c++17/cow-string-inst.cc: New file defining explicit
4182 instantiations for basic_string member functions added in C++17.
4183 * src/c++17/string-inst.cc: Likewise.
4185 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4186 copy/move constructors for old std::basic_string.
4187 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4188 (basic_string::reference, basic_string::const_reference): Define
4189 as plain references for C++11 and later.
4190 (basic_string::basic_string()): Put constructor body outside
4191 preprocessor conditional groups.
4192 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4193 instead of copying it.
4194 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4196 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4198 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4199 cases for old basic_string.
4200 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4201 allocator-extended constructors unconditionally. Add extra members to
4202 allocator type when using old string ABI.
4203 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4205 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4207 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4208 -fno-inline added to test flags.
4210 * testsuite/21_strings/basic_string/requirements/
4211 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4213 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4214 assertion failures with old std::string ABI.
4216 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4218 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4219 functions that will only erase elements at the end.
4220 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4221 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4222 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4224 (path::_List::pop_back()): Define.
4225 (path::_List::_M_erase_from(const_iterator)): Define.
4226 (path::operator/=(const path&)): Use pop_back to remove last component
4227 and _M_erase_from to remove multiple components.
4228 (path::_M_append(basic_string_view<value_type>)): Likewise.
4229 (path::operator+=(const path&)): Likewise.
4230 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4231 (path::remove_filename()): Likewise.
4232 (path::lexically_normal()): Use _List::_Impl iterators instead of
4233 path::iterator. Use pop_back to remove components from the end. Clear
4234 trailing filename, instead of using erase(const_iterator) to remove
4235 a non-final component.
4236 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4238 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4240 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4241 incorrect treatment of empty filename after trailing slash.
4242 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4244 * testsuite/21_strings/basic_string/modifiers/assign/char/
4245 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4247 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4248 move_assign_optim.cc: Likewise.
4250 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4251 Jakub Jelinek <jakub@redhat.com>
4254 * include/experimental/memory: Replace UTF-8 quote characters.
4255 * include/std/future: Replace UTF-8 "em dash" characters.
4257 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4260 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4261 * include/debug/forward_list: Likewise.
4262 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4264 * include/experimental/chrono: Likewise.
4265 * include/experimental/functional: Likewise.
4266 * include/experimental/ratio: Likewise.
4267 * include/experimental/system_error: Likewise.
4268 * include/experimental/tuple: Likewise.
4269 * include/experimental/type_traits: Likewise.
4270 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4271 * include/parallel/multiseq_selection.h: Likewise.
4274 * config/abi/pre/gnu.ver: Add missing exports.
4275 * testsuite/22_locale/collate_byname/88681.cc: New test.
4276 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4277 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4279 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4281 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4282 initializer_list<value_type> and from input iterator ranges.
4283 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4285 * testsuite/experimental/string_view/element_access/char/empty.cc:
4286 Fix year range in copyright header.
4288 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4290 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4291 Fix year range in copyright header.
4293 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4295 Update copyright years.
4297 Copyright (C) 2019 Free Software Foundation, Inc.
4299 Copying and distribution of this file, with or without modification,
4300 are permitted in any medium without royalty provided the copyright
4301 notice and this notice are preserved.