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