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