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