]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
Tweak C++2a uses-allocator construction utilities
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
051e444d 12019-04-26 Jonathan Wakely <jwakely@redhat.com>
2
3 * include/std/memory (__uses_alloc_args): Add string-literal to
4 static_assert, to match the one in __uses_alloc.
5 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
6 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
7 for recursive uses-allocator construction of nested pairs.
8 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
9 comment.
10
db1349a6 112019-04-26 Jakub Jelinek <jakub@redhat.com>
12
dd693c4a 13 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
14 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
15 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
16 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
17
db1349a6 18 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
19 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
20 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
21 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
22 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
23 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
24 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
25
f0a82465 262019-04-25 Jonathan Wakely <jwakely@redhat.com>
27
28 PR libstdc++/90239
29 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
30 * include/std/scoped_allocator [__cplusplus > 201703L]
31 (scoped_allocator_adaptor::construct): Define in terms of
32 uses_allocator_construction_args, as per P0591R4.
33 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
34 * testsuite/util/testsuite_allocator.h: Remove name of unused
35 parameter.
36
fd1863e1 372019-04-24 Jonathan Wakely <jwakely@redhat.com>
38
9ed11778 39 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
40 * doc/html/*: Regenerate.
41
39b59bb9 42 * include/bits/fs_path.h (operator<, operator<=, operator>)
43 (operator>=, operator==, operator!=): Make hidden friends, as per
44 LWG 3065.
45 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
46 string type in test.
47 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
48
dd3b7006 49 * include/std/any (any::any(ValueType&&)): Use __and_v.
50 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
51 Likewise.
52
14710c9d 53 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
54 as per P0777R1.
55 * include/std/type_traits (__result_of_memfun): Use remove_reference
56 instead of __remove_cvref_t and remove redundant is_same check.
57 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
58
809f1d63 59 * include/experimental/string_view (basic_string_view::pointer)
60 (basic_string_view::reference): Fix to refer to non-const value_type.
61 * include/bits/basic_string.h (basic_string): Use __sv_check and
62 __sv_limit instead of basic_string_view::_M_check and
63 basic_string_view::_M_limit.
64 * include/std/string_view (__sv_check, __sv_limit): New
65 helper functions to replace basic_string_view::_M_check and
66 basic_string_view::_M_limit.
67 (basic_string_view): Add static assertions to enforce ill-formed
68 requirement for traits_type::char_type from P1148R0, and to enforce
69 required properties of char-like types.
70 (basic_string_view::pointer, basic_string_view::reference): Fix to
71 refer to non-const value_type.
72 (basic_string_view::operator[], basic_string_view::at)
73 (basic_string_view::front, basic_string_view::back)
74 (basic_string_view::data): Use const_reference and const_pointer
75 typedefs for return types.
76 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
77 (hash<wstring_view>): Fix argument_type typedef.
78 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
79 char/1.cc: Fix expected return type of basic_string_view::data().
80 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
81 wchar_t/1.cc: Likewise.
82 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
83 char/1.cc: Likewise.
84 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
85 wchar_t/1.cc: Likewise.
86 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
87 New test.
88 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
89 Check reference and pointer typedefs.
90 * testsuite/experimental/string_view/requirements/typedefs.cc:
91 Likewise.
92 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
93 Fix expected return type of basic_string_view::data().
94 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
95 1.cc: Likewise.
96 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
97 Likewise.
98 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
99 1.cc: Likewise.
100
37020b0a 101 PR libstdc++/90220
102 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
103 Avoid a runtime check for types that can never be stored in std::any.
104 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
105 array types.
106
b8e73341 107 PR libstdc++/90220 (partial)
108 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
109 not attempt ill-formed static_cast to pointers to non-object types.
110 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
111 function types.
112
1c9c8e0d 113 * testsuite/20_util/variant/run.cc: Catch exception by reference to
114 prevent -Wcatch-value warning.
115
fd1863e1 116 * include/std/variant (__variant_construct): Use template parameter
117 type instead of equivalent decltype-specifier.
118 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
119 Replace forward with move.
120 (_Move_ctor_base<false, Types...>::_M_destructive_move)
121 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
122 (_Move_ctor_base<true, Types...>::_M_destructive_move)
123 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
124 index after construction succeeds.
125 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
126 if-constexpr checks that are always true. Use __remove_cvref_t instead
127 of remove_reference so that is_nothrow_move_constructible check
128 doesn't use a const rvalue parameter. In the potentially-throwing case
129 construct a temporary and move assign it, as per LWG 2904.
130 (_Move_assign_base<false, Types...>::operator=): Remove redundant
131 if-constexpr checks that are always true. Use emplace as per LWG 2904.
132 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
133 construct a temporary and move assign from it, as per LWG 2904.
134 * testsuite/20_util/variant/exception_safety.cc: Check that
135 assignment operators have strong exception safety guarantee.
136
55bb4515 1372019-04-23 Thomas Rodgers <trodgers@redhat.com>
138
139 Document PSTL linker flags
140
7f6a1a9c 141 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
55bb4515 142
b48cc8c5 1432019-04-23 Jonathan Wakely <jwakely@redhat.com>
144
a4265b66 145 * include/std/variant (__detail::__variant::_Traits): Make
146 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
147 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
148 P0602R4.
149 (__detail::__variant::_Copy_assign_alias): Only depend on
150 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
151 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
152 move assignment operators.
153
28cc38ec 154 PR libstdc++/90165
155 * include/std/variant (variant::__not_self): New helper for the
156 is_same_v<remove_cvref_t<T>, variant>==false constraints.
157 (variant::__to_type_impl): Remove.
158 (variant::__to_type): Add default argument to check pack size, instead
159 of using __to_type_impl.
160 (variant::__accepted_type): Add default argument using __not_self.
161 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
162 for variant(T&&) constructor constraint.
163 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
164 Extract __accepted_type into a named template parameter for reuse in
165 other constraints and in the exception specification.
166 (variant::variant(in_place_type_t<T>, Args&&...))
167 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
168 (variant::variant(in_place_index_t<T>, Args&&...))
169 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
170 (variant::operator=T&&)): Remove redundant && from trait arguments.
171 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
172 isn't used for in_place_type or in_place_index arguments.
173
b48cc8c5 174 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
175 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
176 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
177
9ac9ee83 1782019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
179 Bernd Edlinger <bernd.edlinger@hotmail.de>
180 Jakub Jelinek <jakub@redhat.com>
181
182 PR target/89093
183 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
184 general-regs-only target attribute for ARM.
185
e11f5aed 1862019-04-23 Jonathan Wakely <jwakely@redhat.com>
187
b9d8292f 188 PR libstdc++/87431
189 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
190 specialization also depend on is_nothrow_move_constructible.
191 * include/std/variant (__detail::__variant::__never_valueless()):
192 Only true if the variant would have a move assignment operator.
193 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
194 Check __never_valueless<T...>().
195 (variant::emplace): Only perform non-throwing move assignments
196 for never-valueless alternatives if the variant has a move assignment
197 operator.
198 * testsuite/20_util/variant/compile.cc: Check that never-valueless
199 types can be emplaced into non-assignable variants.
200 * testsuite/20_util/variant/run.cc: Check that never-valueless types
201 don't get copied when emplaced into non-assignable variants.
202
e11f5aed 203 * include/std/variant (__detail::__variant::__ref_cast): Remove
204 unused function.
205 (__detail::__variant::_Uninitialized::_M_get)
206 (__detail::__variant::__get)
207 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
208
46fbb8aa 2092019-04-21 Iain Sandoe <iain@sandoe.co.uk>
210
211 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
212 to Darwin10.
213 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
214 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
215 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
216 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
217
dff3f73c 2182019-04-20 Thomas Rodgers <trodgers@redhat.com>
219
220 Delegate PSTL configuration to pstl/pstl_config.h
221
222 * include/bits/c++config: Remove explicit PSTL configuration
223 macros and use definitions from <pstl/pstl_config.h>.
224
3dbad48e 2252019-04-20 Thomas Rodgers <trodgers@redhat.com>
226
227 Cleanup algorithm implementations
228 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
ed42fdb5 229 execution policy.
3dbad48e 230 (mismatch): Forward execution policy.
231 (equal): Qualify call to std::equal().
232 (partial_sort): Forward execution policy.
233 (inplace_merge): Forward execution policy.
234
5d637ddd 2352019-04-19 Thomas Rodgers <trodgers@redhat.com>
236
237 Improve implementation of parallel equal()
238 * include/pstl/algorithm_impl.h
239 (__internal::__brick_equal): use "4 iterator" version of
240 std::equal().
241 (__internal::__brick_equal): use simd for random access
242 iterators on unsequenced execution policies.
243 (__internal::__pattern_equal): add "4 iterator" version
244 (__internal::__pattern_equal): dispatch to simd __brick_equal
245 for vector-only execution policies.
246 (__internal::__pattern_equal): dispatch to __parallel_or for
247 parallel execution policies.
248 * include/pstl/glue_algorithm_impl.h
249 (std::equal): dispatch to "4 iterator" version of
250 __internal::__pattern_equal().
251
88dbeb04 2522019-04-17 Jonathan Wakely <jwakely@redhat.com>
253
a0295ab5 254 PR libstdc++/90105
255 * include/bits/forward_list.h (operator==): Do not use operator!= to
256 compare elements.
257 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
258 earlier in the list, so that sort is stable.
259 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
260 * testsuite/23_containers/forward_list/comparable.cc: Test with
261 types that meet the minimum EqualityComparable and LessThanComparable
262 requirements. Remove irrelevant comment.
263
37a7dbf9 264 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
265 Do not depend on whether all alternative types are move constructible.
266 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
267 from the operand when deciding whether to perform the assignment.
268 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
269 with deleted move constructor and deleted move assignment operator.
270 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
271 behaviour of variants with DeletedMoves as an alternative.
272 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
273 (move_ctor, move_assign): Check that moving a variant with a
274 DeletedMoves alternative falls back to copying instead of moving.
275
e9a490a4 276 * testsuite/20_util/variant/compile.cc: Remove empty string literals
277 from static_assert declarations.
278
c4495ab1 279 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
280 actually match its name.
281 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
282 (test_swap()): Fix result for MoveCtorOnly and check
283 MoveCtorAndSwapOnly.
284
88dbeb04 285 * include/std/optional (optional::value_or(U&&) &&): Add missing
286 constexpr specifier.
287 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
288 for disengaged optionals and rvalue optionals.
289 * testsuite/20_util/optional/observers/4.cc: Likewise.
290
11deac81 2912019-04-12 Thomas Rodgers <trodgers@redhat.com>
292
293 * include/pstl/algorithm_impl.h: Uglify identfiers.
294 * include/pstl/numeric_impl.h: Uglify identfiers.
295 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
296
34d8d757 2972019-04-11 Thomas Rodgers <trodgers@redhat.com>
298
299 * include/bits/c++config:
300 Add definition for __PSTL_ASSERT.
301 Add definition for __PSTL_ASSERT_MSG.
302 * include/pstl/algorithm_impl.h: Replace use of assert().
303 * include/pstl/numeric_impl.h: Replace use of assert().
304 * include/pstl/parallel_backend_tbb.h:
305 Replace use of assert().
306 Replace use of __TBB_ASSERT().
34d8d757 307 * include/pstl/parallel_backend_utils.h: Replace use of assert().
308
629a2d18 3092019-04-11 Jonathan Wakely <jwakely@redhat.com>
310
311 PR libstdc++/90046
312 * src/c++17/memory_resource.cc
313 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
314 needed to allow placing a _Chunk at the end of the buffer.
315 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
316
b047c9ae 3172019-04-10 Jonathan Wakely <jwakely@redhat.com>
318
6a98b075 319 * doc/xml/faq.xml: Add information about emergency EH pool.
320 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
321 Move outdated information on mt_allocator to a separate section.
322 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
323 doesn't affect the default allocator.
324
706bf2a5 325 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
326 typo.
327
b047c9ae 328 PR libstdc++/89851
329 * testsuite/20_util/variant/89851.cc: New test.
330
faa382bd 3312019-04-09 Jonathan Wakely <jwakely@redhat.com>
332
492debfa 333 * include/std/variant: Adjust whitespace. Add comments.
334 (_Multi_array): Leave primary template undefined.
335 (_Multi_array<_Tp>): Define partial specialization for base case of
336 recursion.
337 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
338 which is always a reference.
339 (__gen_vtable::_S_apply()): Remove function, inline body into
340 default member initializer.
341 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
342
47cf9c4c 343 * include/std/variant (__variant_idx_cookie): Add member type.
344 (__visitor_result_type): Remove.
345 (__do_visit): Use invoke_result instead of __visitor_result_type.
346 * testsuite/20_util/variant/visit.cc: New test.
347
faa382bd 348 PR libstdc++/90008
349 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
350 unused capture.
351 * testsuite/20_util/variant/90008.cc: New test.
352
e4da4897 3532019-04-09 Thomas Rodgers <trodgers@redhat.com>
354
355 * include/pstl/algorithm_impl.h: Add namespace qualification.
356 * include/pstl/execution_defs.h: Add namespace qualification.
357 * include/pstl/execution_impl.h: Add namespace qualification.
358 * include/pstl/numeric_impl.h: Add namespace qualification.
359 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
360 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
361 * include/pstl/parallel_backend_utils.h: Include <cassert>.
362
ff7d433d 3632019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
364
365 Fix visit<R> for variant.
366 * include/std/variant (__do_visit): Add a template parameter
367 for enforcing same return types for visit.
368 (__gen_vtable_impl): Likewise.
369 (_S_apply_single_alt): Adjust.
370 (__visit_invoke_impl): New. Handle casting to void.
371 (__do_visit_invoke): New. Enforces same return types.
372 (__do_visit_invoke_r): New. Converts return types.
373 (__visit_invoke): Adjust.
374 (__gen_vtable): Add a template parameter for enforcing
375 same return types for visit.
376 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
377 different return types.
378 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
379 visitors with different return types don't accidentally
380 compile with regular visitation.
381
d0f56531 3822019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
383
384 * testsuite/27_io/filesystem/iterators/caching.cc: Add
385 dg-require-filesystem-ts.
386
781cb64d 3872019-04-05 Jonathan Wakely <jwakely@redhat.com>
388
bfbd20f7 389 * doc/xml/manual/status_cxx2020.xml: Update status.
390 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
391 * testsuite/20_util/variant/visit_r.cc: New test.
392
83bd31bf 393 * include/bits/fs_dir.h (directory_iterator::operator*)
394 (directory_iterator::operator->): Add noexcept.
395 (operator==, operator!=): Replace namespace-scope equality operators
396 for directory iterators with hidden friends.
397
0067a809 398 PR libstdc++/89986
399 * config/abi/pre/gnu.ver: Add missing exports.
400 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
401 increment member.
402
7d0ae205 403 * config/abi/pre/gnu.ver: Export new symbols.
404 * include/bits/fs_dir.h (recursive_directory_iterator::options())
405 (recursive_directory_iterator::recursion_pending())
406 (recursive_directory_iterator::disable_recursion_pending()): Remove
407 inline definitions. Make noexcept.
408 (recursive_directory_iterator::depth())
409 (recursive_directory_iterator::operator*())
410 (recursive_directory_iterator::operator->()): Make noexcept.
411 (recursive_directory_iterator::_M_options)
412 (recursive_directory_iterator::_M_pending): Remove data members.
413 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
414 (recursive_directory_iterator::recursive_directory_iterator): Remove
415 ctor-initializer. Use new constructor for _Dir_stack.
416 (recursive_directory_iterator::options())
417 (recursive_directory_iterator::recursion_pending())
418 (recursive_directory_iterator::disable_recursion_pending()): Add
419 non-inline definitions.
420 (recursive_directory_iterator::depth()): Make noexcept.
421 (recursive_directory_iterator::increment(error_code&))
422 (recursive_directory_iterator::pop(error_code&)): Adjust to new
423 location of options and recursion_pending members.
424 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
425 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
426 user-declared move constructor and assignment operator, to make the
427 type move-only.
428
5a6e0b73 429 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
430 d_type == DT_UNKNOWN immediately.
431 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
432 handling here.
433 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
434
aa9c570e 435 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
436 assignment.
437 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
438 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
439 assignment.
440
781cb64d 441 PR libstdc++/87431 (again)
442 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
443 Define partial specialization for basic_string.
444 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
445 shared_ptr and weak_ptr.
446 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
447 function.
448 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
449 vector.
450 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
451 unique_ptr.
452 * include/debug/vector (_Never_valueless_alt): Likewise for debug
453 vector.
454 * include/std/any (_Never_valueless_alt): Define explicit
455 specialization for any.
456 * include/std/variant (_Never_valueless_alt): Define primary template.
457 (__never_valueless): Use _Never_valueless_alt instead of
458 is_trivially_copyable.
459 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
460 initializations to avoid try-catch overhead. Add special case for
461 scalars produced by potentially-throwing conversions. Use
462 _Never_valueless_alt instead of is_trivially_copyable for the
463 remaining strong exception-safety cases.
464 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
465 * testsuite/20_util/variant/87431.cc: Run both test functions.
466 * testsuite/20_util/variant/exception_safety.cc: New test.
467 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
468 so the variant becomes valueless.
469
62fd39e8 4702019-04-03 Jonathan Wakely <jwakely@redhat.com>
471
e1d699b8 472 PR libstdc++/85184
473 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
474 Remove assertions.
72be2bb7 475 (variant::emplace<_Tp>): Return result of emplace<N> directly.
e1d699b8 476
62fd39e8 477 * include/std/string (__hash_string_base): New class template defining
478 operator() for hashing strings.
479 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
480 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
481 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
482 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
483
4f3e024d 4842019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
485
486 Use single-visitation in variant assignment and swap and relops.
487 Also use indices instead of types when checking whether
488 variants hold the same thing.
489 * include/std/variant (__do_visit): Add a template parameter
490 for index visitation, invoke with indices if index visitation
491 is used.
492 (__variant_idx_cookie): New.
493 (__visit_with_index): Likewise.
494 (_Copy_assign_base::operator=): Do single-visitation with
495 an index visitor.
496 (_Move_assign_base::operator=): Likewise.
497 (_Extra_visit_slot_needed): Adjust.
498 (__visit_invoke): Call with indices if it's an index visitor.
499 (relops): Do single-visitation with an index visitor.
500 (swap): Likewise.
501 (__visitor_result_type): New.
502
106979b7 5032019-03-30 Eric Botcazou <ebotcazou@adacore.com>
504
505 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
506
225ca87b 5072019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
508
509 Don't revisit a variant we are already visiting.
510 * include/std/variant (__variant_construct_single): New.
511 (__variant_construct): Use it.
512 (_M_destructive_move): Likewise.
513 (_M_destructive_copy): Likewise.
514 (_Copy_assign_base::operator=): Adjust.
515 (_Move_assign_base::operator=): Likewise.
516 (swap): Likewise.
517
7237dce7 5182019-03-26 Jonathan Wakely <jwakely@redhat.com>
519
520 PR libstdc++/85965
521 * include/bits/hashtable.h (_Hashtable): Move static assertions to
522 destructor so they are not evaluated until the _Key type is complete.
523 * include/bits/stl_tree.h (_Rb_tree): Likewise.
524 * testsuite/23_containers/set/85965.cc: New test.
525 * testsuite/23_containers/unordered_set/85965.cc: New test.
526 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
527 with regexp matching the corresponding _Rb_tree specialization.
528 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
529 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
530 * testsuite/23_containers/set/48101_neg.cc: Likewise.
531 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
532 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
533 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
534 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
535
4c0ef551 5362019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
537
538 PR libstdc++/89825
539 Fix based on a suggestion by Antony Polukhin.
540 * include/std/variant (__never_valueless): New.
541 (_M_valid): Use it.
542 (_Extra_visit_slot_needed): New.
543 (_Multi_array): Use it.
544 (_S_apply_all_alts): Likewise.
545
28b460dd 5462019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
547
548 PR libstdc++/89824
549 Fix based on a suggestion by Antony Polukhin.
550 * include/std/variant (__gen_vtable): Don't reserve an
551 additional table slot, _Multi_array already does that.
552
4d235dc5 5532019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
554
555 PR libstdc++/89816
556 Fix based on a suggestion by Antony Polukhin.
557 * include/std/variant (__variant_construct): Capture a pointer
558 to the storage and visit just one variant.
559
d0595c7e 5602019-03-22 Jonathan Wakely <jwakely@redhat.com>
561
5c34f7ca 562 * doc/xml/manual/backwards_compatibility.xml: Remove link to
563 Doxygen-generated pages with unstable URL.
564 * doc/xml/manual/concurrency_extensions.xml: Likewise.
565 * doc/xml/manual/extensions.xml: Likewise.
566 * doc/xml/manual/parallel_mode.xml: Likewise.
567 * doc/xml/manual/support.xml: Likewise.
568
d0595c7e 569 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
570 avoid -Wconversion warnings.
571
7e155e54 5722019-03-21 Thomas Rodgers <trodgers@redhat.com>
573
574 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
575 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
576 (allstamped): Add stamp-pstl.
577 (install-headers): Add ptsl_builddir.
578 * include/Makefile.in: Regenerate.
579 * include/bits/c++config: Add pstl configuration.
580 * include/pstl/LICENSE.txt: New file.
581 * include/pstl/algorithm_fwd.h: New file.
582 * include/pstl/algorithm_impl.h: New file.
583 * include/pstl/execution_defs.h: New file.
584 * include/pstl/execution_impl.h: New file.
585 * include/pstl/glue_algorithm_defs.h: New file.
586 * include/pstl/glue_algorithm_impl.h: New file.
587 * include/pstl/glue_execution_defs.h: New file.
588 * include/pstl/glue_memory_defs.h: New file.
589 * include/pstl/glue_memory_impl.h: New file.
590 * include/pstl/glue_numeric_defs.h: New file.
591 * include/pstl/glue_numeric_impl.h: New file.
592 * include/pstl/memory_impl.h: New file.
593 * include/pstl/numeric_fwd.h: New file.
594 * include/pstl/numeric_impl.h: New file.
595 * include/pstl/parallel_backend.h: New file.
596 * include/pstl/parallel_backend_tbb.h: New file.
597 * include/pstl/parallel_backend_utils.h: New file.
598 * include/pstl/parallel_impl.h: New file.
599 * include/pstl/pstl_config.h: New file.
600 * include/pstl/unseq_backend_simd.h: New file.
601 * include/pstl/utils.h: New file.
602 * include/std/algorithm: Include parallel algorithm implementations.
603 * include/std/execution: New file.
604 * include/std/memory: Include parallel algorithm implementations.
605 * include/std/numeric: Include parallel algorithm implementations.
606 * include/std/version: Add parallel algorithms feature test macro.
607 * testsuite/util/pstl/pstl_test_config.h: New file.
608 * testsuite/util/pstl/test_utils.h: New file.
609 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
610 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
611 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
612 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
613 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
614 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
615 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
616 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
617 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
618 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
619 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
620 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
621 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
622 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
623 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
624 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
625 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
626 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
627 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
628 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
629 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
630 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
631 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
632 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
633 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
634 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
635 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
636 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
637 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
638 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
639 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
640 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
641 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
642 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
643 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
644 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
645 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
646 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
647 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
648 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
649 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
650 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
651 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
652 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
653 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
654 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
655 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
656 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
657 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
658 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
659 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
660 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
661 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
662 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
663 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
664 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
665 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
666 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
667 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
668 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
669 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
670 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
671 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
672 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
673 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
674 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
675 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
676 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
677 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
678 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
679 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
680 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
681 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
682 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
683 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
684 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
685 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
686 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
687 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
688 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
689 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
690 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
691 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
692 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
693 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
694 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
695 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
696 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
697 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
698 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
699 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
700 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
701 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
702 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
703 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
704 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
705 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
706 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
707 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
708 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
709 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
710 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
711 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
712 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
713 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
714 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
715
480b3b75 7162019-03-21 Jonathan Wakely <jwakely@redhat.com>
717
0a4390ac 718 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
719 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
720 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
721 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
722 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
723 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
724 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
725 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
726 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
727 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
728 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
729 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
730 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
731 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
732 when the special functions IS is enabled, not for C++17.
733 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
734 Replace with ...
735 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
736 without checks for special functions in C++17.
737 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
738 New test.
739
480b3b75 740 PR libstdc++/88066
741 * include/backward/hash_map: Use <> for includes not "".
742 * include/backward/hash_set: Likewise.
743 * include/backward/strstream: Likewise.
744 * include/tr1/bessel_function.tcc: Likewise.
745 * include/tr1/exp_integral.tcc: Likewise.
746 * include/tr1/legendre_function.tcc: Likewise.
747 * include/tr1/modified_bessel_func.tcc: Likewise.
748 * include/tr1/riemann_zeta.tcc: Likewise.
749
ed360d55 7502019-03-19 Jonathan Wakely <jwakely@redhat.com>
751
752 * doc/xml/manual/allocator.xml: Link to table documenting evolution
753 of extension allocators.
754 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
755 Document new headers in 7.2, 8.1 and 9.1 releases.
756 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
757 * doc/html/*: Regenerate.
758
8f9d7eb1 7592019-03-12 John David Anglin <dave.anglin@bell.net>
760
761 PR libstdc++/89461
762 * testsuite/lib/libstdc++.exp: Locate libatomic.
763 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
764 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
765 libatomic options.
766 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
767 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
768 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
769 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
770
0bd005b6 7712019-03-11 Jonathan Wakely <jwakely@redhat.com>
772
5995ba3a 773 PR libstdc++/89460
774 * configure.ac: Check for sockatmark.
775 * crossconfig.m4: Check for sockatmark.
776 * config.h.in: Regenerate.
777 * configure: Regenerate.
778 * include/experimental/internet (address_v4::_S_hton): Rename
779 overloaded functions to _S_hton_16 and _S_ntoh_16.
780 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
781 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
782 * include/experimental/socket (basic_socket::at_mark): Check
783 _GLIBCXX_HAVE_SOCKATMARK.
784
5aa8571a 785 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
786 const variables instead of macros.
787
0bd005b6 788 PR libstdc++/89629
789 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
790 Use correct type for len_aligned.
791 * testsuite/20_util/hash/89629.cc: New test.
792
bc204227 7932019-03-11 Jakub Jelinek <jakub@redhat.com>
794
795 PR libstdc++/89641
796 * include/std/atomic (atomic<T>::store, atomic<T>::load,
797 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
798 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
799 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
800 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
801 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
802 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
803 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
804 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
805 memory_order_seq_cst to int.
806
fc557c2b 8072019-03-08 Jonathan Wakely <jwakely@redhat.com>
808
59b5e890 809 * doc/xml/manual/using.xml: Use link element instead of xref.
810 * doc/html/*: Regenerate.
811
fc557c2b 812 * include/bits/fs_path.h (path::format): Add fixed underlying type.
813
66c6ff9e 8142019-03-08 François Dumont <fdumont@gcc.gnu.org>
815
448338d0 816 PR libstdc++/89477
817 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
818 parameters in deduction guides.
819 * include/debug/multimap.h (multimap): Likewise.
820 * include/debug/set.h (multimap): Likewise.
821 * include/debug/multiset.h (multimap): Likewise.
822 * include/debug/unordered_map (unordered_map): Likewise.
823 (unordered_multimap): Likewise.
824 * include/debug/unordered_set (unordered_set): Likewise.
825 (unordered_multiset): Likewise.
826
66c6ff9e 827 PR libstdc++/89608
828 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
829 Invalidate all iterators in case of rehash.
830 (unordered_multimap<>::_M_check_rehashed): Likewise.
831 * include/debug/unordered_set
832 (unordered_set<>::_M_check_rehashed): Likewise.
833 (unordered_multiset<>::_M_check_rehashed): Likewise.
834 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
835
32e92dc2 8362019-03-07 Andreas Schwab <schwab@suse.de>
837
838 * config/abi/post/riscv64-linux-gnu: New directory.
839 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
840
61dcf2e1 8412019-03-07 Jonathan Wakely <jwakely@redhat.com>
842
682ee94e 843 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
844 compile test to run. Fix typo.
845
f24442bd 846 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
847 * doc/html/*: Regenerate.
848
61dcf2e1 849 P0356R5 Simplified partial function application
850 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
851 helpers for bind_front.
852 (bind_front, __cpp_lib_bind_front): Define.
853 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
854
b4af2395 8552019-03-06 Jonathan Wakely <jwakely@redhat.com>
856
857 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
858 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
859 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
860 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
861
f1857b8b 8622019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
863
864 PR libstdc++/86655 - std::assoc_legendre should not constrain
865 the value of m (or x).
866 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
867 __sph_legendre): If degree > order Don't throw, return 0.
868 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
869 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
870 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
871 * testsuite/tr1/5_numerical_facilities/special_functions/
872 02_assoc_legendre/pr86655.cc: New test.
873 * testsuite/tr1/5_numerical_facilities/special_functions/
874 22_sph_legendre/pr86655.cc: New test.
875
49c83dca 8762019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
877
878 Rewrite variant.
879 Also PR libstdc++/85517
880 * include/std/variant (__do_visit): New.
881 (__variant_cast): Likewise.
882 (__variant_cookie): Likewise.
883 (__erased_*): Remove.
884 (_Variant_storage::_S_vtable): Likewise.
885 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
886 (_Variant_storage::__M_reset): Adjust.
887 (__variant_construct): New.
888 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
889 __variant_construct.
890 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
891 (_Move_ctor_base::__M_destructive_copy): New.
892 (_Move_ctor_base::__M_destructive_move): Adjust to use
893 __variant_construct.
894 (_Copy_assign_base::operator=): Adjust to use __do_visit.
895 (_Copy_assign_alias): Adjust to check both copy assignment
896 and copy construction for triviality.
897 (_Move_assign_base::operator=): Adjust to use __do_visit.
898 (_Multi_array): Add support for visitors that accept and return
899 a __variant_cookie.
900 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
901 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
902 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
903 a __variant_cookie temporary for a variant that is valueless and..
904 (__gen_vtable_impl::__visit_invoke): ..adjust here.
905 (__gen_vtable::_Array_type): Conditionally make space for
906 the __variant_cookie visitor case.
907 (__variant_construct_by_index): New.
908 (get_if): Adjust to use std::addressof.
909 (relops): Adjust to use __do_visit.
910 (variant): Add __variant_cast and __variant_construct_by_index
911 as friends.
912 (variant::emplace): Use _M_reset() and __variant_construct_by_index
913 instead of self-destruction.
914 (variant::swap): Adjust to use __do_visit.
915 (visit): Reimplement in terms of __do_visit.
916 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
917 * testsuite/20_util/variant/compile.cc: Adjust.
918 * testsuite/20_util/variant/run.cc: Likewise.
919
13825fb2 9202019-03-06 Jonathan Wakely <jwakely@redhat.com>
921
2613fa6b 922 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
923 constant.
924 * testsuite/experimental/feat-char8_t.cc: Likewise.
925
a17f06b3 926 * include/std/type_traits [C++20] (is_bounded_array)
927 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
928 Define.
929 * testsuite/20_util/is_bounded_array/requirements/
930 explicit_instantiation.cc: New test.
931 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
932 test.
933 * testsuite/20_util/is_bounded_array/value.cc: New test.
934 * testsuite/20_util/is_unbounded_array/requirements/
935 explicit_instantiation.cc: New test.
936 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
937 * test.
938 * testsuite/20_util/is_unbounded_array/value.cc: New test.
939
13825fb2 940 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
941 Add constexpr.
942 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
943
2e73e63a 9442019-03-05 Jonathan Wakely <jwakely@redhat.com>
945
946 * include/c_compatibility/math.h [C++20] (lerp): Add using
947 declaration.
948 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
949 (__lerp): Define function template to implement lerp.
950 (lerp(float, float, float), lerp(double, double, double))
951 (lerp(long double, long double, long double)): Define for C++20.
952 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
953 (midpoint(T, T), midpoint(T*, T*)): Define.
954 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
955 * testsuite/26_numerics/lerp.cc: New test.
956 * testsuite/26_numerics/midpoint/floating.cc: New test.
957 * testsuite/26_numerics/midpoint/integral.cc: New test.
958 * testsuite/26_numerics/midpoint/pointer.cc: New test.
959
08d3ce5b 9602019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
961
962 PR libstdc++/88996 Implement P0439R0
963 Make std::memory_order a scoped enumeration.
964 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
965 add variables for the old enumerators. Adjust calls.
966 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
967 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
968
ad29ad75 9692019-03-04 Jonathan Wakely <jwakely@redhat.com>
970
4233f2a8 971 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
972 directive.
973
ad29ad75 974 * include/std/memory_resource (polymorphic_allocator): Add default
975 template argument for C++20.
976 (polymorphic_allocator::allocate_bytes)
977 (polymorphic_allocator::deallocate_bytes)
978 (polymorphic_allocator::allocate_object)
979 (polymorphic_allocator::deallocate_object)
980 (polymorphic_allocator::new_object)
981 (polymorphic_allocator::delete_object): New member functions for
982 C++20.
983 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
984 test.
985
d4c27c4a 9862019-03-03 Jonathan Wakely <jwakely@redhat.com>
987
988 PR libstdc++/89562
989 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
990 mode for mingw.
991
6a9c77f1 9922019-03-01 Jonathan Wakely <jwakely@redhat.com>
993
5b313df9 994 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
995 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
996
6a9c77f1 997 * include/std/memory (uses_allocator_construction_args): New set of
998 overloaded functions.
999 (make_obj_using_allocator, uninitialized_construct_using_allocator):
1000 New functions.
1001 * include/std/memory_resource (polymorphic_allocator::construct)
1002 [__cplusplus > 201703l]: Replace all overloads with a single function
1003 using uses_allocator_construction_args.
1004 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1005 test.
1006 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1007
53ea0887 10082019-02-27 Jonathan Wakely <jwakely@redhat.com>
1009
1010 PR libstdc++/89466
1011 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1012 stylesheet directories before check for xsltproc. Try to use
1013 xmlcatalog to find local stylesheet directory before trying hardcoded
1014 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1015 check to look for the same stylesheet as doc/Makefile.am uses. Don't
1016 use xsltproc if xmlcatalog fails to find a local stylesheet.
1017 * configure.ac: Check for xmlcatalog.
1018 * Makefile.in: Regenerate.
1019 * configure: Likewise.
1020 * doc/Makefile.in: Likewise.
1021 * include/Makefile.in: Likewise.
1022 * libsupc++/Makefile.in: Likewise.
1023 * po/Makefile.in: Likewise.
1024 * python/Makefile.in: Likewise.
1025 * src/Makefile.in: Likewise.
1026 * src/c++11/Makefile.in: Likewise.
1027 * src/c++17/Makefile.in: Likewise.
1028 * src/c++98/Makefile.in: Likewise.
1029 * src/filesystem/Makefile.in: Likewise.
1030 * testsuite/Makefile.in: Likewise.
1031
72ebb7e8 10322019-02-26 Jonathan Wakely <jwakely@redhat.com>
1033
a7f2f1b1 1034 PR libstdc++/89477
1035 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1036 container deduction guides.
1037 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1038 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1039 parameters in deduction guides.
1040 * include/bits/stl_multimap.h (multimap): Likewise.
1041 * include/bits/stl_multiset.h (multiset): Likewise.
1042 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1043 * include/bits/stl_set.h (set): Likewise.
1044 * include/bits/stl_stack.h (stack): Likewise.
1045 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1046 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1047 constrain parameters in deduction guides.
1048 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1049 Likewise.
1050 * testsuite/23_containers/map/cons/deduction.cc: Test additional
1051 deduction cases.
1052 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1053 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1054 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1055 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1056 Likewise.
1057 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1058 Likewise.
1059 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1060
72ebb7e8 1061 PR libstdc++/89416
1062 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1063 to class template and partial specialization using void_t.
1064 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1065
c9f61a64 10662019-02-24 Jonathan Wakely <jwakely@redhat.com>
1067
1068 PR libstdc++/89416
1069 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1070 copy and move members public.
1071
61e2d6f7 10722019-02-23 Jonathan Wakely <jwakely@redhat.com>
1073
87798f3f 1074 * include/std/type_traits (__underlying_type_impl): New helper to
1075 make underlying_type SFINAE-friendly.
1076 (underlying_type): Derive from __underlying_type_impl.
1077 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1078 test.
1079
61e2d6f7 1080 PR libstdc++/89446
1081 * include/bits/char_traits.h (__constant_char_array): Check index is
1082 in range before dereferencing.
1083 (char_traits<char>::compare, char_traits<char>::find)
1084 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1085 immediately if n is zero.
1086 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1087 Remove workarounds for PR 67026.
1088 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1089 New test.
1090 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1091 New test.
1092
90a443b3 10932019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1094
1095 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1096 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1097
98485ce3 10982019-02-22 Jakub Jelinek <jakub@redhat.com>
1099
1100 PR libstdc++/89402
1101 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1102 type to std::size_t and argument to type to long double.
1103
26b4fc38 11042019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1105
1106 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1107 * config/abi/post/sparc64-linux-gnu: New directory.
1108 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1109 * config/abi/post/sparc64-linux-gnu/32: New directory.
1110 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1111
4f847a8e 11122019-02-21 Jonathan Wakely <jwakely@redhat.com>
1113
1114 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1115 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1116 test.
1117
aad651b3 11182019-02-22 Tom Honermann <tom@honermann.net>
1119
1120 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1121 printers for u8string and u8string_view.
1122
c783b3cc 11232019-02-22 Tom Honermann <tom@honermann.net>
1124
1125 * testsuite/18_support/byte/ops.cc: Validate
1126 std::to_integer<char8_t>, std::to_integer<char16_t>, and
1127 std::to_integer<char32_t>.
1128 * testsuite/18_support/numeric_limits/dr559.cc: Validate
1129 std::numeric_limits<char8_t>.
1130 * testsuite/18_support/numeric_limits/lowest.cc: Validate
1131 std::numeric_limits<char8_t>::lowest().
1132 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1133 std::numeric_limits<char8_t>::max_digits10.
1134 * testsuite/18_support/type_info/fundamental.cc: Validate
1135 typeinfo for char8_t.
1136 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1137 std::from_chars with char8_t.
1138 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1139 Validate explicit instantiation of std::hash<char8_t>.
1140 * testsuite/20_util/is_integral/value.cc: Validate
1141 std::is_integral<char8_t>.
1142 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1143 Validate std::make_signed<char8_t>.
1144 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1145 Validate u8string construction from char8_t sources.
1146 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1147 std::pmr::u8string.
1148 * testsuite/21_strings/basic_string_view/operations/compare/
1149 char/70483.cc: Validate substr operations on u8string_view.
1150 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1151 the u8string_view typedef is defined.
1152 * testsuite/21_strings/char_traits/requirements/
1153 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1154 member functions.
1155 * testsuite/21_strings/char_traits/requirements/
1156 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1157 constexpr member functions.
1158 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1159 that the u8string typedef is defined.
1160 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1161 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1162 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1163 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1164 numbers.
1165 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1166 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1167 Likewise.
1168 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1169 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1170 Validate std::atomic<char8_t>::is_always_lock_free
1171 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1172 Update line numbers.
1173 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1174 Likewise.
1175 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1176 Likewise.
1177 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1178 Validate std::experimental::pmr::u8string.
1179 * testsuite/experimental/string_view/typedefs.cc: Validate that the
1180 u8string_view typedef is defined.
1181 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1182 char32_t to the typelists.
1183
ef96a935 11842019-02-22 Tom Honermann <tom@honermann.net>
1185
1186 * include/ext/typelist.h: Constrain a partial specialization of
1187 typelist::detail::append_ to only match chain<T1,T2>.
1188
d373b606 11892019-02-21 Jonathan Wakely <jwakely@redhat.com>
1190
1191 PR libstdc++/89416
1192 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1193 class template with class. Replace move and copy member types with
1194 member alias templates, so they are only instantiated when needed.
1195 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1196 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1197 test for C++11/14/17 as well.
1198 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1199 test.
1200
25395ee8 12012019-02-20 Jakub Jelinek <jakub@redhat.com>
1202
1203 PR libstdc++/89402
1204 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1205 _GLIBCXX_PURE to the alias declaration.
1206
affcb65b 12072019-02-19 Jonathan Wakely <jwakely@redhat.com>
1208
1209 * testsuite/21_strings/basic_string/literals/types.cc
1210 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1211 * testsuite/21_strings/basic_string/literals/values.cc
1212 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1213 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1214 potentially having different type.
1215 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1216 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1217 to char.
1218 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1219 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1220 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1221 string literals only using basic character set.
1222 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1223 u8 literals to char.
1224 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1225 Test ATOMIC_CHAR8_T_LOCK_FREE.
1226 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1227 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1228 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1229 * testsuite/experimental/string_view/literals/types.cc
1230 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1231 literal.
1232 * testsuite/experimental/string_view/literals/values.cc
1233 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1234
4acc5060 12352019-02-19 Tom Honermann <tom@honermann.net>
1236
1237 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1238 from char16_32_t.cc; validates numeric_limits<char8_t>.
1239 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1240 test cloned from types.cc; validates operator""s for char8_t
1241 returns u8string.
1242 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1243 test cloned from values.cc; validates construction and comparison
1244 of u8string values.
1245 * testsuite/21_strings/basic_string/requirements/
1246 /explicit_instantiation/char8_t/1.cc: New test cloned from
1247 char16_t/1.cc; validates explicit instantiation of
1248 basic_string<char8_t>.
1249 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1250 New test cloned from types.cc; validates operator""sv for char8_t
1251 returns u8string_view.
1252 * testsuite/21_strings/basic_string_view/literals/
1253 values-char8_t.cc: New test cloned from values.cc; validates
1254 construction and comparison of u8string_view values.
1255 * testsuite/21_strings/basic_string_view/requirements/
1256 explicit_instantiation/char8_t/1.cc: New test cloned from
1257 char16_t/1.cc; validates explicit instantiation of
1258 basic_string_view<char8_t>.
1259 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1260 New test cloned from char16_t/65049.cc; validates that
1261 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1262 * testsuite/21_strings/char_traits/requirements/char8_t/
1263 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1264 that char_traits<char8_t> member typedefs are present and correct.
1265 * testsuite/21_strings/char_traits/requirements/
1266 explicit_instantiation/char8_t/1.cc: New test cloned from
1267 char16_t/1.cc; validates explicit instantiation of
1268 char_traits<char8_t>.
1269 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1270 from char16_t.cc: validates
1271 codecvt<char16_t, char8_t, mbstate_t>.
1272 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
1273 from char32_t.cc: validates
1274 codecvt<char32_t, char8_t, mbstate_t>.
1275 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1276 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1277 codecvt<char32_t, char8_t, std::mbstate_t>.
1278 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1279 test cloned from string.cc; validates filesystem::path construction
1280 from char8_t input.
1281 * testsuite/experimental/feat-char8_t.cc: New test; validates that
1282 the __cpp_lib_char8_t feature test macro is defined with the
1283 correct value.
1284 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1285 New test cloned from string.cc; validates filesystem::path
1286 construction from char8_t input.
1287 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1288 test cloned from types.cc; validates operator""sv for char8_t
1289 returns u8string_view.
1290 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1291 New test cloned from values.cc; validates construction and
1292 comparison of u8string_view values.
1293 * testsuite/experimental/string_view/requirements/
1294 explicit_instantiation/char8_t/1.cc: New test cloned from
1295 char16_t/1.cc; validates explicit instantiation of
1296 basic_string_view<char8_t>.
1297 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1298 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1299 enabled.
1300
25694c85 13012019-02-19 Tom Honermann <tom@honermann.net>
1302
1303 P0482R5 char8_t: Standard library support
1304 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1305 typeinfo symbols for char8_t.
1306 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1307 (GLIBCXX_3.4.26): Add symbols for specializations of
1308 numeric_limits and codecvt that involve char8_t.
1309 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1310 * include/bits/atomic_base.h: Add atomic_char8_t.
1311 * include/bits/basic_string.h: Add std::hash<u8string> and
1312 operator""s(const char8_t*, size_t).
1313 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1314 __cpp_lib_char8_t.
1315 * include/bits/char_traits.h: Add char_traits<char8_t>.
1316 * include/bits/codecvt.h: Add
1317 codecvt<char16_t, char8_t, mbstate_t>,
1318 codecvt<char32_t, char8_t, mbstate_t>,
1319 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1320 codecvt_byname<char32_t, char8_t, mbstate_t>.
1321 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1322 recognize char8_t as an integral type.
1323 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1324 char8_t.
1325 (path::u8string): Return std::u8string when char8_t support is
1326 enabled.
1327 (path::generic_u8string): Likewise.
1328 (path::_S_convert): Handle conversion from char8_t input.
1329 (path::_S_str_convert): Likewise.
1330 * include/bits/functional_hash.h: Add hash<char8_t>.
1331 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
1332 char8_t.
1333 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
1334 for new char8_t specializations.
1335 * include/bits/localefwd.h: Add missing declarations of
1336 codecvt<char16_t, char, mbstate_t> and
1337 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
1338 codecvt<char16_t, char8_t, mbstate_t> and
1339 codecvt<char32_t, char8_t, mbstate_t>.
1340 * include/bits/postypes.h: Add u8streampos
1341 * include/bits/stringfwd.h: Add declarations of
1342 char_traits<char8_t> and u8string.
1343 * include/c_global/cstddef: Add __byte_operand<char8_t>.
1344 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1345 Recognize char8_t.
1346 (path::u8string): Return std::u8string when char8_t support is
1347 enabled.
1348 (path::generic_u8string): Likewise.
1349 (path::_S_convert): Handle conversion from char8_t input.
1350 (path::_S_str_convert): Likewise.
1351 * include/experimental/string: Add u8string.
1352 * include/experimental/string_view: Add u8string_view,
1353 hash<experimental::u8string_view>, and
1354 operator""sv(const char8_t*, size_t).
1355 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
1356 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
1357 as a character type.
1358 * include/std/limits: Add numeric_limits<char8_t>.
1359 * include/std/string_view: Add u8string_view,
1360 hash<experimental::u8string_view>, and
1361 operator""sv(const char8_t*, size_t).
1362 * include/std/type_traits: Add __is_integral_helper<char8_t>,
1363 __make_unsigned<char8_t>, and __make_signed<char8_t>.
1364 * libsupc++/atomic_lockfree_defines.h: Define
1365 ATOMIC_CHAR8_T_LOCK_FREE.
1366 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
1367 codecvt.cc and limits.cc so that char8_t specializations of
1368 numeric_limits and codecvt and emitted.
1369 * src/c++11/Makefile.in: Likewise.
1370 * src/c++11/codecvt.cc: Define members of
1371 codecvt<char16_t, char8_t, mbstate_t>,
1372 codecvt<char32_t, char8_t, mbstate_t>,
1373 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1374 codecvt_byname<char32_t, char8_t, mbstate_t>.
1375 * src/c++11/limits.cc: Define members of
1376 numeric_limits<char8_t>.
1377 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
1378 locale_init.cc and localename.cc.
1379 * src/c++98/Makefile.in: Likewise.
1380 * src/c++98/locale_init.cc: Add initialization for the
1381 codecvt<char16_t, char8_t, mbstate_t> and
1382 codecvt<char32_t, char8_t, mbstate_t> facets.
1383 * src/c++98/localename.cc: Likewise.
1384 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
1385
140615bb 13862019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
1387
1388 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
1389 * 27_io/filesystem/operations/resize_file.cc: Likewise.
1390 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
1391
c677a9d7 13922019-02-14 Jonathan Wakely <jwakely@redhat.com>
1393
1bbfe9f8 1394 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
1395 * doc/html/*: Regenerate.
1396
b24f00b1 1397 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
1398 * doc/html/*: Regenerate.
1399
a3d1baa9 1400 * doc/xml/manual/intro.xml: Document LWG 2586 status.
1401 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
1402 allocator type in is_constructible checks.
1403 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
1404 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
1405 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
1406 problematic type from LWG 2586 discussion.
1407 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
1408 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1409
99d130bf 1410 * configure.ac: Check for C11 timespec_get function.
1411 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
1412 (openbsd): Likewise
1413 * config.h.in: Regenerate.
1414 * configure: Regenerate.
1415 * include/c_global/ctime (timespec, timespec_get): Add to namespace
1416 std for C++17 and up.
1417
48772ec3 1418 * doc/xml/manual/intro.xml: Document LWG 2537 status.
1419 * include/bits/stl_queue.h
1420 (priority_queue(const Compare&, const Container&, const Alloc&))
1421 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
1422 make_heap.
1423 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
1424
ee32dd64 1425 * doc/xml/manual/intro.xml: Document LWG 2566 status.
1426 * include/bits/stl_queue.h (queue, priority_queue): Add static
1427 assertions to enforce LWG 2566 requirement on value_type.
1428 * include/bits/stl_stack.h (stack): Likewise.
1429
9724de38 1430 PR middle-end/89303
1431 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
1432
c677a9d7 1433 * doc/xml/manual/intro.xml: Document LWG 2735 status.
1434 * include/bits/std_abs.h: Add comment about LWG 2735.
1435 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
1436
4194f872 14372019-02-13 Jonathan Wakely <jwakely@redhat.com>
1438
1439 PR libstdc++/89345
1440 * include/std/version [__cpp_impl_destroying_delete]
1441 (__cpp_lib_destroying_delete): Only define for C++2a and later.
1442 * libsupc++/new [__cpp_impl_destroying_delete]
1443 (__cpp_lib_destroying_delete): Likewise.
1444 (destroying_delete_t, destroying_delete): Likewise, but define even
1445 when __cpp_impl_destroying_delete is not defined.
1446 * testsuite/18_support/destroying_delete.cc: New test.
1447
aaacaee2 14482019-02-11 Jonathan Wakely <jwakely@redhat.com>
1449
1450 PR libstdc++/89023
1451 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
1452 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
1453 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
1454 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
1455
5256b0dd 14562019-02-09 Jonathan Wakely <jwakely@redhat.com>
1457
1458 PR libstdc++/71044
1459 * include/bits/fs_path.h (path::has_root_name)
1460 (path::has_root_directory, path::has_root_path)
1461 (path::has_relative_path, path::has_parent_path)
1462 (path::has_filename, path::has_stem, path::has_extension)
1463 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
1464 noexcept.
1465 * src/c++17/fs_path.cc (path::has_root_name)
1466 (path::has_root_directory, path::has_root_path)
1467 (path::has_relative_path, path::has_parent_path)
1468 (path::has_filename, path::_M_find_extension): Add noexcept.
1469
e32f625e 14702019-02-06 Jonathan Wakely <jwakely@redhat.com>
1471
1472 PR libstdc++/89102 (partial)
1473 * include/std/type_traits (common_type<>): Define.
1474 (common_type<T>): Derive from common_type<T, T>.
1475 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1476 Test zero-length template argument list.
1477 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1478 Test additional single argument cases.
1479 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1480 Adjust expected error.
1481
b03489db 14822019-02-05 Jonathan Wakely <jwakely@redhat.com>
1483
e89e4fec 1484 PR libstdc++/89128
1485 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
1486 guides.
1487 * include/bits/stl_stack.h (stack): Likewise.
1488 * testsuite/23_containers/priority_queue/deduction.cc: New test.
1489 * testsuite/23_containers/queue/deduction.cc: New test.
1490 * testsuite/23_containers/stack/deduction.cc: New test.
1491
b640dd11 1492 PR libstdc++/89194
1493 * include/std/type_traits (__is_convertible_helper)
1494 (__is_convertible_helper<_From, _To, false>): Revert changes to
1495 support is_nothrow_convertible.
1496 (__is_nt_convertible_helper): New helper.
1497 (is_nothrow_convertible): Use __is_nt_convertible_helper.
1498
74c88c5f 1499 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
1500 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
1501
eca5e8d4 1502 PR libstdc++/89130
1503 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
1504 __is_alloc_insertable_impl. Replace single type member with two
1505 members, one for each of copy and move insertable.
1506 (__is_move_insertable): New trait for internal use.
1507 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
1508 (vector::_S_nothrow_relocate(true_type)): New functions to
1509 conditionally check if __relocate_a can throw.
1510 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
1511 on __is_move_insertable.
1512 (vector::_S_do_relocate): New overloaded functions to conditionally
1513 call __relocate_a.
1514 (vector::_S_relocate): New function that dispatches to _S_do_relocate
1515 based on _S_use_relocate.
1516 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1517 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
1518 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
1519
b03489db 1520 PR libstdc++/89090
1521 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
1522 parameter unnamed. Add message to static assertion.
1523 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1524 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
1525 in C++11 code.
1526
71625a15 15272019-02-05 Marc Glisse <marc.glisse@inria.fr>
1528
1529 PR libstdc++/87106
1530 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
1531 Rename...
1532 (__is_bitwise_relocatable): ... to this.
1533 (__relocate_a_1): Adapt.
1534 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
1535 (__is_bitwise_relocatable): ... to this.
1536
e7b22e58 15372019-01-30 Jonathan Wakely <jwakely@redhat.com>
1538
1539 PR libstdc++/89117
1540 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
1541 final component as well as from _M_pathname. Append the dot using
1542 operator+= instead of only to _M_pathname.
1543 (path::_M_find_extension): Reformat slightly.
1544 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1545 Add more test cases.
1546
dae923a7 15472019-01-30 Ulrich Drepper <drepper@redhat.com>
1548
1549 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
1550
710397ad 15512019-01-29 Jonathan Wakely <jwakely@redhat.com>
1552
5efc4356 1553 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
1554 constexpr specifiers from arg and proj.
1555
5f15e718 1556 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
1557 __shared_ptr instantiations used by gcc4-compatible ABI.
1558
307e86fc 1559 * include/experimental/forward_list (experimental::erase): Qualify
1560 call to erase_if.
1561 * include/experimental/list (experimental::erase): Likewise.
1562 * include/std/forward_list (std::erase): Likewise.
1563 * include/std/list (std::erase): Likewise.
1564
38129d1a 1565 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
1566 C++2a.
1567 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
1568 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
1569 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
1570 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
1571 * testsuite/ext/array_allocator/26875.cc: Likewise.
1572 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
1573 * testsuite/util/replacement_memory_operators.h: Likewise.
1574 * testsuite/util/testsuite_allocator.h: Likewise.
1575
710397ad 1576 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
1577 normal mode vector, even for debug mode.
1578 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
1579 Define alias template for normal mode vector.
1580
70f71249 15812019-01-28 Jonathan Wakely <jwakely@redhat.com>
1582
1583 PR libstdc++/68737
1584 * config/locale/generic/c_locale.h (__convert_from_v)
1585 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1586 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1587 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
1588 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1589
f1074115 15902019-01-24 Jonathan Wakely <jwakely@redhat.com>
1591
4bc4fd90 1592 PR libstdc++/88840
1593 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
1594 data member with static member function _S_use_relocate().
1595 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1596 (vector::_M_default_append): Use _S_use_relocate() instead of
1597 __use_relocate.
1598
f1074115 1599 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
1600 sign of results.
1601
1c4657a3 16022019-01-22 Jonathan Wakely <jwakely@redhat.com>
1603
1604 PR libstdc++/88740
1605 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
1606 write to stderr instead of using printf.
1607
dafe8c59 16082019-01-21 Jakub Jelinek <jakub@redhat.com>
1609
1610 PR libstdc++/86590
1611 * include/bits/char_traits.h (__constant_string_p,
1612 __constant_char_array_p): Use __builtin_is_constant_evaluated if
1613 available.
1614
eaf966f3 16152019-01-20 Ulrich Drepper <drepper@redhat.com>
1616
1617 Implement C++20 P0600r1.
1618 * include/backward/hash_map: Add nodiscard attribute to empty.
1619 * include/backward/hash_set: Likewise.
1620 * backward/hashtable.h: Likewise.
1621 * include/bits/basic_string.h: Likewise.
1622 * include/bits/forward_list.h: Likewise.
1623 * include/bits/hashtable.h: Likewise.
1624 * include/bits/regex.h: Likewise.
1625 * include/bits/stl_deque.h: Likewise.
1626 * include/bits/stl_list.h: Likewise.
1627 * include/bits/stl_map.h: Likewise.
1628 * include/bits/stl_multimap.h: Likewise.
1629 * include/bits/stl_multiset.h: Likewise.
1630 * include/bits/stl_queue.h: Likewise.
1631 * include/bits/stl_set.h: Likewise.
1632 * include/bits/stl_stack.h: Likewise.
1633 * include/bits/stl_tree.h: Likewise.
1634 * include/bits/stl_vector.h: Likewise.
1635 * include/bits/unordered_map.h: Likewise.
1636 * include/bits/unordered_set.h: Likewise.
1637 * include/debug/array: Likewise.
1638 * include/experimental/any: Likewise.
1639 * include/experimental/bits/fs_path.h: Likewise.
1640 * include/experimental/internet: Likewise.
1641 * include/experimental/string_view: Likewise.
1642 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
1643 Likewise.
1644 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
1645 Likewise.
1646 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
1647 Likewise.
1648 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
1649 Likewise.
1650 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
1651 Likewise.
1652 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
1653 Likewise.
1654 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
1655 Likewise.
1656 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
1657 Likewise.
1658 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1659 info_fn_imps.hpp: Likewise.
1660 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1661 left_child_next_sibling_heap_.hpp: Likewise.
1662 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
1663 Likewise.
1664 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
1665 Likewise.
1666 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
1667 Likewise.
1668 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
1669 Likewise.
1670 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
1671 Likewise.
1672 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
1673 Likewise.
1674 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
1675 Likewise.
1676 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
1677 * include/ext/pb_ds/trie_policy.hpp: Likewise.
1678 * include/ext/rope: Likewise.
1679 * include/ext/slist: Likewise.
1680 * include/ext/vstring.h: Likewise.
1681 * include/profile/array: Likewise.
1682 * include/std/array: Likewise.
1683 * include/tr1/array: Likewise.
1684 * include/tr1/hashtable.h: Likewise.
1685 * include/tr1/regex: Likewise.
1686 * include/tr2/dynamic_bitset: Likewise.
1687 * include/bits/alloc_traits.h: Add nodiscard attribute to
1688 allocate.
1689 * include/experimental/memory_resource: Likewise.
1690 * include/ext/alloc_traits.h: Likewise.
1691 * include/ext/array_allocator.h: Likewise.
1692 * include/ext/bitmap_allocator.h: Likewise.
1693 * include/ext/debug_allocator.h: Likewise.
1694 * include/ext/extptr_allocator.h: Likewise.
1695 * include/ext/mt_allocator.h: Likewise.
1696 * include/ext/new_allocator.h: Likewise.
1697 * include/ext/pool_allocator.h: Likewise.
1698 * include/ext/throw_allocator.h: Likewise.
1699 * include/std/scoped_allocator: Likewise.
1700 * libsupc++/eh_alloc.cc: Likewise.
1701 * include/std/future: Add nodiscard attribute to async.
1702 * libsupc++/new: Add nodiscard attribute to new.
1703
3c1c2a8c 17042019-01-18 Jonathan Wakely <jwakely@redhat.com>
1705
1706 PR libstdc++/87514
1707 PR libstdc++/87520
1708 PR libstdc++/88782
1709 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
1710 * include/bits/shared_ptr.h
1711 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
1712 (allocate_shared): Change to use new tag type.
1713 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
1714 Declare new member function.
1715 (_Sp_alloc_shared_tag): Define new type.
1716 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
1717 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
1718 _Sp_make_shared_tag::_S_eq to check type_info.
1719 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
1720 Constrain to prevent being called with _Sp_alloc_shared_tag.
1721 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
1722 Replace constructor with ...
1723 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
1724 reference parameter so address of the new object can be returned to
1725 the caller. Obtain the allocator from the tag type.
1726 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
1727 constructor with ...
1728 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
1729 to the __shared_count constructor.
1730 (__allocate_shared): Change to use new tag type.
1731 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
1732
21a962b2 17332019-01-17 Jonathan Wakely <jwakely@redhat.com>
1734
464ac146 1735 * src/c++17/fs_ops.cc
1736 (equivalent(const path&, const path&, error_code&))
1737 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
1738 compare files instead of relying on incomplete info returned by stat.
1739
2987a93d 1740 PR libstdc++/88884
1741 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
1742 if the path is already absolute.
1743 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
1744 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
1745
21a962b2 1746 PR libstdc++/88881
1747 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
1748 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
1749 of filesystem::exists.
1750 (create_directories(const path&, error_code&)): Add assertions.
1751 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1752 Add workaround for bug in _wstat for paths with trailing slash.
1753 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
1754 for expected behaviour on mingw.
1755 * testsuite/experimental/filesystem/operations/create_directories.cc:
1756 Likewise.
1757 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
1758 "TMP" instead of "TMPDIR" and clean environment before each test. Do
1759 not test permissions on mingw targets.
1760
93478c9f 17612019-01-16 Jonathan Wakely <jwakely@redhat.com>
1762
1763 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
1764 constructors and open members taking wide strings. Fix patterns for
1765 filesystem::path members to match wstring_view parameters. Add
1766 exports for shared_ptr members used by directory iterators.
1767 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
1768 error code parameter if the file doesn't exist.
1769 * src/filesystem/ops.cc (remove(const path&, error_code&)):
1770 Likewise.
1771 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
1772 values for mingw targets, where "/" is not an absolute path. Do not
1773 test symlinks on mingw targets.
1774 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1775 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
1776 on mingw targets.
1777 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1778 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
1779 that each component of the path is created.
1780 * testsuite/experimental/filesystem/operations/create_directories.cc:
1781 Likewise.
1782 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
1783 permissions on mingw targets.
1784 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1785 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1786 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1787 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
1788 mingw targets.
1789 * testsuite/experimental/filesystem/operations/permissions.cc:
1790 Likewise.
1791 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
1792 symlinks or permissions on mingw targets.
1793 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1794 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
1795 symlinks on mingw targets.
1796 * testsuite/experimental/filesystem/operations/remove_all.cc:
1797 Likewise.
1798 * testsuite/27_io/filesystem/operations/status.cc: Do not test
1799 permissions on mingw targets.
1800 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
1801 test symlinks on mingw targets.
1802 * testsuite/experimental/filesystem/operations/space.cc: Fix test
1803 for mingw targets.
1804
af93b844 18052019-02-14 Ulrich Drepper <drepper@redhat.com>
1806
1807 PR libstdc++/88738
1808 Warn about unused comparisons of shared_ptr/unique_ptr
1809 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
1810 * include/bits/shared_ptr.h: Use it for operator ==, !=,
1811 <, <=, >, >= for shared_ptr.
1812 * include/bits/unique_ptr.h: Likewise for unique_ptr.
1813
8793c0de 18142019-01-15 Jonathan Wakely <jwakely@redhat.com>
1815
afa61572 1816 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
1817 as 201611L, because P0497R0 changes are supported.
1818 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
1819
feb89906 1820 * include/bits/erase_if.h [__cplusplus > 201703L]
1821 (__cpp_lib_erase_if): Only define for C++2a.
1822 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1823 (__cpp_lib_null_iterators): Define.
1824 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1825 (__cpp_lib_null_iterators): Define.
1826 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
1827
d253bcb1 1828 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
1829 status.
1830 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
1831 Define.
1832 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
1833 changes are supported.
1834 * include/std/optional (__cpp_lib_optional): Likewise.
1835 * include/std/variant (__cpp_lib_variant): Likewise.
1836 * include/std/version [!__STRICT_ANSI__]
1837 (__cpp_lib_uncaught_exceptions): Define as long integer.
1838 [__cplusplus >= 201703L] (__cpp_lib_any)
1839 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
1840 (__cpp_lib_variant): Define for C++17.
1841 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
1842 as long integer.
1843 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
1844 integer.
1845
8793c0de 1846 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
1847
a8cd4b2b 18482019-01-12 Jonathan Wakely <jwakely@redhat.com>
1849
1850 PR libstdc++/88811
1851 PR libstdc++/83306
1852 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
1853 before second path.
1854 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
1855 test.
1856
a5b1332c 18572019-01-11 Jonathan Wakely <jwakely@redhat.com>
1858
656ac8b7 1859 * doc/xml/manual/intro.xml: Include new section.
1860 * doc/xml/manual/status_cxx2017.xml: Document more
1861 implementation-defined properties of the library.
1862 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
1863 * doc/html/*: Regenerate.
1864
f5480b8c 1865 * include/bits/refwrap.h [__cplusplus > 201703L]
1866 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
1867 (_Reference_wrapper_base_memfun): Do not define for C++2a.
1868 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
1869 for C++2a.
1870 (reference_wrapper::operator()): Add static assertion.
1871 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
1872
36496c4d 1873 * include/std/chrono (duration_values::zero(), duration_values::min())
1874 (duration_values::max()): Add noexcept.
1875 (duration::zero(), duration::min(), duration::max()): Likewise.
1876 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
1877 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
1878 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
1879
a5b1332c 1880 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
1881
d9de68bc 18822019-01-11 Jakub Jelinek <jakub@redhat.com>
1883
1884 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
1885 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
1886
beb370cb 18872019-01-11 Jonathan Wakely <jwakely@redhat.com>
1888
1d628fd4 1889 PR libstdc++/88802
1890 * include/bits/functional_hash.h (hash<nullptr_t>): Define
1891 specialization for C++17 (P0513R0, LWG 2817).
1892 * testsuite/20_util/hash/nullptr.cc: New test.
1893
a18b3766 1894 PR libstdc++/88125
1895 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
1896 pattern for std::basic_stringbuf::str().
1897
beb370cb 1898 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
1899 basic_ostream::operator<< patterns.
1900
cbbb35ec 19012019-01-10 Jonathan Wakely <jwakely@redhat.com>
1902
1715824b 1903 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
1904 test failures on targets with 32-bit time_t.
1905
f5529091 1906 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
1907 * include/std/deque: Likewise.
1908 * include/std/forward_list: Likewise.
1909 * include/std/list: Likewise.
1910 * include/std/string: Likewise.
1911 * include/std/vector: Likewise.
1912 * include/std/version: Likewise.
1913 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
1914 * testsuite/23_containers/deque/erasure.cc: Likewise.
1915 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
1916 * testsuite/23_containers/list/erasure.cc: Likewise.
1917 * testsuite/23_containers/map/erasure.cc: Likewise.
1918 * testsuite/23_containers/set/erasure.cc: Likewise.
1919 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1920 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
1921 * testsuite/23_containers/vector/erasure.cc: Likewise.
1922
cbbb35ec 1923 * include/experimental/internet [AI_NUMERICSERV]
1924 (resolver_base::numeric_service): Define conditionally.
1925 * testsuite/experimental/net/internet/resolver/base.cc: Test it
1926 conditionally.
1927 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1928 Likewise.
1929
ac9a8436 19302019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1931 Jonathan Wakely <jwakely@redhat.com>
1932
1933 Implement LWG 2221
1934 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
1935 (GLIBCXX_3.4.26): Add new exports.
1936 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
1937 correct list of sources.
1938 * include/Makefile.in: Regenerate.
1939 * include/std/ostream (operator<<(nullptr_t)): New member function.
1940 * src/c++17/ostream-inst.cc: New file.
1941 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
1942 test.
1943
5f027941 19442019-01-10 Jonathan Wakely <jwakely@redhat.com>
1945
1946 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
1947 of the source file containing the caller.
1948 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
1949 directories created by test.
1950 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1951 Likewise.
1952 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1953 Likewise.
1954 * testsuite/experimental/filesystem/iterators/
1955 recursive_directory_iterator.cc: Likewise.
1956
3273d2e6 19572019-01-10 Jakub Jelinek <jakub@redhat.com>
1958
1959 PR tree-optimization/88775
1960 * include/bits/stl_function.h (greater<_Tp*>::operator(),
1961 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
1962 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
1963 instead of __builtin_constant_p if available. Don't bother with
1964 the pointer comparison in C++11 and earlier.
1965
f4d3c071 19662019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1967
1968 PR other/16615
1969
1970 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
1971 with "cannot".
1972
8eba10af 19732019-01-09 Jonathan Wakely <jwakely@redhat.com>
1974
6a6ade9f 1975 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
1976 for filesystem::path. Give variables more distinctive names.
1977
41cda271 1978 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
1979 member function to perform non-trivial assignment.
1980 (_Optional_payload_base::_M_move_assign): Likewise.
1981 (_Optional_payload<T, true, false, true>::operator=)
1982 (_Optional_payload<T, true, true, false>::operator=)
1983 (_Optional_payload<T, true, false, false>::operator=): Call
1984 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
1985
8eba10af 1986 PR libstdc++/88204
1987 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
1988 test std::complex<long double> if long double format is IBM128.
1989 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
1990 Likewise.
1991
64a50f48 19922019-01-08 Jonathan Wakely <jwakely@redhat.com>
1993
73f3ad16 1994 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
1995 for old std::unique_ptr layout.
1996 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
1997 to become valueless. Add filesystem::path tests.
1998
58e897da 1999 PR libstdc++/87855
2000 * include/std/optional (_Optional_payload_base): New class template
2001 for common code hoisted from _Optional_payload specializations. Use
2002 a template for the union, to allow a partial specialization for
2003 types with non-trivial destructors. Add constructors for in-place
2004 initialization to the union.
2005 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2006 to perform non-trivial copy construction, instead of relying on
2007 non-standard copy elision in a delegating constructor.
2008 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2009 non-trivial move construction.
2010 (_Optional_payload): Derive from _Optional_payload_base and use it
2011 for everything except the non-trivial assignment operators, which are
2012 defined as needed.
2013 (_Optional_payload<false, C, M>): Derive from the specialization
2014 _Optional_payload<true, false, false> and add a destructor.
2015 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2016 Forward to corresponding members of _Optional_payload.
2017 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2018 Hoist common members from _Optional_base.
2019 (_Optional_base): Make all members and base class public.
2020 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2021 _Optional_base_impl.
2022 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2023 support for new std::optional layout.
2024 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2025
64a50f48 2026 PR libstdc++/88066
2027 * include/bits/locale_conv.h: Use <> for includes not "".
2028 * include/ext/random: Likewise.
2029 * include/ext/vstring.h: Likewise.
2030
95b40931 20312019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2032
2033 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2034 (GLIBCXX_3.4.21): Likewise.
2035
fa00ec77 20362019-01-08 Jonathan Wakely <jwakely@redhat.com>
2037
2038 PR libstdc++/88749
2039 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2040 to match the one that controls whether utimbuf and utime are declared.
2041
3f304b2d 20422019-01-07 Jonathan Wakely <jwakely@redhat.com>
2043
fc6ac813 2044 PR libstdc++/87787
2045 * include/bits/char_traits.h (char_traits::move): Do not pass null
2046 pointers to memmove.
2047 * include/bits/locale_facets.h
2048 (ctype<char>::widen(const char*, const char*, char*)): Do not
2049 pass null pointers to memcpy.
2050 (ctype<char>::narrow(const char*, const char*, char, char*)):
2051 Likewise.
2052 (ctype<char>::do_widen(const char*, const char*, char*)):
2053 Likewise.
2054 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2055 Likewise.
2056
bbc66c45 2057 * doc/xml/manual/spine.xml: Update copyright years.
2058 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2059 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2060 for C++17 filesystem library.
2061 * doc/html/*: Regenerate.
2062
3f304b2d 2063 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2064 * config.h.in: Regenerate.
2065 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2066 alphabetically and add missing entries for copy_symlink,
2067 hard_link_count, rename, and resize_file.
2068 * configure: Regenerate.
2069 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2070 used unconditionally.
2071 * src/filesystem/ops-common.h (__gnu_posix::truncate)
2072 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2073 supports truncating to zero length.
2074 * testsuite/27_io/filesystem/operations/all.cc: New test.
2075 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2076
0ebb0980 20772019-01-06 Jonathan Wakely <jwakely@redhat.com>
2078
3935f409 2079 PR libstdc++/86756
2080 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2081 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2082 * config.h.in: Regenerate.
2083 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2084 remaining std::filesystem types and functions.
2085 * configure: Regenerate.
2086 * src/c++17/Makefile.am: Add C++17 filesystem sources.
2087 * src/c++17/Makefile.in: Regenerate.
2088 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2089 here, and change name of included file.
2090 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2091 here, and change name of included file.
2092 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2093 path to dir-common.h.
2094 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2095 path to ops-common.h. Disable -Wunused-parameter warnings.
2096 (internal_file_clock): Define unconditionally.
2097 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2098 define.
2099 (do_copy_file, do_space): Move definitions to ops.common.h.
2100 (copy, file_size, hard_link_count, last_write_time, space): Only
2101 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2102 report an error.
2103 (last_write_time, read_symlink): Remove unused attributes from
2104 parameters.
2105 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2106 * src/filesystem/Makefile.in: Regenerate.
2107 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2108 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2109 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2110 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2111 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2112 dummy types and functions instead of using #error.
2113 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2114 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2115 in terms of stat.
2116 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2117 (do_copy_file, do_space): Move definitions here from std-ops.cc.
2118 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2119 to account for new namespace.
2120 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2121 -lstdc++fs from dg-options.
2122 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2123 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2124 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2125 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2126 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2127 Likewise.
2128 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2129 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2130 Likewise.
2131 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2132 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2133 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2134 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2135 * testsuite/27_io/filesystem/operations/create_directories.cc:
2136 Likewise.
2137 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2138 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2139 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2140 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2141 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2142 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2143 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2144 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2145 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2146 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2147 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2148 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2149 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2150 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2151 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2152 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2153 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2154 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2155 Likewise.
2156 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2157
2158
c6e37a9f 2159 PR libstdc++/86756
2160 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2161 typeinfo and vtables less greedy.
2162 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2163 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2164 * src/c++17/Makefile.in: Regenerate.
2165 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2166 here, and change name of included file.
2167 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2168 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2169 from sources.
2170 * src/filesystem/Makefile.in: Regenerate.
2171 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2172 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2173 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2174 from dg-options and remove dg-require-filesystem-ts.
2175 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2176 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2177 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2178 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2179 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2180 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2181 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2182 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2183 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2184 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2185 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2186 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2187 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2188 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2189 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2190 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2191 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2192 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2193 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2194 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2195 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2196 Likewise.
2197 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2198 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2199 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2200 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2201 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2202 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2203 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2204 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2205 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2206 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2207 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2208 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2209 Likewise.
2210 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2211 Likewise.
2212 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2213 Likewise.
2214 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2215 Likewise.
2216 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2217 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2218 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2219 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2220 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2221 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2222 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2223 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2224 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2225 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2226 Likewise.
2227 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2228 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2229 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2230 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2231 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2232
8815ac91 2233 PR libstdc++/87431
2234 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2235 Check is_trivially_copyable instead of is_scalar.
2236 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2237 contained value can throw and its type is trivially copyable then
2238 construct into a temporary variant and move from it, to provide the
2239 strong exception safety guarantee.
2240 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2241 Likewise.
2242 * testsuite/20_util/variant/87431.cc: New test.
2243 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2244 conversion causes valueless state.
2245
0ebb0980 2246 PR libstdc++/88607
2247 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2248 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2249 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2250 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2251 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2252
adc6beee 22532019-01-05 Jonathan Wakely <jwakely@redhat.com>
2254
2255 * include/bits/fs_fwd.h (__file_clock): Define new clock.
2256 (file_time_type): Redefine in terms of __file_clock.
2257 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2258 overflow.
2259 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2260 internal linkage.
2261 (internal_file_lock): New helper type for accessing __file_clock.
2262 (do_copy_file): Use internal_file_lock to convert system time to
2263 file_time_type.
2264 (last_write_time(const path&, error_code&)): Likewise.
2265 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2266
6b4a77f2 22672019-01-04 Jonathan Wakely <jwakely@redhat.com>
2268
98185b9f 2269 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2270 for const member functions of std::basic_string.
2271 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
2272 in C++17.
2273 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
2274 Make non-standard constructor private.
2275 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2276 Likewise.
2277 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2278 explicit instantiations for C++17 as well as earlier dialects.
2279 * src/c++17/Makefile.am: Add new source files.
2280 * src/c++17/Makefile.in: Regenerate.
2281 * src/c++17/cow-string-inst.cc: New file defining explicit
2282 instantiations for basic_string member functions added in C++17.
2283 * src/c++17/string-inst.cc: Likewise.
2284
859e6fed 2285 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2286 copy/move constructors for old std::basic_string.
2287 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2288 (basic_string::reference, basic_string::const_reference): Define
2289 as plain references for C++11 and later.
2290 (basic_string::basic_string()): Put constructor body outside
2291 preprocessor conditional groups.
2292 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2293 instead of copying it.
2294 (basic_string::basic_string(const basic_string&, const _Alloc&)):
2295 Define.
2296 (basic_string::basic_string(basic_string&&, const _Alloc&)):
2297 Define.
2298 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2299 cases for old basic_string.
2300 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2301 allocator-extended constructors unconditionally. Add extra members to
2302 allocator type when using old string ABI.
2303 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2304 for old string ABI.
2305 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2306
e13f6a7f 2307 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2308 -fno-inline added to test flags.
2309
a18fccd0 2310 * testsuite/21_strings/basic_string/requirements/
2311 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2312
7f77ca07 2313 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2314 assertion failures with old std::string ABI.
2315
9346fb0e 2316 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2317 with ...
2318 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2319 functions that will only erase elements at the end.
2320 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2321 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2322 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2323 of erase(p, end()).
2324 (path::_List::pop_back()): Define.
2325 (path::_List::_M_erase_from(const_iterator)): Define.
2326 (path::operator/=(const path&)): Use pop_back to remove last component
2327 and _M_erase_from to remove multiple components.
2328 (path::_M_append(basic_string_view<value_type>)): Likewise.
2329 (path::operator+=(const path&)): Likewise.
2330 (path::_M_concat(basic_string_view<value_type>)): Likewise.
2331 (path::remove_filename()): Likewise.
2332 (path::lexically_normal()): Use _List::_Impl iterators instead of
2333 path::iterator. Use pop_back to remove components from the end. Clear
2334 trailing filename, instead of using erase(const_iterator) to remove
2335 a non-final component.
2336 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
2337 additional cases.
2338 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
2339
24230cab 2340 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
2341 incorrect treatment of empty filename after trailing slash.
2342 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
2343
6b4a77f2 2344 * testsuite/21_strings/basic_string/modifiers/assign/char/
2345 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
2346 to test flags.
2347 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2348 move_assign_optim.cc: Likewise.
2349
02df5941 23502019-01-03 Jonathan Wakely <jwakely@redhat.com>
2351 Jakub Jelinek <jakub@redhat.com>
2352
2353 PR libstdc++/88607
2354 * include/experimental/memory: Replace UTF-8 quote characters.
2355 * include/std/future: Replace UTF-8 "em dash" characters.
2356
f8ad40d8 23572019-01-03 Jonathan Wakely <jwakely@redhat.com>
2358
9013258b 2359 PR libstdc++/88607
2360 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
2361 * include/debug/forward_list: Likewise.
2362 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
2363 character.
2364 * include/experimental/chrono: Likewise.
2365 * include/experimental/functional: Likewise.
2366 * include/experimental/ratio: Likewise.
2367 * include/experimental/system_error: Likewise.
2368 * include/experimental/tuple: Likewise.
2369 * include/experimental/type_traits: Likewise.
2370 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
2371 * include/parallel/multiseq_selection.h: Likewise.
2372
f8ad40d8 2373 PR libstdc++/88681
2374 * config/abi/pre/gnu.ver: Add missing exports.
2375 * testsuite/22_locale/collate_byname/88681.cc: New test.
2376 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
2377 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2378
138292f4 23792019-01-02 Jonathan Wakely <jwakely@redhat.com>
2380
553d41a8 2381 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
2382 initializer_list<value_type> and from input iterator ranges.
2383 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2384
138292f4 2385 * testsuite/experimental/string_view/element_access/char/empty.cc:
2386 Fix year range in copyright header.
2387
963c0125 23882019-01-02 Joel Brobecker <brobecker@adacore.com>
2389
2390 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2391 Fix year range in copyright header.
2392
fbd26352 23932019-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 2394
2395 Update copyright years.
fb96fbb3 2396\f
fbd26352 2397Copyright (C) 2019 Free Software Foundation, Inc.
fb96fbb3 2398
2399Copying and distribution of this file, with or without modification,
2400are permitted in any medium without royalty provided the copyright
2401notice and this notice are preserved.