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