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