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