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