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