1 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3 Delegate PSTL configuration to pstl/pstl_config.h
5 * include/bits/c++config: Remove explicit PSTL configuration
6 macros and use definitions from <pstl/pstl_config.h>.
8 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
10 Cleanup algorithm implementations
11 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
13 (mismatch): Forward execution policy.
14 (equal): Qualify call to std::equal().
15 (partial_sort): Forward execution policy.
16 (inplace_merge): Forward execution policy.
18 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
20 Improve implementation of parallel equal()
21 * include/pstl/algorithm_impl.h
22 (__internal::__brick_equal): use "4 iterator" version of
24 (__internal::__brick_equal): use simd for random access
25 iterators on unsequenced execution policies.
26 (__internal::__pattern_equal): add "4 iterator" version
27 (__internal::__pattern_equal): dispatch to simd __brick_equal
28 for vector-only execution policies.
29 (__internal::__pattern_equal): dispatch to __parallel_or for
30 parallel execution policies.
31 * include/pstl/glue_algorithm_impl.h
32 (std::equal): dispatch to "4 iterator" version of
33 __internal::__pattern_equal().
35 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
38 * include/bits/forward_list.h (operator==): Do not use operator!= to
40 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
41 earlier in the list, so that sort is stable.
42 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
43 * testsuite/23_containers/forward_list/comparable.cc: Test with
44 types that meet the minimum EqualityComparable and LessThanComparable
45 requirements. Remove irrelevant comment.
47 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
48 Do not depend on whether all alternative types are move constructible.
49 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
50 from the operand when deciding whether to perform the assignment.
51 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
52 with deleted move constructor and deleted move assignment operator.
53 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
54 behaviour of variants with DeletedMoves as an alternative.
55 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
56 (move_ctor, move_assign): Check that moving a variant with a
57 DeletedMoves alternative falls back to copying instead of moving.
59 * testsuite/20_util/variant/compile.cc: Remove empty string literals
60 from static_assert declarations.
62 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
63 actually match its name.
64 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
65 (test_swap()): Fix result for MoveCtorOnly and check
68 * include/std/optional (optional::value_or(U&&) &&): Add missing
70 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
71 for disengaged optionals and rvalue optionals.
72 * testsuite/20_util/optional/observers/4.cc: Likewise.
74 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
76 * include/pstl/algorithm_impl.h: Uglify identfiers.
77 * include/pstl/numeric_impl.h: Uglify identfiers.
78 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
80 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
82 * include/bits/c++config:
83 Add definition for __PSTL_ASSERT.
84 Add definition for __PSTL_ASSERT_MSG.
85 * include/pstl/algorithm_impl.h: Replace use of assert().
86 * include/pstl/numeric_impl.h: Replace use of assert().
87 * include/pstl/parallel_backend_tbb.h:
88 Replace use of assert().
89 Replace use of __TBB_ASSERT().
90 * include/pstl/parallel_backend_utils.h: Replace use of assert().
92 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
95 * src/c++17/memory_resource.cc
96 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
97 needed to allow placing a _Chunk at the end of the buffer.
98 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
100 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
102 * doc/xml/faq.xml: Add information about emergency EH pool.
103 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
104 Move outdated information on mt_allocator to a separate section.
105 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
106 doesn't affect the default allocator.
108 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
112 * testsuite/20_util/variant/89851.cc: New test.
114 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
116 * include/std/variant: Adjust whitespace. Add comments.
117 (_Multi_array): Leave primary template undefined.
118 (_Multi_array<_Tp>): Define partial specialization for base case of
120 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
121 which is always a reference.
122 (__gen_vtable::_S_apply()): Remove function, inline body into
123 default member initializer.
124 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
126 * include/std/variant (__variant_idx_cookie): Add member type.
127 (__visitor_result_type): Remove.
128 (__do_visit): Use invoke_result instead of __visitor_result_type.
129 * testsuite/20_util/variant/visit.cc: New test.
132 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
134 * testsuite/20_util/variant/90008.cc: New test.
136 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
138 * include/pstl/algorithm_impl.h: Add namespace qualification.
139 * include/pstl/execution_defs.h: Add namespace qualification.
140 * include/pstl/execution_impl.h: Add namespace qualification.
141 * include/pstl/numeric_impl.h: Add namespace qualification.
142 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
143 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
144 * include/pstl/parallel_backend_utils.h: Include <cassert>.
146 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
148 Fix visit<R> for variant.
149 * include/std/variant (__do_visit): Add a template parameter
150 for enforcing same return types for visit.
151 (__gen_vtable_impl): Likewise.
152 (_S_apply_single_alt): Adjust.
153 (__visit_invoke_impl): New. Handle casting to void.
154 (__do_visit_invoke): New. Enforces same return types.
155 (__do_visit_invoke_r): New. Converts return types.
156 (__visit_invoke): Adjust.
157 (__gen_vtable): Add a template parameter for enforcing
158 same return types for visit.
159 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
160 different return types.
161 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
162 visitors with different return types don't accidentally
163 compile with regular visitation.
165 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
167 * testsuite/27_io/filesystem/iterators/caching.cc: Add
168 dg-require-filesystem-ts.
170 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
172 * doc/xml/manual/status_cxx2020.xml: Update status.
173 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
174 * testsuite/20_util/variant/visit_r.cc: New test.
176 * include/bits/fs_dir.h (directory_iterator::operator*)
177 (directory_iterator::operator->): Add noexcept.
178 (operator==, operator!=): Replace namespace-scope equality operators
179 for directory iterators with hidden friends.
182 * config/abi/pre/gnu.ver: Add missing exports.
183 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
186 * config/abi/pre/gnu.ver: Export new symbols.
187 * include/bits/fs_dir.h (recursive_directory_iterator::options())
188 (recursive_directory_iterator::recursion_pending())
189 (recursive_directory_iterator::disable_recursion_pending()): Remove
190 inline definitions. Make noexcept.
191 (recursive_directory_iterator::depth())
192 (recursive_directory_iterator::operator*())
193 (recursive_directory_iterator::operator->()): Make noexcept.
194 (recursive_directory_iterator::_M_options)
195 (recursive_directory_iterator::_M_pending): Remove data members.
196 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
197 (recursive_directory_iterator::recursive_directory_iterator): Remove
198 ctor-initializer. Use new constructor for _Dir_stack.
199 (recursive_directory_iterator::options())
200 (recursive_directory_iterator::recursion_pending())
201 (recursive_directory_iterator::disable_recursion_pending()): Add
202 non-inline definitions.
203 (recursive_directory_iterator::depth()): Make noexcept.
204 (recursive_directory_iterator::increment(error_code&))
205 (recursive_directory_iterator::pop(error_code&)): Adjust to new
206 location of options and recursion_pending members.
207 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
208 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
209 user-declared move constructor and assignment operator, to make the
212 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
213 d_type == DT_UNKNOWN immediately.
214 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
216 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
218 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
220 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
221 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
224 PR libstdc++/87431 (again)
225 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
226 Define partial specialization for basic_string.
227 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
228 shared_ptr and weak_ptr.
229 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
231 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
233 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
235 * include/debug/vector (_Never_valueless_alt): Likewise for debug
237 * include/std/any (_Never_valueless_alt): Define explicit
238 specialization for any.
239 * include/std/variant (_Never_valueless_alt): Define primary template.
240 (__never_valueless): Use _Never_valueless_alt instead of
241 is_trivially_copyable.
242 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
243 initializations to avoid try-catch overhead. Add special case for
244 scalars produced by potentially-throwing conversions. Use
245 _Never_valueless_alt instead of is_trivially_copyable for the
246 remaining strong exception-safety cases.
247 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
248 * testsuite/20_util/variant/87431.cc: Run both test functions.
249 * testsuite/20_util/variant/exception_safety.cc: New test.
250 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
251 so the variant becomes valueless.
253 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
256 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
258 (variant::emplace<_Tp>): Return result of emplace<N> directly.
260 * include/std/string (__hash_string_base): New class template defining
261 operator() for hashing strings.
262 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
263 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
264 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
265 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
267 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
269 Use single-visitation in variant assignment and swap and relops.
270 Also use indices instead of types when checking whether
271 variants hold the same thing.
272 * include/std/variant (__do_visit): Add a template parameter
273 for index visitation, invoke with indices if index visitation
275 (__variant_idx_cookie): New.
276 (__visit_with_index): Likewise.
277 (_Copy_assign_base::operator=): Do single-visitation with
279 (_Move_assign_base::operator=): Likewise.
280 (_Extra_visit_slot_needed): Adjust.
281 (__visit_invoke): Call with indices if it's an index visitor.
282 (relops): Do single-visitation with an index visitor.
284 (__visitor_result_type): New.
286 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
288 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
290 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
292 Don't revisit a variant we are already visiting.
293 * include/std/variant (__variant_construct_single): New.
294 (__variant_construct): Use it.
295 (_M_destructive_move): Likewise.
296 (_M_destructive_copy): Likewise.
297 (_Copy_assign_base::operator=): Adjust.
298 (_Move_assign_base::operator=): Likewise.
301 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
304 * include/bits/hashtable.h (_Hashtable): Move static assertions to
305 destructor so they are not evaluated until the _Key type is complete.
306 * include/bits/stl_tree.h (_Rb_tree): Likewise.
307 * testsuite/23_containers/set/85965.cc: New test.
308 * testsuite/23_containers/unordered_set/85965.cc: New test.
309 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
310 with regexp matching the corresponding _Rb_tree specialization.
311 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
312 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
313 * testsuite/23_containers/set/48101_neg.cc: Likewise.
314 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
315 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
316 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
317 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
319 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
322 Fix based on a suggestion by Antony Polukhin.
323 * include/std/variant (__never_valueless): New.
325 (_Extra_visit_slot_needed): New.
326 (_Multi_array): Use it.
327 (_S_apply_all_alts): Likewise.
329 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
332 Fix based on a suggestion by Antony Polukhin.
333 * include/std/variant (__gen_vtable): Don't reserve an
334 additional table slot, _Multi_array already does that.
336 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
339 Fix based on a suggestion by Antony Polukhin.
340 * include/std/variant (__variant_construct): Capture a pointer
341 to the storage and visit just one variant.
343 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
345 * doc/xml/manual/backwards_compatibility.xml: Remove link to
346 Doxygen-generated pages with unstable URL.
347 * doc/xml/manual/concurrency_extensions.xml: Likewise.
348 * doc/xml/manual/extensions.xml: Likewise.
349 * doc/xml/manual/parallel_mode.xml: Likewise.
350 * doc/xml/manual/support.xml: Likewise.
352 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
353 avoid -Wconversion warnings.
355 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
357 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
358 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
359 (allstamped): Add stamp-pstl.
360 (install-headers): Add ptsl_builddir.
361 * include/Makefile.in: Regenerate.
362 * include/bits/c++config: Add pstl configuration.
363 * include/pstl/LICENSE.txt: New file.
364 * include/pstl/algorithm_fwd.h: New file.
365 * include/pstl/algorithm_impl.h: New file.
366 * include/pstl/execution_defs.h: New file.
367 * include/pstl/execution_impl.h: New file.
368 * include/pstl/glue_algorithm_defs.h: New file.
369 * include/pstl/glue_algorithm_impl.h: New file.
370 * include/pstl/glue_execution_defs.h: New file.
371 * include/pstl/glue_memory_defs.h: New file.
372 * include/pstl/glue_memory_impl.h: New file.
373 * include/pstl/glue_numeric_defs.h: New file.
374 * include/pstl/glue_numeric_impl.h: New file.
375 * include/pstl/memory_impl.h: New file.
376 * include/pstl/numeric_fwd.h: New file.
377 * include/pstl/numeric_impl.h: New file.
378 * include/pstl/parallel_backend.h: New file.
379 * include/pstl/parallel_backend_tbb.h: New file.
380 * include/pstl/parallel_backend_utils.h: New file.
381 * include/pstl/parallel_impl.h: New file.
382 * include/pstl/pstl_config.h: New file.
383 * include/pstl/unseq_backend_simd.h: New file.
384 * include/pstl/utils.h: New file.
385 * include/std/algorithm: Include parallel algorithm implementations.
386 * include/std/execution: New file.
387 * include/std/memory: Include parallel algorithm implementations.
388 * include/std/numeric: Include parallel algorithm implementations.
389 * include/std/version: Add parallel algorithms feature test macro.
390 * testsuite/util/pstl/pstl_test_config.h: New file.
391 * testsuite/util/pstl/test_utils.h: New file.
392 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
393 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
394 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
395 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
396 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
397 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
398 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
399 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
400 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
401 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
402 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
403 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
404 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
405 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
406 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
407 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
408 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
409 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
410 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
411 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
412 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
413 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
414 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
415 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
416 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
417 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
418 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
419 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
420 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
421 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
422 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
423 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
424 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
425 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
426 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
427 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
428 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
429 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
430 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
431 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
432 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
433 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
434 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
435 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
436 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
437 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
438 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
439 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
440 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
441 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
442 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
443 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
444 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
445 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
446 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
447 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
448 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
449 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
450 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
451 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
452 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
453 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
454 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
455 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
456 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
457 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
458 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
459 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
460 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
461 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
462 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
463 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
464 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
465 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
466 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
467 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
468 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
469 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
470 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
471 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
472 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
473 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
474 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
475 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
476 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
477 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
478 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
479 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
480 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
481 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
482 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
483 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
484 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
485 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
486 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
487 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
488 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
489 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
490 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
491 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
492 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
493 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
494 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
495 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
496 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
497 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
499 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
501 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
502 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
503 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
504 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
505 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
506 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
507 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
508 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
509 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
510 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
511 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
512 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
513 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
514 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
515 when the special functions IS is enabled, not for C++17.
516 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
518 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
519 without checks for special functions in C++17.
520 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
524 * include/backward/hash_map: Use <> for includes not "".
525 * include/backward/hash_set: Likewise.
526 * include/backward/strstream: Likewise.
527 * include/tr1/bessel_function.tcc: Likewise.
528 * include/tr1/exp_integral.tcc: Likewise.
529 * include/tr1/legendre_function.tcc: Likewise.
530 * include/tr1/modified_bessel_func.tcc: Likewise.
531 * include/tr1/riemann_zeta.tcc: Likewise.
533 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
535 * doc/xml/manual/allocator.xml: Link to table documenting evolution
536 of extension allocators.
537 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
538 Document new headers in 7.2, 8.1 and 9.1 releases.
539 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
540 * doc/html/*: Regenerate.
542 2019-03-12 John David Anglin <dave.anglin@bell.net>
545 * testsuite/lib/libstdc++.exp: Locate libatomic.
546 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
547 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
549 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
550 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
551 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
552 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
554 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
557 * configure.ac: Check for sockatmark.
558 * crossconfig.m4: Check for sockatmark.
559 * config.h.in: Regenerate.
560 * configure: Regenerate.
561 * include/experimental/internet (address_v4::_S_hton): Rename
562 overloaded functions to _S_hton_16 and _S_ntoh_16.
563 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
564 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
565 * include/experimental/socket (basic_socket::at_mark): Check
566 _GLIBCXX_HAVE_SOCKATMARK.
568 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
569 const variables instead of macros.
572 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
573 Use correct type for len_aligned.
574 * testsuite/20_util/hash/89629.cc: New test.
576 2019-03-11 Jakub Jelinek <jakub@redhat.com>
579 * include/std/atomic (atomic<T>::store, atomic<T>::load,
580 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
581 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
582 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
583 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
584 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
585 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
586 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
587 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
588 memory_order_seq_cst to int.
590 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
592 * doc/xml/manual/using.xml: Use link element instead of xref.
593 * doc/html/*: Regenerate.
595 * include/bits/fs_path.h (path::format): Add fixed underlying type.
597 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
600 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
601 parameters in deduction guides.
602 * include/debug/multimap.h (multimap): Likewise.
603 * include/debug/set.h (multimap): Likewise.
604 * include/debug/multiset.h (multimap): Likewise.
605 * include/debug/unordered_map (unordered_map): Likewise.
606 (unordered_multimap): Likewise.
607 * include/debug/unordered_set (unordered_set): Likewise.
608 (unordered_multiset): Likewise.
611 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
612 Invalidate all iterators in case of rehash.
613 (unordered_multimap<>::_M_check_rehashed): Likewise.
614 * include/debug/unordered_set
615 (unordered_set<>::_M_check_rehashed): Likewise.
616 (unordered_multiset<>::_M_check_rehashed): Likewise.
617 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
619 2019-03-07 Andreas Schwab <schwab@suse.de>
621 * config/abi/post/riscv64-linux-gnu: New directory.
622 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
624 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
626 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
627 compile test to run. Fix typo.
629 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
630 * doc/html/*: Regenerate.
632 P0356R5 Simplified partial function application
633 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
634 helpers for bind_front.
635 (bind_front, __cpp_lib_bind_front): Define.
636 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
638 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
640 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
641 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
642 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
643 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
645 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
647 PR libstdc++/86655 - std::assoc_legendre should not constrain
648 the value of m (or x).
649 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
650 __sph_legendre): If degree > order Don't throw, return 0.
651 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
652 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
653 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
654 * testsuite/tr1/5_numerical_facilities/special_functions/
655 02_assoc_legendre/pr86655.cc: New test.
656 * testsuite/tr1/5_numerical_facilities/special_functions/
657 22_sph_legendre/pr86655.cc: New test.
659 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
662 Also PR libstdc++/85517
663 * include/std/variant (__do_visit): New.
664 (__variant_cast): Likewise.
665 (__variant_cookie): Likewise.
666 (__erased_*): Remove.
667 (_Variant_storage::_S_vtable): Likewise.
668 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
669 (_Variant_storage::__M_reset): Adjust.
670 (__variant_construct): New.
671 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
673 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
674 (_Move_ctor_base::__M_destructive_copy): New.
675 (_Move_ctor_base::__M_destructive_move): Adjust to use
677 (_Copy_assign_base::operator=): Adjust to use __do_visit.
678 (_Copy_assign_alias): Adjust to check both copy assignment
679 and copy construction for triviality.
680 (_Move_assign_base::operator=): Adjust to use __do_visit.
681 (_Multi_array): Add support for visitors that accept and return
683 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
684 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
685 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
686 a __variant_cookie temporary for a variant that is valueless and..
687 (__gen_vtable_impl::__visit_invoke): ..adjust here.
688 (__gen_vtable::_Array_type): Conditionally make space for
689 the __variant_cookie visitor case.
690 (__variant_construct_by_index): New.
691 (get_if): Adjust to use std::addressof.
692 (relops): Adjust to use __do_visit.
693 (variant): Add __variant_cast and __variant_construct_by_index
695 (variant::emplace): Use _M_reset() and __variant_construct_by_index
696 instead of self-destruction.
697 (variant::swap): Adjust to use __do_visit.
698 (visit): Reimplement in terms of __do_visit.
699 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
700 * testsuite/20_util/variant/compile.cc: Adjust.
701 * testsuite/20_util/variant/run.cc: Likewise.
703 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
705 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
707 * testsuite/experimental/feat-char8_t.cc: Likewise.
709 * include/std/type_traits [C++20] (is_bounded_array)
710 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
712 * testsuite/20_util/is_bounded_array/requirements/
713 explicit_instantiation.cc: New test.
714 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
716 * testsuite/20_util/is_bounded_array/value.cc: New test.
717 * testsuite/20_util/is_unbounded_array/requirements/
718 explicit_instantiation.cc: New test.
719 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
721 * testsuite/20_util/is_unbounded_array/value.cc: New test.
723 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
725 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
727 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
729 * include/c_compatibility/math.h [C++20] (lerp): Add using
731 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
732 (__lerp): Define function template to implement lerp.
733 (lerp(float, float, float), lerp(double, double, double))
734 (lerp(long double, long double, long double)): Define for C++20.
735 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
736 (midpoint(T, T), midpoint(T*, T*)): Define.
737 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
738 * testsuite/26_numerics/lerp.cc: New test.
739 * testsuite/26_numerics/midpoint/floating.cc: New test.
740 * testsuite/26_numerics/midpoint/integral.cc: New test.
741 * testsuite/26_numerics/midpoint/pointer.cc: New test.
743 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
745 PR libstdc++/88996 Implement P0439R0
746 Make std::memory_order a scoped enumeration.
747 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
748 add variables for the old enumerators. Adjust calls.
749 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
750 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
752 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
754 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
757 * include/std/memory_resource (polymorphic_allocator): Add default
758 template argument for C++20.
759 (polymorphic_allocator::allocate_bytes)
760 (polymorphic_allocator::deallocate_bytes)
761 (polymorphic_allocator::allocate_object)
762 (polymorphic_allocator::deallocate_object)
763 (polymorphic_allocator::new_object)
764 (polymorphic_allocator::delete_object): New member functions for
766 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
769 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
772 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
775 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
777 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
778 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
780 * include/std/memory (uses_allocator_construction_args): New set of
781 overloaded functions.
782 (make_obj_using_allocator, uninitialized_construct_using_allocator):
784 * include/std/memory_resource (polymorphic_allocator::construct)
785 [__cplusplus > 201703l]: Replace all overloads with a single function
786 using uses_allocator_construction_args.
787 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
789 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
791 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
794 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
795 stylesheet directories before check for xsltproc. Try to use
796 xmlcatalog to find local stylesheet directory before trying hardcoded
797 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
798 check to look for the same stylesheet as doc/Makefile.am uses. Don't
799 use xsltproc if xmlcatalog fails to find a local stylesheet.
800 * configure.ac: Check for xmlcatalog.
801 * Makefile.in: Regenerate.
802 * configure: Likewise.
803 * doc/Makefile.in: Likewise.
804 * include/Makefile.in: Likewise.
805 * libsupc++/Makefile.in: Likewise.
806 * po/Makefile.in: Likewise.
807 * python/Makefile.in: Likewise.
808 * src/Makefile.in: Likewise.
809 * src/c++11/Makefile.in: Likewise.
810 * src/c++17/Makefile.in: Likewise.
811 * src/c++98/Makefile.in: Likewise.
812 * src/filesystem/Makefile.in: Likewise.
813 * testsuite/Makefile.in: Likewise.
815 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
818 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
819 container deduction guides.
820 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
821 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
822 parameters in deduction guides.
823 * include/bits/stl_multimap.h (multimap): Likewise.
824 * include/bits/stl_multiset.h (multiset): Likewise.
825 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
826 * include/bits/stl_set.h (set): Likewise.
827 * include/bits/stl_stack.h (stack): Likewise.
828 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
829 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
830 constrain parameters in deduction guides.
831 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
833 * testsuite/23_containers/map/cons/deduction.cc: Test additional
835 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
836 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
837 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
838 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
840 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
842 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
845 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
846 to class template and partial specialization using void_t.
847 (__is_copy_insertable, __is_move_insertable): Adjust base class.
849 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
852 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
853 copy and move members public.
855 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
857 * include/std/type_traits (__underlying_type_impl): New helper to
858 make underlying_type SFINAE-friendly.
859 (underlying_type): Derive from __underlying_type_impl.
860 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
864 * include/bits/char_traits.h (__constant_char_array): Check index is
865 in range before dereferencing.
866 (char_traits<char>::compare, char_traits<char>::find)
867 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
868 immediately if n is zero.
869 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
870 Remove workarounds for PR 67026.
871 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
873 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
876 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
878 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
879 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
881 2019-02-22 Jakub Jelinek <jakub@redhat.com>
884 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
885 type to std::size_t and argument to type to long double.
887 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
889 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
890 * config/abi/post/sparc64-linux-gnu: New directory.
891 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
892 * config/abi/post/sparc64-linux-gnu/32: New directory.
893 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
895 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
897 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
898 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
901 2019-02-22 Tom Honermann <tom@honermann.net>
903 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
904 printers for u8string and u8string_view.
906 2019-02-22 Tom Honermann <tom@honermann.net>
908 * testsuite/18_support/byte/ops.cc: Validate
909 std::to_integer<char8_t>, std::to_integer<char16_t>, and
910 std::to_integer<char32_t>.
911 * testsuite/18_support/numeric_limits/dr559.cc: Validate
912 std::numeric_limits<char8_t>.
913 * testsuite/18_support/numeric_limits/lowest.cc: Validate
914 std::numeric_limits<char8_t>::lowest().
915 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
916 std::numeric_limits<char8_t>::max_digits10.
917 * testsuite/18_support/type_info/fundamental.cc: Validate
918 typeinfo for char8_t.
919 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
920 std::from_chars with char8_t.
921 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
922 Validate explicit instantiation of std::hash<char8_t>.
923 * testsuite/20_util/is_integral/value.cc: Validate
924 std::is_integral<char8_t>.
925 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
926 Validate std::make_signed<char8_t>.
927 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
928 Validate u8string construction from char8_t sources.
929 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
931 * testsuite/21_strings/basic_string_view/operations/compare/
932 char/70483.cc: Validate substr operations on u8string_view.
933 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
934 the u8string_view typedef is defined.
935 * testsuite/21_strings/char_traits/requirements/
936 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
938 * testsuite/21_strings/char_traits/requirements/
939 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
940 constexpr member functions.
941 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
942 that the u8string typedef is defined.
943 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
944 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
945 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
946 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
948 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
949 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
951 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
952 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
953 Validate std::atomic<char8_t>::is_always_lock_free
954 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
956 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
958 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
960 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
961 Validate std::experimental::pmr::u8string.
962 * testsuite/experimental/string_view/typedefs.cc: Validate that the
963 u8string_view typedef is defined.
964 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
965 char32_t to the typelists.
967 2019-02-22 Tom Honermann <tom@honermann.net>
969 * include/ext/typelist.h: Constrain a partial specialization of
970 typelist::detail::append_ to only match chain<T1,T2>.
972 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
975 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
976 class template with class. Replace move and copy member types with
977 member alias templates, so they are only instantiated when needed.
978 (__is_copy_insertable, __is_move_insertable): Adjust base class.
979 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
980 test for C++11/14/17 as well.
981 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
984 2019-02-20 Jakub Jelinek <jakub@redhat.com>
987 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
988 _GLIBCXX_PURE to the alias declaration.
990 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
992 * testsuite/21_strings/basic_string/literals/types.cc
993 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
994 * testsuite/21_strings/basic_string/literals/values.cc
995 [_GLIBCXX_USE_CHAR8_T]: Likewise.
996 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
997 potentially having different type.
998 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
999 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1001 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1002 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1003 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1004 string literals only using basic character set.
1005 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1006 u8 literals to char.
1007 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1008 Test ATOMIC_CHAR8_T_LOCK_FREE.
1009 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1010 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1011 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1012 * testsuite/experimental/string_view/literals/types.cc
1013 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1015 * testsuite/experimental/string_view/literals/values.cc
1016 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1018 2019-02-19 Tom Honermann <tom@honermann.net>
1020 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1021 from char16_32_t.cc; validates numeric_limits<char8_t>.
1022 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1023 test cloned from types.cc; validates operator""s for char8_t
1025 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1026 test cloned from values.cc; validates construction and comparison
1028 * testsuite/21_strings/basic_string/requirements/
1029 /explicit_instantiation/char8_t/1.cc: New test cloned from
1030 char16_t/1.cc; validates explicit instantiation of
1031 basic_string<char8_t>.
1032 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1033 New test cloned from types.cc; validates operator""sv for char8_t
1034 returns u8string_view.
1035 * testsuite/21_strings/basic_string_view/literals/
1036 values-char8_t.cc: New test cloned from values.cc; validates
1037 construction and comparison of u8string_view values.
1038 * testsuite/21_strings/basic_string_view/requirements/
1039 explicit_instantiation/char8_t/1.cc: New test cloned from
1040 char16_t/1.cc; validates explicit instantiation of
1041 basic_string_view<char8_t>.
1042 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1043 New test cloned from char16_t/65049.cc; validates that
1044 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1045 * testsuite/21_strings/char_traits/requirements/char8_t/
1046 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1047 that char_traits<char8_t> member typedefs are present and correct.
1048 * testsuite/21_strings/char_traits/requirements/
1049 explicit_instantiation/char8_t/1.cc: New test cloned from
1050 char16_t/1.cc; validates explicit instantiation of
1051 char_traits<char8_t>.
1052 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1053 from char16_t.cc: validates
1054 codecvt<char16_t, char8_t, mbstate_t>.
1055 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
1056 from char32_t.cc: validates
1057 codecvt<char32_t, char8_t, mbstate_t>.
1058 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1059 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1060 codecvt<char32_t, char8_t, std::mbstate_t>.
1061 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1062 test cloned from string.cc; validates filesystem::path construction
1064 * testsuite/experimental/feat-char8_t.cc: New test; validates that
1065 the __cpp_lib_char8_t feature test macro is defined with the
1067 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1068 New test cloned from string.cc; validates filesystem::path
1069 construction from char8_t input.
1070 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1071 test cloned from types.cc; validates operator""sv for char8_t
1072 returns u8string_view.
1073 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1074 New test cloned from values.cc; validates construction and
1075 comparison of u8string_view values.
1076 * testsuite/experimental/string_view/requirements/
1077 explicit_instantiation/char8_t/1.cc: New test cloned from
1078 char16_t/1.cc; validates explicit instantiation of
1079 basic_string_view<char8_t>.
1080 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1081 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1084 2019-02-19 Tom Honermann <tom@honermann.net>
1086 P0482R5 char8_t: Standard library support
1087 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1088 typeinfo symbols for char8_t.
1089 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1090 (GLIBCXX_3.4.26): Add symbols for specializations of
1091 numeric_limits and codecvt that involve char8_t.
1092 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1093 * include/bits/atomic_base.h: Add atomic_char8_t.
1094 * include/bits/basic_string.h: Add std::hash<u8string> and
1095 operator""s(const char8_t*, size_t).
1096 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1098 * include/bits/char_traits.h: Add char_traits<char8_t>.
1099 * include/bits/codecvt.h: Add
1100 codecvt<char16_t, char8_t, mbstate_t>,
1101 codecvt<char32_t, char8_t, mbstate_t>,
1102 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1103 codecvt_byname<char32_t, char8_t, mbstate_t>.
1104 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1105 recognize char8_t as an integral type.
1106 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1108 (path::u8string): Return std::u8string when char8_t support is
1110 (path::generic_u8string): Likewise.
1111 (path::_S_convert): Handle conversion from char8_t input.
1112 (path::_S_str_convert): Likewise.
1113 * include/bits/functional_hash.h: Add hash<char8_t>.
1114 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
1116 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
1117 for new char8_t specializations.
1118 * include/bits/localefwd.h: Add missing declarations of
1119 codecvt<char16_t, char, mbstate_t> and
1120 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
1121 codecvt<char16_t, char8_t, mbstate_t> and
1122 codecvt<char32_t, char8_t, mbstate_t>.
1123 * include/bits/postypes.h: Add u8streampos
1124 * include/bits/stringfwd.h: Add declarations of
1125 char_traits<char8_t> and u8string.
1126 * include/c_global/cstddef: Add __byte_operand<char8_t>.
1127 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1129 (path::u8string): Return std::u8string when char8_t support is
1131 (path::generic_u8string): Likewise.
1132 (path::_S_convert): Handle conversion from char8_t input.
1133 (path::_S_str_convert): Likewise.
1134 * include/experimental/string: Add u8string.
1135 * include/experimental/string_view: Add u8string_view,
1136 hash<experimental::u8string_view>, and
1137 operator""sv(const char8_t*, size_t).
1138 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
1139 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
1140 as a character type.
1141 * include/std/limits: Add numeric_limits<char8_t>.
1142 * include/std/string_view: Add u8string_view,
1143 hash<experimental::u8string_view>, and
1144 operator""sv(const char8_t*, size_t).
1145 * include/std/type_traits: Add __is_integral_helper<char8_t>,
1146 __make_unsigned<char8_t>, and __make_signed<char8_t>.
1147 * libsupc++/atomic_lockfree_defines.h: Define
1148 ATOMIC_CHAR8_T_LOCK_FREE.
1149 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
1150 codecvt.cc and limits.cc so that char8_t specializations of
1151 numeric_limits and codecvt and emitted.
1152 * src/c++11/Makefile.in: Likewise.
1153 * src/c++11/codecvt.cc: Define members of
1154 codecvt<char16_t, char8_t, mbstate_t>,
1155 codecvt<char32_t, char8_t, mbstate_t>,
1156 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1157 codecvt_byname<char32_t, char8_t, mbstate_t>.
1158 * src/c++11/limits.cc: Define members of
1159 numeric_limits<char8_t>.
1160 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
1161 locale_init.cc and localename.cc.
1162 * src/c++98/Makefile.in: Likewise.
1163 * src/c++98/locale_init.cc: Add initialization for the
1164 codecvt<char16_t, char8_t, mbstate_t> and
1165 codecvt<char32_t, char8_t, mbstate_t> facets.
1166 * src/c++98/localename.cc: Likewise.
1167 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
1169 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
1171 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
1172 * 27_io/filesystem/operations/resize_file.cc: Likewise.
1173 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
1175 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
1177 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
1178 * doc/html/*: Regenerate.
1180 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
1181 * doc/html/*: Regenerate.
1183 * doc/xml/manual/intro.xml: Document LWG 2586 status.
1184 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
1185 allocator type in is_constructible checks.
1186 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
1187 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
1188 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
1189 problematic type from LWG 2586 discussion.
1190 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
1191 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1193 * configure.ac: Check for C11 timespec_get function.
1194 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
1196 * config.h.in: Regenerate.
1197 * configure: Regenerate.
1198 * include/c_global/ctime (timespec, timespec_get): Add to namespace
1199 std for C++17 and up.
1201 * doc/xml/manual/intro.xml: Document LWG 2537 status.
1202 * include/bits/stl_queue.h
1203 (priority_queue(const Compare&, const Container&, const Alloc&))
1204 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
1206 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
1208 * doc/xml/manual/intro.xml: Document LWG 2566 status.
1209 * include/bits/stl_queue.h (queue, priority_queue): Add static
1210 assertions to enforce LWG 2566 requirement on value_type.
1211 * include/bits/stl_stack.h (stack): Likewise.
1214 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
1216 * doc/xml/manual/intro.xml: Document LWG 2735 status.
1217 * include/bits/std_abs.h: Add comment about LWG 2735.
1218 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
1220 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
1223 * include/std/version [__cpp_impl_destroying_delete]
1224 (__cpp_lib_destroying_delete): Only define for C++2a and later.
1225 * libsupc++/new [__cpp_impl_destroying_delete]
1226 (__cpp_lib_destroying_delete): Likewise.
1227 (destroying_delete_t, destroying_delete): Likewise, but define even
1228 when __cpp_impl_destroying_delete is not defined.
1229 * testsuite/18_support/destroying_delete.cc: New test.
1231 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
1234 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
1235 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
1236 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
1237 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
1239 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
1242 * include/bits/fs_path.h (path::has_root_name)
1243 (path::has_root_directory, path::has_root_path)
1244 (path::has_relative_path, path::has_parent_path)
1245 (path::has_filename, path::has_stem, path::has_extension)
1246 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
1248 * src/c++17/fs_path.cc (path::has_root_name)
1249 (path::has_root_directory, path::has_root_path)
1250 (path::has_relative_path, path::has_parent_path)
1251 (path::has_filename, path::_M_find_extension): Add noexcept.
1253 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
1255 PR libstdc++/89102 (partial)
1256 * include/std/type_traits (common_type<>): Define.
1257 (common_type<T>): Derive from common_type<T, T>.
1258 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1259 Test zero-length template argument list.
1260 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1261 Test additional single argument cases.
1262 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1263 Adjust expected error.
1265 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
1268 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
1270 * include/bits/stl_stack.h (stack): Likewise.
1271 * testsuite/23_containers/priority_queue/deduction.cc: New test.
1272 * testsuite/23_containers/queue/deduction.cc: New test.
1273 * testsuite/23_containers/stack/deduction.cc: New test.
1276 * include/std/type_traits (__is_convertible_helper)
1277 (__is_convertible_helper<_From, _To, false>): Revert changes to
1278 support is_nothrow_convertible.
1279 (__is_nt_convertible_helper): New helper.
1280 (is_nothrow_convertible): Use __is_nt_convertible_helper.
1282 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
1283 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
1286 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
1287 __is_alloc_insertable_impl. Replace single type member with two
1288 members, one for each of copy and move insertable.
1289 (__is_move_insertable): New trait for internal use.
1290 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
1291 (vector::_S_nothrow_relocate(true_type)): New functions to
1292 conditionally check if __relocate_a can throw.
1293 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
1294 on __is_move_insertable.
1295 (vector::_S_do_relocate): New overloaded functions to conditionally
1297 (vector::_S_relocate): New function that dispatches to _S_do_relocate
1298 based on _S_use_relocate.
1299 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1300 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
1301 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
1304 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
1305 parameter unnamed. Add message to static assertion.
1306 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1307 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
1310 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
1313 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
1315 (__is_bitwise_relocatable): ... to this.
1316 (__relocate_a_1): Adapt.
1317 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
1318 (__is_bitwise_relocatable): ... to this.
1320 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
1323 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
1324 final component as well as from _M_pathname. Append the dot using
1325 operator+= instead of only to _M_pathname.
1326 (path::_M_find_extension): Reformat slightly.
1327 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1328 Add more test cases.
1330 2019-01-30 Ulrich Drepper <drepper@redhat.com>
1332 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
1334 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
1336 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
1337 constexpr specifiers from arg and proj.
1339 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
1340 __shared_ptr instantiations used by gcc4-compatible ABI.
1342 * include/experimental/forward_list (experimental::erase): Qualify
1344 * include/experimental/list (experimental::erase): Likewise.
1345 * include/std/forward_list (std::erase): Likewise.
1346 * include/std/list (std::erase): Likewise.
1348 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
1350 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
1351 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
1352 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
1353 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
1354 * testsuite/ext/array_allocator/26875.cc: Likewise.
1355 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
1356 * testsuite/util/replacement_memory_operators.h: Likewise.
1357 * testsuite/util/testsuite_allocator.h: Likewise.
1359 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
1360 normal mode vector, even for debug mode.
1361 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
1362 Define alias template for normal mode vector.
1364 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
1367 * config/locale/generic/c_locale.h (__convert_from_v)
1368 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1369 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1370 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
1371 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1373 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
1376 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
1377 data member with static member function _S_use_relocate().
1378 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1379 (vector::_M_default_append): Use _S_use_relocate() instead of
1382 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
1385 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
1388 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
1389 write to stderr instead of using printf.
1391 2019-01-21 Jakub Jelinek <jakub@redhat.com>
1394 * include/bits/char_traits.h (__constant_string_p,
1395 __constant_char_array_p): Use __builtin_is_constant_evaluated if
1398 2019-01-20 Ulrich Drepper <drepper@redhat.com>
1400 Implement C++20 P0600r1.
1401 * include/backward/hash_map: Add nodiscard attribute to empty.
1402 * include/backward/hash_set: Likewise.
1403 * backward/hashtable.h: Likewise.
1404 * include/bits/basic_string.h: Likewise.
1405 * include/bits/forward_list.h: Likewise.
1406 * include/bits/hashtable.h: Likewise.
1407 * include/bits/regex.h: Likewise.
1408 * include/bits/stl_deque.h: Likewise.
1409 * include/bits/stl_list.h: Likewise.
1410 * include/bits/stl_map.h: Likewise.
1411 * include/bits/stl_multimap.h: Likewise.
1412 * include/bits/stl_multiset.h: Likewise.
1413 * include/bits/stl_queue.h: Likewise.
1414 * include/bits/stl_set.h: Likewise.
1415 * include/bits/stl_stack.h: Likewise.
1416 * include/bits/stl_tree.h: Likewise.
1417 * include/bits/stl_vector.h: Likewise.
1418 * include/bits/unordered_map.h: Likewise.
1419 * include/bits/unordered_set.h: Likewise.
1420 * include/debug/array: Likewise.
1421 * include/experimental/any: Likewise.
1422 * include/experimental/bits/fs_path.h: Likewise.
1423 * include/experimental/internet: Likewise.
1424 * include/experimental/string_view: Likewise.
1425 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
1427 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
1429 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
1431 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
1433 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
1435 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
1437 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
1439 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
1441 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1442 info_fn_imps.hpp: Likewise.
1443 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1444 left_child_next_sibling_heap_.hpp: Likewise.
1445 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
1447 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
1449 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
1451 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
1453 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
1455 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
1457 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
1459 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
1460 * include/ext/pb_ds/trie_policy.hpp: Likewise.
1461 * include/ext/rope: Likewise.
1462 * include/ext/slist: Likewise.
1463 * include/ext/vstring.h: Likewise.
1464 * include/profile/array: Likewise.
1465 * include/std/array: Likewise.
1466 * include/tr1/array: Likewise.
1467 * include/tr1/hashtable.h: Likewise.
1468 * include/tr1/regex: Likewise.
1469 * include/tr2/dynamic_bitset: Likewise.
1470 * include/bits/alloc_traits.h: Add nodiscard attribute to
1472 * include/experimental/memory_resource: Likewise.
1473 * include/ext/alloc_traits.h: Likewise.
1474 * include/ext/array_allocator.h: Likewise.
1475 * include/ext/bitmap_allocator.h: Likewise.
1476 * include/ext/debug_allocator.h: Likewise.
1477 * include/ext/extptr_allocator.h: Likewise.
1478 * include/ext/mt_allocator.h: Likewise.
1479 * include/ext/new_allocator.h: Likewise.
1480 * include/ext/pool_allocator.h: Likewise.
1481 * include/ext/throw_allocator.h: Likewise.
1482 * include/std/scoped_allocator: Likewise.
1483 * libsupc++/eh_alloc.cc: Likewise.
1484 * include/std/future: Add nodiscard attribute to async.
1485 * libsupc++/new: Add nodiscard attribute to new.
1487 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
1492 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
1493 * include/bits/shared_ptr.h
1494 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
1495 (allocate_shared): Change to use new tag type.
1496 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
1497 Declare new member function.
1498 (_Sp_alloc_shared_tag): Define new type.
1499 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
1500 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
1501 _Sp_make_shared_tag::_S_eq to check type_info.
1502 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
1503 Constrain to prevent being called with _Sp_alloc_shared_tag.
1504 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
1505 Replace constructor with ...
1506 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
1507 reference parameter so address of the new object can be returned to
1508 the caller. Obtain the allocator from the tag type.
1509 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
1510 constructor with ...
1511 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
1512 to the __shared_count constructor.
1513 (__allocate_shared): Change to use new tag type.
1514 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
1516 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
1518 * src/c++17/fs_ops.cc
1519 (equivalent(const path&, const path&, error_code&))
1520 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
1521 compare files instead of relying on incomplete info returned by stat.
1524 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
1525 if the path is already absolute.
1526 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
1527 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
1530 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
1531 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
1532 of filesystem::exists.
1533 (create_directories(const path&, error_code&)): Add assertions.
1534 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1535 Add workaround for bug in _wstat for paths with trailing slash.
1536 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
1537 for expected behaviour on mingw.
1538 * testsuite/experimental/filesystem/operations/create_directories.cc:
1540 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
1541 "TMP" instead of "TMPDIR" and clean environment before each test. Do
1542 not test permissions on mingw targets.
1544 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
1546 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
1547 constructors and open members taking wide strings. Fix patterns for
1548 filesystem::path members to match wstring_view parameters. Add
1549 exports for shared_ptr members used by directory iterators.
1550 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
1551 error code parameter if the file doesn't exist.
1552 * src/filesystem/ops.cc (remove(const path&, error_code&)):
1554 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
1555 values for mingw targets, where "/" is not an absolute path. Do not
1556 test symlinks on mingw targets.
1557 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1558 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
1560 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1561 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
1562 that each component of the path is created.
1563 * testsuite/experimental/filesystem/operations/create_directories.cc:
1565 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
1566 permissions on mingw targets.
1567 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1568 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1569 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1570 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
1572 * testsuite/experimental/filesystem/operations/permissions.cc:
1574 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
1575 symlinks or permissions on mingw targets.
1576 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1577 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
1578 symlinks on mingw targets.
1579 * testsuite/experimental/filesystem/operations/remove_all.cc:
1581 * testsuite/27_io/filesystem/operations/status.cc: Do not test
1582 permissions on mingw targets.
1583 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
1584 test symlinks on mingw targets.
1585 * testsuite/experimental/filesystem/operations/space.cc: Fix test
1588 2019-02-14 Ulrich Drepper <drepper@redhat.com>
1591 Warn about unused comparisons of shared_ptr/unique_ptr
1592 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
1593 * include/bits/shared_ptr.h: Use it for operator ==, !=,
1594 <, <=, >, >= for shared_ptr.
1595 * include/bits/unique_ptr.h: Likewise for unique_ptr.
1597 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
1599 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
1600 as 201611L, because P0497R0 changes are supported.
1601 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
1603 * include/bits/erase_if.h [__cplusplus > 201703L]
1604 (__cpp_lib_erase_if): Only define for C++2a.
1605 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1606 (__cpp_lib_null_iterators): Define.
1607 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1608 (__cpp_lib_null_iterators): Define.
1609 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
1611 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
1613 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
1615 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
1616 changes are supported.
1617 * include/std/optional (__cpp_lib_optional): Likewise.
1618 * include/std/variant (__cpp_lib_variant): Likewise.
1619 * include/std/version [!__STRICT_ANSI__]
1620 (__cpp_lib_uncaught_exceptions): Define as long integer.
1621 [__cplusplus >= 201703L] (__cpp_lib_any)
1622 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
1623 (__cpp_lib_variant): Define for C++17.
1624 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
1626 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
1629 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
1631 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
1635 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
1637 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
1640 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
1642 * doc/xml/manual/intro.xml: Include new section.
1643 * doc/xml/manual/status_cxx2017.xml: Document more
1644 implementation-defined properties of the library.
1645 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
1646 * doc/html/*: Regenerate.
1648 * include/bits/refwrap.h [__cplusplus > 201703L]
1649 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
1650 (_Reference_wrapper_base_memfun): Do not define for C++2a.
1651 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
1653 (reference_wrapper::operator()): Add static assertion.
1654 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
1656 * include/std/chrono (duration_values::zero(), duration_values::min())
1657 (duration_values::max()): Add noexcept.
1658 (duration::zero(), duration::min(), duration::max()): Likewise.
1659 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
1660 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
1661 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
1663 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
1665 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1667 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
1668 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
1670 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
1673 * include/bits/functional_hash.h (hash<nullptr_t>): Define
1674 specialization for C++17 (P0513R0, LWG 2817).
1675 * testsuite/20_util/hash/nullptr.cc: New test.
1678 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
1679 pattern for std::basic_stringbuf::str().
1681 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
1682 basic_ostream::operator<< patterns.
1684 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
1686 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
1687 test failures on targets with 32-bit time_t.
1689 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
1690 * include/std/deque: Likewise.
1691 * include/std/forward_list: Likewise.
1692 * include/std/list: Likewise.
1693 * include/std/string: Likewise.
1694 * include/std/vector: Likewise.
1695 * include/std/version: Likewise.
1696 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
1697 * testsuite/23_containers/deque/erasure.cc: Likewise.
1698 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
1699 * testsuite/23_containers/list/erasure.cc: Likewise.
1700 * testsuite/23_containers/map/erasure.cc: Likewise.
1701 * testsuite/23_containers/set/erasure.cc: Likewise.
1702 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1703 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
1704 * testsuite/23_containers/vector/erasure.cc: Likewise.
1706 * include/experimental/internet [AI_NUMERICSERV]
1707 (resolver_base::numeric_service): Define conditionally.
1708 * testsuite/experimental/net/internet/resolver/base.cc: Test it
1710 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1713 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1714 Jonathan Wakely <jwakely@redhat.com>
1717 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
1718 (GLIBCXX_3.4.26): Add new exports.
1719 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
1720 correct list of sources.
1721 * include/Makefile.in: Regenerate.
1722 * include/std/ostream (operator<<(nullptr_t)): New member function.
1723 * src/c++17/ostream-inst.cc: New file.
1724 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
1727 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
1729 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
1730 of the source file containing the caller.
1731 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
1732 directories created by test.
1733 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1735 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1737 * testsuite/experimental/filesystem/iterators/
1738 recursive_directory_iterator.cc: Likewise.
1740 2019-01-10 Jakub Jelinek <jakub@redhat.com>
1742 PR tree-optimization/88775
1743 * include/bits/stl_function.h (greater<_Tp*>::operator(),
1744 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
1745 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
1746 instead of __builtin_constant_p if available. Don't bother with
1747 the pointer comparison in C++11 and earlier.
1749 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1753 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
1756 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
1758 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
1759 for filesystem::path. Give variables more distinctive names.
1761 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
1762 member function to perform non-trivial assignment.
1763 (_Optional_payload_base::_M_move_assign): Likewise.
1764 (_Optional_payload<T, true, false, true>::operator=)
1765 (_Optional_payload<T, true, true, false>::operator=)
1766 (_Optional_payload<T, true, false, false>::operator=): Call
1767 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
1770 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
1771 test std::complex<long double> if long double format is IBM128.
1772 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
1775 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
1777 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
1778 for old std::unique_ptr layout.
1779 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
1780 to become valueless. Add filesystem::path tests.
1783 * include/std/optional (_Optional_payload_base): New class template
1784 for common code hoisted from _Optional_payload specializations. Use
1785 a template for the union, to allow a partial specialization for
1786 types with non-trivial destructors. Add constructors for in-place
1787 initialization to the union.
1788 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
1789 to perform non-trivial copy construction, instead of relying on
1790 non-standard copy elision in a delegating constructor.
1791 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
1792 non-trivial move construction.
1793 (_Optional_payload): Derive from _Optional_payload_base and use it
1794 for everything except the non-trivial assignment operators, which are
1796 (_Optional_payload<false, C, M>): Derive from the specialization
1797 _Optional_payload<true, false, false> and add a destructor.
1798 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
1799 Forward to corresponding members of _Optional_payload.
1800 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
1801 Hoist common members from _Optional_base.
1802 (_Optional_base): Make all members and base class public.
1803 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
1804 _Optional_base_impl.
1805 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
1806 support for new std::optional layout.
1807 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
1810 * include/bits/locale_conv.h: Use <> for includes not "".
1811 * include/ext/random: Likewise.
1812 * include/ext/vstring.h: Likewise.
1814 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1816 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
1817 (GLIBCXX_3.4.21): Likewise.
1819 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
1822 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
1823 to match the one that controls whether utimbuf and utime are declared.
1825 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
1828 * include/bits/char_traits.h (char_traits::move): Do not pass null
1829 pointers to memmove.
1830 * include/bits/locale_facets.h
1831 (ctype<char>::widen(const char*, const char*, char*)): Do not
1832 pass null pointers to memcpy.
1833 (ctype<char>::narrow(const char*, const char*, char, char*)):
1835 (ctype<char>::do_widen(const char*, const char*, char*)):
1837 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
1840 * doc/xml/manual/spine.xml: Update copyright years.
1841 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
1842 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
1843 for C++17 filesystem library.
1844 * doc/html/*: Regenerate.
1846 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
1847 * config.h.in: Regenerate.
1848 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
1849 alphabetically and add missing entries for copy_symlink,
1850 hard_link_count, rename, and resize_file.
1851 * configure: Regenerate.
1852 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
1853 used unconditionally.
1854 * src/filesystem/ops-common.h (__gnu_posix::truncate)
1855 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
1856 supports truncating to zero length.
1857 * testsuite/27_io/filesystem/operations/all.cc: New test.
1858 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
1860 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
1863 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
1864 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
1865 * config.h.in: Regenerate.
1866 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
1867 remaining std::filesystem types and functions.
1868 * configure: Regenerate.
1869 * src/c++17/Makefile.am: Add C++17 filesystem sources.
1870 * src/c++17/Makefile.in: Regenerate.
1871 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
1872 here, and change name of included file.
1873 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
1874 here, and change name of included file.
1875 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
1876 path to dir-common.h.
1877 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
1878 path to ops-common.h. Disable -Wunused-parameter warnings.
1879 (internal_file_clock): Define unconditionally.
1880 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
1882 (do_copy_file, do_space): Move definitions to ops.common.h.
1883 (copy, file_size, hard_link_count, last_write_time, space): Only
1884 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
1886 (last_write_time, read_symlink): Remove unused attributes from
1888 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
1889 * src/filesystem/Makefile.in: Regenerate.
1890 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
1891 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
1892 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
1893 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
1894 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
1895 dummy types and functions instead of using #error.
1896 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
1897 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
1899 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
1900 (do_copy_file, do_space): Move definitions here from std-ops.cc.
1901 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
1902 to account for new namespace.
1903 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
1904 -lstdc++fs from dg-options.
1905 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
1906 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
1907 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
1908 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
1909 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
1911 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
1912 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1914 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
1915 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
1916 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
1917 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1918 * testsuite/27_io/filesystem/operations/create_directories.cc:
1920 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
1921 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
1922 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
1923 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
1924 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
1925 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
1926 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1927 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
1928 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
1929 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
1930 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
1931 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
1932 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
1933 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
1934 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
1935 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1936 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1937 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1939 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
1943 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
1944 typeinfo and vtables less greedy.
1945 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
1946 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
1947 * src/c++17/Makefile.in: Regenerate.
1948 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
1949 here, and change name of included file.
1950 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
1951 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
1953 * src/filesystem/Makefile.in: Regenerate.
1954 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
1955 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
1956 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
1957 from dg-options and remove dg-require-filesystem-ts.
1958 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
1959 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
1960 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
1961 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
1962 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1963 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
1964 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
1965 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
1966 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
1967 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
1968 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
1969 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
1970 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
1971 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
1972 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
1973 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
1974 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
1975 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
1976 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
1977 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
1978 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
1980 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
1981 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
1982 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
1983 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
1984 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
1985 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
1986 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
1987 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
1988 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
1989 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
1990 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
1991 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
1993 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
1995 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1997 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
1999 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2000 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2001 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2002 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2003 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2004 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2005 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2006 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2007 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2008 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2010 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2011 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2012 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2013 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2014 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2017 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2018 Check is_trivially_copyable instead of is_scalar.
2019 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2020 contained value can throw and its type is trivially copyable then
2021 construct into a temporary variant and move from it, to provide the
2022 strong exception safety guarantee.
2023 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2025 * testsuite/20_util/variant/87431.cc: New test.
2026 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2027 conversion causes valueless state.
2030 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2031 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2032 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2033 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2034 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2036 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
2038 * include/bits/fs_fwd.h (__file_clock): Define new clock.
2039 (file_time_type): Redefine in terms of __file_clock.
2040 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2042 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2044 (internal_file_lock): New helper type for accessing __file_clock.
2045 (do_copy_file): Use internal_file_lock to convert system time to
2047 (last_write_time(const path&, error_code&)): Likewise.
2048 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2050 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
2052 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2053 for const member functions of std::basic_string.
2054 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
2056 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
2057 Make non-standard constructor private.
2058 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2060 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2061 explicit instantiations for C++17 as well as earlier dialects.
2062 * src/c++17/Makefile.am: Add new source files.
2063 * src/c++17/Makefile.in: Regenerate.
2064 * src/c++17/cow-string-inst.cc: New file defining explicit
2065 instantiations for basic_string member functions added in C++17.
2066 * src/c++17/string-inst.cc: Likewise.
2068 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2069 copy/move constructors for old std::basic_string.
2070 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2071 (basic_string::reference, basic_string::const_reference): Define
2072 as plain references for C++11 and later.
2073 (basic_string::basic_string()): Put constructor body outside
2074 preprocessor conditional groups.
2075 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2076 instead of copying it.
2077 (basic_string::basic_string(const basic_string&, const _Alloc&)):
2079 (basic_string::basic_string(basic_string&&, const _Alloc&)):
2081 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2082 cases for old basic_string.
2083 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2084 allocator-extended constructors unconditionally. Add extra members to
2085 allocator type when using old string ABI.
2086 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2088 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2090 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2091 -fno-inline added to test flags.
2093 * testsuite/21_strings/basic_string/requirements/
2094 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2096 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2097 assertion failures with old std::string ABI.
2099 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2101 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2102 functions that will only erase elements at the end.
2103 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2104 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2105 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2107 (path::_List::pop_back()): Define.
2108 (path::_List::_M_erase_from(const_iterator)): Define.
2109 (path::operator/=(const path&)): Use pop_back to remove last component
2110 and _M_erase_from to remove multiple components.
2111 (path::_M_append(basic_string_view<value_type>)): Likewise.
2112 (path::operator+=(const path&)): Likewise.
2113 (path::_M_concat(basic_string_view<value_type>)): Likewise.
2114 (path::remove_filename()): Likewise.
2115 (path::lexically_normal()): Use _List::_Impl iterators instead of
2116 path::iterator. Use pop_back to remove components from the end. Clear
2117 trailing filename, instead of using erase(const_iterator) to remove
2118 a non-final component.
2119 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
2121 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
2123 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
2124 incorrect treatment of empty filename after trailing slash.
2125 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
2127 * testsuite/21_strings/basic_string/modifiers/assign/char/
2128 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
2130 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2131 move_assign_optim.cc: Likewise.
2133 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2134 Jakub Jelinek <jakub@redhat.com>
2137 * include/experimental/memory: Replace UTF-8 quote characters.
2138 * include/std/future: Replace UTF-8 "em dash" characters.
2140 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2143 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
2144 * include/debug/forward_list: Likewise.
2145 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
2147 * include/experimental/chrono: Likewise.
2148 * include/experimental/functional: Likewise.
2149 * include/experimental/ratio: Likewise.
2150 * include/experimental/system_error: Likewise.
2151 * include/experimental/tuple: Likewise.
2152 * include/experimental/type_traits: Likewise.
2153 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
2154 * include/parallel/multiseq_selection.h: Likewise.
2157 * config/abi/pre/gnu.ver: Add missing exports.
2158 * testsuite/22_locale/collate_byname/88681.cc: New test.
2159 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
2160 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2162 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
2164 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
2165 initializer_list<value_type> and from input iterator ranges.
2166 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2168 * testsuite/experimental/string_view/element_access/char/empty.cc:
2169 Fix year range in copyright header.
2171 2019-01-02 Joel Brobecker <brobecker@adacore.com>
2173 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2174 Fix year range in copyright header.
2176 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2178 Update copyright years.
2180 Copyright (C) 2019 Free Software Foundation, Inc.
2182 Copying and distribution of this file, with or without modification,
2183 are permitted in any medium without royalty provided the copyright
2184 notice and this notice are preserved.