1 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
4 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
8 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
9 overflow warning with -Wpedantic -Wsystem-headers.
11 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
14 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
15 * include/bits/move.h (swap): Remove extra parentheses.
17 * include/experimental/bits/lfts_config.h: Improve doc markup.
18 * include/experimental/optional: Improve docs.
19 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
20 (__constexpr_addressof): Remove.
21 (optional::operator->()): Use std::__addressof().
22 * include/std/optional (optional::operator->()): Adjust whitespace.
23 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
24 that operator-> is still constexpr with overloaded operator&. Change
26 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
29 * include/bits/shared_ptr.h: Improve docs.
30 * include/bits/shared_ptr_atomic.h: Likewise.
31 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
33 * include/bits/basic_string.h: Fix iterator/index confusion in
35 * include/bits/range_access.h: Fix Doxygen warnings.
36 * include/bits/refwrap.h: Do not document implementation details.
37 (ref, cref): Group docs with reference_wrapper.
38 * include/std/fstream: Fix Doxygen markup.
39 * libsupc++/initializer_list (begin, end): Group docs with
42 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
44 * include/bits/unique_lock.h: Fix/improve doxygen markup.
45 * include/std/mutex: Likewise.
46 * include/std/shared_mutex: Likewise.
48 * include/bits/fs_dir.h: Fix/improve doxygen markup.
49 * include/bits/fs_fwd.h: Likewise.
50 * include/bits/fs_ops.h: Likewise.
51 * include/bits/fs_path.h: Likewise.
52 * include/std/filesystem: Likewise.
54 * include/experimental/bits/net.h: Fix/improve doxygen markup.
55 * include/experimental/buffer: Likewise.
56 * include/experimental/executor: Likewise.
57 * include/experimental/internet: Likewise.
58 * include/experimental/io_context: Likewise.
59 * include/experimental/net: Likewise.
60 * include/experimental/netfwd: Likewise.
61 * include/experimental/socket: Likewise.
62 * include/experimental/timer: Likewise.
64 * doc/doxygen/doxygroups.cc: Move description of experimental group
66 * include/experimental/algorithm: Add to libfund-ts doc group.
67 * include/experimental/any: Likewise. Do not document implementation
69 * include/experimental/array: Add to libfund-ts doc group.
70 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
71 for Library Fundamentals.
72 * include/experimental/chrono: Add to libfund-ts doc group.
73 * include/experimental/deque: Likewise.
74 * include/experimental/forward_list: Likewise.
75 * include/experimental/functional: Likewise.
76 * include/experimental/iterator: Likewise.
77 * include/experimental/list: Likewise.
78 * include/experimental/map: Likewise.
79 * include/experimental/memory: Likewise.
80 * include/experimental/memory_resource: Likewise. Improve docs.
82 * include/experimental/numeric: Add to libfund-ts doc group.
83 * include/experimental/optional: Likewise.
84 * include/experimental/propagate_const: Likewise.
85 * include/experimental/random: Likewise.
86 * include/experimental/ratio: Likewise.
87 * include/experimental/regex: Likewise.
88 * include/experimental/set: Likewise.
89 * include/experimental/source_location: Likewise.
90 * include/experimental/string: Likewise.
91 * include/experimental/string_view: Likewise.
92 * include/experimental/system_error: Likewise.
93 * include/experimental/tuple: Likewise.
94 * include/experimental/type_traits: Likewise.
95 * include/experimental/unordered_map: Likewise.
96 * include/experimental/unordered_set: Likewise.
97 * include/experimental/utility: Likewise.
98 * include/experimental/vector: Likewise.
99 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
100 * testsuite/experimental/array/neg.cc: Adjust dg-error.
101 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
103 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
104 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
105 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
106 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
107 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
109 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
110 * include/experimental/bits/fs_fwd.h: Improve docs.
111 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
112 * include/experimental/bits/fs_path.h: Likewise.
113 (path, filesystem_error, u8path): Improve docs.
114 * include/experimental/filesystem: Link to docs for TS.
116 * config/allocator/new_allocator_base.h (__allocator_base): Add
117 workaround for Doxygen bug #6945.
118 * include/std/memory: Improve docs. Define group for pointer safety.
119 * include/std/scoped_allocator: Improve docs. Use "undocumented"
120 conditional to suppress documentation for implementation details.
122 * include/bits/specfun.h: Improve docs.
123 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
126 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
127 (std::experimental): Add docs.
128 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
129 namespace to nothing when generating docs.
130 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
131 * include/std/chrono (std::chrono): Likewise.
132 * include/std/functional (std::placeholders): Likewise.
133 * include/std/thread (std::this_thread): Likewise.
135 * include/parallel/settings.h: Fix Doxygen markup.
137 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
138 anything unless PB_DS_CLASS_C_DEC is defined.
139 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
140 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
141 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
142 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
143 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
144 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
145 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
147 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
148 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
149 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
150 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
151 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
152 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
153 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
154 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
155 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
156 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
157 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
159 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
160 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
162 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
165 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
166 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
167 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
170 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
172 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
173 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
174 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
175 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
176 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
177 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
179 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
180 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
183 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
186 * include/std/complex (__complex_proj): Return parameter unchanged.
187 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
188 floating-point types to take std::complex arguments.
189 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
190 floating-point types.
191 * testsuite/26_numerics/complex/proj.cc: New test.
193 2019-04-30 Jakub Jelinek <jakub@redhat.com>
195 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
196 to _Lock_policyE[012].
197 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
199 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
201 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
202 macros accidentally left in.
203 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
204 unnecessary -lstdc++fs option. Fix test for mingw.
205 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
208 2019-04-30 Jakub Jelinek <jakub@redhat.com>
210 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
212 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
214 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
216 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
217 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
220 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
222 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
225 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
226 class template and partial specialization.
229 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
231 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
232 functions to convert a value to an integral type.
233 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
234 (fill_n): Convert _Size parameter to an integral type.
235 * testsuite/25_algorithms/fill_n/87982.cc: New test.
236 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
237 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
238 * testsuite/25_algorithms/generate_n/87982.cc: New test.
239 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
240 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
242 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
244 Adding noexcept-specification on tuple constructors (LWG 2899)
245 * libstdc++-v3/include/std/tuple:
246 (tuple()): Add noexcept-specification.
247 (tuple(const _Elements&...)): Likewise
248 (tuple(_UElements&&...)): Likewise
249 (tuple(const tuple<_UElements...>&)): Likewise
250 (tuple(tuple<_UElements...>&&)): Likewise
251 (tuple(const _T1&, const _T2&)): Likewise
252 (tuple(_U1&&, _U2&&)): Likewise
253 (tuple(const tuple<_U1, _U2>&): Likewise
254 (tuple(tuple<_U1, _U2>&&): Likewise
255 (tuple(const pair<_U1, _U2>&): Likewise
256 (tuple(pair<_U1, _U2>&&): Likewise
257 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
259 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
262 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
263 arguments with __restrict.
265 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
267 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
269 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
271 * include/experimental/bits/fs_path.h
272 (path::_S_convert_loc<_InputIterator>): Create const std::string to
273 avoid redundant call to _S_convert_loc with non-const pointers.
275 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
276 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
277 * testsuite/21_strings/basic_string/hash/hash.cc
278 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
279 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
280 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
282 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
283 wstring::_M_replace_dispatch with more specific patterns.
284 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
285 Create const std::string to avoid redundant call to _S_convert_loc
286 with non-const pointers.
287 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
288 avoid unnecessary basic_string::assign instantiations.
290 * include/std/memory (__uses_alloc_args): Add string-literal to
291 static_assert, to match the one in __uses_alloc.
292 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
293 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
294 for recursive uses-allocator construction of nested pairs.
295 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
298 2019-04-26 Jakub Jelinek <jakub@redhat.com>
300 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
301 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
302 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
303 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
305 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
306 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
307 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
308 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
309 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
310 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
311 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
313 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
316 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
317 * include/std/scoped_allocator [__cplusplus > 201703L]
318 (scoped_allocator_adaptor::construct): Define in terms of
319 uses_allocator_construction_args, as per P0591R4.
320 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
321 * testsuite/util/testsuite_allocator.h: Remove name of unused
324 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
326 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
327 * doc/html/*: Regenerate.
329 * include/bits/fs_path.h (operator<, operator<=, operator>)
330 (operator>=, operator==, operator!=): Make hidden friends, as per
332 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
334 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
336 * include/std/any (any::any(ValueType&&)): Use __and_v.
337 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
340 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
342 * include/std/type_traits (__result_of_memfun): Use remove_reference
343 instead of __remove_cvref_t and remove redundant is_same check.
344 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
346 * include/experimental/string_view (basic_string_view::pointer)
347 (basic_string_view::reference): Fix to refer to non-const value_type.
348 * include/bits/basic_string.h (basic_string): Use __sv_check and
349 __sv_limit instead of basic_string_view::_M_check and
350 basic_string_view::_M_limit.
351 * include/std/string_view (__sv_check, __sv_limit): New
352 helper functions to replace basic_string_view::_M_check and
353 basic_string_view::_M_limit.
354 (basic_string_view): Add static assertions to enforce ill-formed
355 requirement for traits_type::char_type from P1148R0, and to enforce
356 required properties of char-like types.
357 (basic_string_view::pointer, basic_string_view::reference): Fix to
358 refer to non-const value_type.
359 (basic_string_view::operator[], basic_string_view::at)
360 (basic_string_view::front, basic_string_view::back)
361 (basic_string_view::data): Use const_reference and const_pointer
362 typedefs for return types.
363 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
364 (hash<wstring_view>): Fix argument_type typedef.
365 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
366 char/1.cc: Fix expected return type of basic_string_view::data().
367 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
368 wchar_t/1.cc: Likewise.
369 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
371 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
372 wchar_t/1.cc: Likewise.
373 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
375 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
376 Check reference and pointer typedefs.
377 * testsuite/experimental/string_view/requirements/typedefs.cc:
379 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
380 Fix expected return type of basic_string_view::data().
381 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
383 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
385 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
389 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
390 Avoid a runtime check for types that can never be stored in std::any.
391 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
394 PR libstdc++/90220 (partial)
395 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
396 not attempt ill-formed static_cast to pointers to non-object types.
397 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
400 * testsuite/20_util/variant/run.cc: Catch exception by reference to
401 prevent -Wcatch-value warning.
403 * include/std/variant (__variant_construct): Use template parameter
404 type instead of equivalent decltype-specifier.
405 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
406 Replace forward with move.
407 (_Move_ctor_base<false, Types...>::_M_destructive_move)
408 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
409 (_Move_ctor_base<true, Types...>::_M_destructive_move)
410 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
411 index after construction succeeds.
412 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
413 if-constexpr checks that are always true. Use __remove_cvref_t instead
414 of remove_reference so that is_nothrow_move_constructible check
415 doesn't use a const rvalue parameter. In the potentially-throwing case
416 construct a temporary and move assign it, as per LWG 2904.
417 (_Move_assign_base<false, Types...>::operator=): Remove redundant
418 if-constexpr checks that are always true. Use emplace as per LWG 2904.
419 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
420 construct a temporary and move assign from it, as per LWG 2904.
421 * testsuite/20_util/variant/exception_safety.cc: Check that
422 assignment operators have strong exception safety guarantee.
424 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
426 Document PSTL linker flags
428 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
430 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
432 * include/std/variant (__detail::__variant::_Traits): Make
433 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
434 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
436 (__detail::__variant::_Copy_assign_alias): Only depend on
437 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
438 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
439 move assignment operators.
442 * include/std/variant (variant::__not_self): New helper for the
443 is_same_v<remove_cvref_t<T>, variant>==false constraints.
444 (variant::__to_type_impl): Remove.
445 (variant::__to_type): Add default argument to check pack size, instead
446 of using __to_type_impl.
447 (variant::__accepted_type): Add default argument using __not_self.
448 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
449 for variant(T&&) constructor constraint.
450 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
451 Extract __accepted_type into a named template parameter for reuse in
452 other constraints and in the exception specification.
453 (variant::variant(in_place_type_t<T>, Args&&...))
454 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
455 (variant::variant(in_place_index_t<T>, Args&&...))
456 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
457 (variant::operator=T&&)): Remove redundant && from trait arguments.
458 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
459 isn't used for in_place_type or in_place_index arguments.
461 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
462 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
463 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
465 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
466 Bernd Edlinger <bernd.edlinger@hotmail.de>
467 Jakub Jelinek <jakub@redhat.com>
470 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
471 general-regs-only target attribute for ARM.
473 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
476 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
477 specialization also depend on is_nothrow_move_constructible.
478 * include/std/variant (__detail::__variant::__never_valueless()):
479 Only true if the variant would have a move assignment operator.
480 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
481 Check __never_valueless<T...>().
482 (variant::emplace): Only perform non-throwing move assignments
483 for never-valueless alternatives if the variant has a move assignment
485 * testsuite/20_util/variant/compile.cc: Check that never-valueless
486 types can be emplaced into non-assignable variants.
487 * testsuite/20_util/variant/run.cc: Check that never-valueless types
488 don't get copied when emplaced into non-assignable variants.
490 * include/std/variant (__detail::__variant::__ref_cast): Remove
492 (__detail::__variant::_Uninitialized::_M_get)
493 (__detail::__variant::__get)
494 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
496 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
498 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
500 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
501 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
502 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
503 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
505 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
507 Delegate PSTL configuration to pstl/pstl_config.h
509 * include/bits/c++config: Remove explicit PSTL configuration
510 macros and use definitions from <pstl/pstl_config.h>.
512 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
514 Cleanup algorithm implementations
515 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
517 (mismatch): Forward execution policy.
518 (equal): Qualify call to std::equal().
519 (partial_sort): Forward execution policy.
520 (inplace_merge): Forward execution policy.
522 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
524 Improve implementation of parallel equal()
525 * include/pstl/algorithm_impl.h
526 (__internal::__brick_equal): use "4 iterator" version of
528 (__internal::__brick_equal): use simd for random access
529 iterators on unsequenced execution policies.
530 (__internal::__pattern_equal): add "4 iterator" version
531 (__internal::__pattern_equal): dispatch to simd __brick_equal
532 for vector-only execution policies.
533 (__internal::__pattern_equal): dispatch to __parallel_or for
534 parallel execution policies.
535 * include/pstl/glue_algorithm_impl.h
536 (std::equal): dispatch to "4 iterator" version of
537 __internal::__pattern_equal().
539 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
542 * include/bits/forward_list.h (operator==): Do not use operator!= to
544 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
545 earlier in the list, so that sort is stable.
546 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
547 * testsuite/23_containers/forward_list/comparable.cc: Test with
548 types that meet the minimum EqualityComparable and LessThanComparable
549 requirements. Remove irrelevant comment.
551 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
552 Do not depend on whether all alternative types are move constructible.
553 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
554 from the operand when deciding whether to perform the assignment.
555 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
556 with deleted move constructor and deleted move assignment operator.
557 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
558 behaviour of variants with DeletedMoves as an alternative.
559 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
560 (move_ctor, move_assign): Check that moving a variant with a
561 DeletedMoves alternative falls back to copying instead of moving.
563 * testsuite/20_util/variant/compile.cc: Remove empty string literals
564 from static_assert declarations.
566 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
567 actually match its name.
568 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
569 (test_swap()): Fix result for MoveCtorOnly and check
572 * include/std/optional (optional::value_or(U&&) &&): Add missing
574 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
575 for disengaged optionals and rvalue optionals.
576 * testsuite/20_util/optional/observers/4.cc: Likewise.
578 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
580 * include/pstl/algorithm_impl.h: Uglify identfiers.
581 * include/pstl/numeric_impl.h: Uglify identfiers.
582 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
584 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
586 * include/bits/c++config:
587 Add definition for __PSTL_ASSERT.
588 Add definition for __PSTL_ASSERT_MSG.
589 * include/pstl/algorithm_impl.h: Replace use of assert().
590 * include/pstl/numeric_impl.h: Replace use of assert().
591 * include/pstl/parallel_backend_tbb.h:
592 Replace use of assert().
593 Replace use of __TBB_ASSERT().
594 * include/pstl/parallel_backend_utils.h: Replace use of assert().
596 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
599 * src/c++17/memory_resource.cc
600 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
601 needed to allow placing a _Chunk at the end of the buffer.
602 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
604 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
606 * doc/xml/faq.xml: Add information about emergency EH pool.
607 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
608 Move outdated information on mt_allocator to a separate section.
609 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
610 doesn't affect the default allocator.
612 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
616 * testsuite/20_util/variant/89851.cc: New test.
618 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
620 * include/std/variant: Adjust whitespace. Add comments.
621 (_Multi_array): Leave primary template undefined.
622 (_Multi_array<_Tp>): Define partial specialization for base case of
624 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
625 which is always a reference.
626 (__gen_vtable::_S_apply()): Remove function, inline body into
627 default member initializer.
628 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
630 * include/std/variant (__variant_idx_cookie): Add member type.
631 (__visitor_result_type): Remove.
632 (__do_visit): Use invoke_result instead of __visitor_result_type.
633 * testsuite/20_util/variant/visit.cc: New test.
636 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
638 * testsuite/20_util/variant/90008.cc: New test.
640 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
642 * include/pstl/algorithm_impl.h: Add namespace qualification.
643 * include/pstl/execution_defs.h: Add namespace qualification.
644 * include/pstl/execution_impl.h: Add namespace qualification.
645 * include/pstl/numeric_impl.h: Add namespace qualification.
646 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
647 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
648 * include/pstl/parallel_backend_utils.h: Include <cassert>.
650 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
652 Fix visit<R> for variant.
653 * include/std/variant (__do_visit): Add a template parameter
654 for enforcing same return types for visit.
655 (__gen_vtable_impl): Likewise.
656 (_S_apply_single_alt): Adjust.
657 (__visit_invoke_impl): New. Handle casting to void.
658 (__do_visit_invoke): New. Enforces same return types.
659 (__do_visit_invoke_r): New. Converts return types.
660 (__visit_invoke): Adjust.
661 (__gen_vtable): Add a template parameter for enforcing
662 same return types for visit.
663 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
664 different return types.
665 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
666 visitors with different return types don't accidentally
667 compile with regular visitation.
669 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
671 * testsuite/27_io/filesystem/iterators/caching.cc: Add
672 dg-require-filesystem-ts.
674 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
676 * doc/xml/manual/status_cxx2020.xml: Update status.
677 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
678 * testsuite/20_util/variant/visit_r.cc: New test.
680 * include/bits/fs_dir.h (directory_iterator::operator*)
681 (directory_iterator::operator->): Add noexcept.
682 (operator==, operator!=): Replace namespace-scope equality operators
683 for directory iterators with hidden friends.
686 * config/abi/pre/gnu.ver: Add missing exports.
687 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
690 * config/abi/pre/gnu.ver: Export new symbols.
691 * include/bits/fs_dir.h (recursive_directory_iterator::options())
692 (recursive_directory_iterator::recursion_pending())
693 (recursive_directory_iterator::disable_recursion_pending()): Remove
694 inline definitions. Make noexcept.
695 (recursive_directory_iterator::depth())
696 (recursive_directory_iterator::operator*())
697 (recursive_directory_iterator::operator->()): Make noexcept.
698 (recursive_directory_iterator::_M_options)
699 (recursive_directory_iterator::_M_pending): Remove data members.
700 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
701 (recursive_directory_iterator::recursive_directory_iterator): Remove
702 ctor-initializer. Use new constructor for _Dir_stack.
703 (recursive_directory_iterator::options())
704 (recursive_directory_iterator::recursion_pending())
705 (recursive_directory_iterator::disable_recursion_pending()): Add
706 non-inline definitions.
707 (recursive_directory_iterator::depth()): Make noexcept.
708 (recursive_directory_iterator::increment(error_code&))
709 (recursive_directory_iterator::pop(error_code&)): Adjust to new
710 location of options and recursion_pending members.
711 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
712 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
713 user-declared move constructor and assignment operator, to make the
716 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
717 d_type == DT_UNKNOWN immediately.
718 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
720 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
722 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
724 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
725 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
728 PR libstdc++/87431 (again)
729 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
730 Define partial specialization for basic_string.
731 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
732 shared_ptr and weak_ptr.
733 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
735 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
737 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
739 * include/debug/vector (_Never_valueless_alt): Likewise for debug
741 * include/std/any (_Never_valueless_alt): Define explicit
742 specialization for any.
743 * include/std/variant (_Never_valueless_alt): Define primary template.
744 (__never_valueless): Use _Never_valueless_alt instead of
745 is_trivially_copyable.
746 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
747 initializations to avoid try-catch overhead. Add special case for
748 scalars produced by potentially-throwing conversions. Use
749 _Never_valueless_alt instead of is_trivially_copyable for the
750 remaining strong exception-safety cases.
751 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
752 * testsuite/20_util/variant/87431.cc: Run both test functions.
753 * testsuite/20_util/variant/exception_safety.cc: New test.
754 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
755 so the variant becomes valueless.
757 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
760 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
762 (variant::emplace<_Tp>): Return result of emplace<N> directly.
764 * include/std/string (__hash_string_base): New class template defining
765 operator() for hashing strings.
766 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
767 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
768 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
769 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
771 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
773 Use single-visitation in variant assignment and swap and relops.
774 Also use indices instead of types when checking whether
775 variants hold the same thing.
776 * include/std/variant (__do_visit): Add a template parameter
777 for index visitation, invoke with indices if index visitation
779 (__variant_idx_cookie): New.
780 (__visit_with_index): Likewise.
781 (_Copy_assign_base::operator=): Do single-visitation with
783 (_Move_assign_base::operator=): Likewise.
784 (_Extra_visit_slot_needed): Adjust.
785 (__visit_invoke): Call with indices if it's an index visitor.
786 (relops): Do single-visitation with an index visitor.
788 (__visitor_result_type): New.
790 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
792 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
794 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
796 Don't revisit a variant we are already visiting.
797 * include/std/variant (__variant_construct_single): New.
798 (__variant_construct): Use it.
799 (_M_destructive_move): Likewise.
800 (_M_destructive_copy): Likewise.
801 (_Copy_assign_base::operator=): Adjust.
802 (_Move_assign_base::operator=): Likewise.
805 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
808 * include/bits/hashtable.h (_Hashtable): Move static assertions to
809 destructor so they are not evaluated until the _Key type is complete.
810 * include/bits/stl_tree.h (_Rb_tree): Likewise.
811 * testsuite/23_containers/set/85965.cc: New test.
812 * testsuite/23_containers/unordered_set/85965.cc: New test.
813 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
814 with regexp matching the corresponding _Rb_tree specialization.
815 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
816 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
817 * testsuite/23_containers/set/48101_neg.cc: Likewise.
818 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
819 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
820 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
821 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
823 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
826 Fix based on a suggestion by Antony Polukhin.
827 * include/std/variant (__never_valueless): New.
829 (_Extra_visit_slot_needed): New.
830 (_Multi_array): Use it.
831 (_S_apply_all_alts): Likewise.
833 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
836 Fix based on a suggestion by Antony Polukhin.
837 * include/std/variant (__gen_vtable): Don't reserve an
838 additional table slot, _Multi_array already does that.
840 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
843 Fix based on a suggestion by Antony Polukhin.
844 * include/std/variant (__variant_construct): Capture a pointer
845 to the storage and visit just one variant.
847 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
849 * doc/xml/manual/backwards_compatibility.xml: Remove link to
850 Doxygen-generated pages with unstable URL.
851 * doc/xml/manual/concurrency_extensions.xml: Likewise.
852 * doc/xml/manual/extensions.xml: Likewise.
853 * doc/xml/manual/parallel_mode.xml: Likewise.
854 * doc/xml/manual/support.xml: Likewise.
856 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
857 avoid -Wconversion warnings.
859 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
861 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
862 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
863 (allstamped): Add stamp-pstl.
864 (install-headers): Add ptsl_builddir.
865 * include/Makefile.in: Regenerate.
866 * include/bits/c++config: Add pstl configuration.
867 * include/pstl/LICENSE.txt: New file.
868 * include/pstl/algorithm_fwd.h: New file.
869 * include/pstl/algorithm_impl.h: New file.
870 * include/pstl/execution_defs.h: New file.
871 * include/pstl/execution_impl.h: New file.
872 * include/pstl/glue_algorithm_defs.h: New file.
873 * include/pstl/glue_algorithm_impl.h: New file.
874 * include/pstl/glue_execution_defs.h: New file.
875 * include/pstl/glue_memory_defs.h: New file.
876 * include/pstl/glue_memory_impl.h: New file.
877 * include/pstl/glue_numeric_defs.h: New file.
878 * include/pstl/glue_numeric_impl.h: New file.
879 * include/pstl/memory_impl.h: New file.
880 * include/pstl/numeric_fwd.h: New file.
881 * include/pstl/numeric_impl.h: New file.
882 * include/pstl/parallel_backend.h: New file.
883 * include/pstl/parallel_backend_tbb.h: New file.
884 * include/pstl/parallel_backend_utils.h: New file.
885 * include/pstl/parallel_impl.h: New file.
886 * include/pstl/pstl_config.h: New file.
887 * include/pstl/unseq_backend_simd.h: New file.
888 * include/pstl/utils.h: New file.
889 * include/std/algorithm: Include parallel algorithm implementations.
890 * include/std/execution: New file.
891 * include/std/memory: Include parallel algorithm implementations.
892 * include/std/numeric: Include parallel algorithm implementations.
893 * include/std/version: Add parallel algorithms feature test macro.
894 * testsuite/util/pstl/pstl_test_config.h: New file.
895 * testsuite/util/pstl/test_utils.h: New file.
896 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
897 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
898 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
899 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
900 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
901 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
902 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
903 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
904 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
905 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
906 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
907 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
908 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
909 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
910 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
911 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
912 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
913 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
914 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
915 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
916 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
917 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
918 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
919 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
920 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
921 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
922 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
923 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
924 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
925 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
926 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
927 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
928 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
929 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
930 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
931 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
932 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
933 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
934 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
935 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
936 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
937 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
938 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
939 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
940 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
941 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
942 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
943 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
944 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
945 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
946 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
947 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
948 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
949 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
950 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
951 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
952 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
953 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
954 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
955 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
956 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
957 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
958 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
959 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
960 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
961 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
962 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
963 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
964 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
965 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
966 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
967 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
968 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
969 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
970 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
971 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
972 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
973 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
974 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
975 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
976 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
977 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
978 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
979 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
980 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
981 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
982 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
983 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
984 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
985 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
986 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
987 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
988 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
989 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
990 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
991 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
992 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
993 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
994 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
995 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
996 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
997 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
998 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
999 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1000 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1001 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1003 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
1005 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1006 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1007 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1008 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1009 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1010 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1011 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1012 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1013 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1014 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1015 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1016 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1017 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1018 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1019 when the special functions IS is enabled, not for C++17.
1020 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1022 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1023 without checks for special functions in C++17.
1024 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1028 * include/backward/hash_map: Use <> for includes not "".
1029 * include/backward/hash_set: Likewise.
1030 * include/backward/strstream: Likewise.
1031 * include/tr1/bessel_function.tcc: Likewise.
1032 * include/tr1/exp_integral.tcc: Likewise.
1033 * include/tr1/legendre_function.tcc: Likewise.
1034 * include/tr1/modified_bessel_func.tcc: Likewise.
1035 * include/tr1/riemann_zeta.tcc: Likewise.
1037 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
1039 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1040 of extension allocators.
1041 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1042 Document new headers in 7.2, 8.1 and 9.1 releases.
1043 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1044 * doc/html/*: Regenerate.
1046 2019-03-12 John David Anglin <dave.anglin@bell.net>
1049 * testsuite/lib/libstdc++.exp: Locate libatomic.
1050 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1051 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1053 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1054 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1055 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1056 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1058 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1061 * configure.ac: Check for sockatmark.
1062 * crossconfig.m4: Check for sockatmark.
1063 * config.h.in: Regenerate.
1064 * configure: Regenerate.
1065 * include/experimental/internet (address_v4::_S_hton): Rename
1066 overloaded functions to _S_hton_16 and _S_ntoh_16.
1067 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1068 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1069 * include/experimental/socket (basic_socket::at_mark): Check
1070 _GLIBCXX_HAVE_SOCKATMARK.
1072 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1073 const variables instead of macros.
1076 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1077 Use correct type for len_aligned.
1078 * testsuite/20_util/hash/89629.cc: New test.
1080 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1083 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1084 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1085 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1086 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1087 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1088 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1089 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1090 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1091 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1092 memory_order_seq_cst to int.
1094 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1096 * doc/xml/manual/using.xml: Use link element instead of xref.
1097 * doc/html/*: Regenerate.
1099 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1101 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1104 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1105 parameters in deduction guides.
1106 * include/debug/multimap.h (multimap): Likewise.
1107 * include/debug/set.h (multimap): Likewise.
1108 * include/debug/multiset.h (multimap): Likewise.
1109 * include/debug/unordered_map (unordered_map): Likewise.
1110 (unordered_multimap): Likewise.
1111 * include/debug/unordered_set (unordered_set): Likewise.
1112 (unordered_multiset): Likewise.
1115 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1116 Invalidate all iterators in case of rehash.
1117 (unordered_multimap<>::_M_check_rehashed): Likewise.
1118 * include/debug/unordered_set
1119 (unordered_set<>::_M_check_rehashed): Likewise.
1120 (unordered_multiset<>::_M_check_rehashed): Likewise.
1121 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1123 2019-03-07 Andreas Schwab <schwab@suse.de>
1125 * config/abi/post/riscv64-linux-gnu: New directory.
1126 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1128 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1130 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1131 compile test to run. Fix typo.
1133 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1134 * doc/html/*: Regenerate.
1136 P0356R5 Simplified partial function application
1137 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1138 helpers for bind_front.
1139 (bind_front, __cpp_lib_bind_front): Define.
1140 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1142 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1144 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1145 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1146 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1147 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1149 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1151 PR libstdc++/86655 - std::assoc_legendre should not constrain
1152 the value of m (or x).
1153 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1154 __sph_legendre): If degree > order Don't throw, return 0.
1155 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1156 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1157 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1158 * testsuite/tr1/5_numerical_facilities/special_functions/
1159 02_assoc_legendre/pr86655.cc: New test.
1160 * testsuite/tr1/5_numerical_facilities/special_functions/
1161 22_sph_legendre/pr86655.cc: New test.
1163 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1166 Also PR libstdc++/85517
1167 * include/std/variant (__do_visit): New.
1168 (__variant_cast): Likewise.
1169 (__variant_cookie): Likewise.
1170 (__erased_*): Remove.
1171 (_Variant_storage::_S_vtable): Likewise.
1172 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1173 (_Variant_storage::__M_reset): Adjust.
1174 (__variant_construct): New.
1175 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1176 __variant_construct.
1177 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1178 (_Move_ctor_base::__M_destructive_copy): New.
1179 (_Move_ctor_base::__M_destructive_move): Adjust to use
1180 __variant_construct.
1181 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1182 (_Copy_assign_alias): Adjust to check both copy assignment
1183 and copy construction for triviality.
1184 (_Move_assign_base::operator=): Adjust to use __do_visit.
1185 (_Multi_array): Add support for visitors that accept and return
1187 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1188 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1189 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1190 a __variant_cookie temporary for a variant that is valueless and..
1191 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1192 (__gen_vtable::_Array_type): Conditionally make space for
1193 the __variant_cookie visitor case.
1194 (__variant_construct_by_index): New.
1195 (get_if): Adjust to use std::addressof.
1196 (relops): Adjust to use __do_visit.
1197 (variant): Add __variant_cast and __variant_construct_by_index
1199 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1200 instead of self-destruction.
1201 (variant::swap): Adjust to use __do_visit.
1202 (visit): Reimplement in terms of __do_visit.
1203 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1204 * testsuite/20_util/variant/compile.cc: Adjust.
1205 * testsuite/20_util/variant/run.cc: Likewise.
1207 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1209 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1211 * testsuite/experimental/feat-char8_t.cc: Likewise.
1213 * include/std/type_traits [C++20] (is_bounded_array)
1214 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1216 * testsuite/20_util/is_bounded_array/requirements/
1217 explicit_instantiation.cc: New test.
1218 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1220 * testsuite/20_util/is_bounded_array/value.cc: New test.
1221 * testsuite/20_util/is_unbounded_array/requirements/
1222 explicit_instantiation.cc: New test.
1223 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1225 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1227 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1229 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1231 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
1233 * include/c_compatibility/math.h [C++20] (lerp): Add using
1235 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1236 (__lerp): Define function template to implement lerp.
1237 (lerp(float, float, float), lerp(double, double, double))
1238 (lerp(long double, long double, long double)): Define for C++20.
1239 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1240 (midpoint(T, T), midpoint(T*, T*)): Define.
1241 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1242 * testsuite/26_numerics/lerp.cc: New test.
1243 * testsuite/26_numerics/midpoint/floating.cc: New test.
1244 * testsuite/26_numerics/midpoint/integral.cc: New test.
1245 * testsuite/26_numerics/midpoint/pointer.cc: New test.
1247 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1249 PR libstdc++/88996 Implement P0439R0
1250 Make std::memory_order a scoped enumeration.
1251 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
1252 add variables for the old enumerators. Adjust calls.
1253 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
1254 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
1256 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
1258 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1261 * include/std/memory_resource (polymorphic_allocator): Add default
1262 template argument for C++20.
1263 (polymorphic_allocator::allocate_bytes)
1264 (polymorphic_allocator::deallocate_bytes)
1265 (polymorphic_allocator::allocate_object)
1266 (polymorphic_allocator::deallocate_object)
1267 (polymorphic_allocator::new_object)
1268 (polymorphic_allocator::delete_object): New member functions for
1270 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1273 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
1276 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
1279 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
1281 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
1282 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
1284 * include/std/memory (uses_allocator_construction_args): New set of
1285 overloaded functions.
1286 (make_obj_using_allocator, uninitialized_construct_using_allocator):
1288 * include/std/memory_resource (polymorphic_allocator::construct)
1289 [__cplusplus > 201703l]: Replace all overloads with a single function
1290 using uses_allocator_construction_args.
1291 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1293 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1295 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
1298 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1299 stylesheet directories before check for xsltproc. Try to use
1300 xmlcatalog to find local stylesheet directory before trying hardcoded
1301 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1302 check to look for the same stylesheet as doc/Makefile.am uses. Don't
1303 use xsltproc if xmlcatalog fails to find a local stylesheet.
1304 * configure.ac: Check for xmlcatalog.
1305 * Makefile.in: Regenerate.
1306 * configure: Likewise.
1307 * doc/Makefile.in: Likewise.
1308 * include/Makefile.in: Likewise.
1309 * libsupc++/Makefile.in: Likewise.
1310 * po/Makefile.in: Likewise.
1311 * python/Makefile.in: Likewise.
1312 * src/Makefile.in: Likewise.
1313 * src/c++11/Makefile.in: Likewise.
1314 * src/c++17/Makefile.in: Likewise.
1315 * src/c++98/Makefile.in: Likewise.
1316 * src/filesystem/Makefile.in: Likewise.
1317 * testsuite/Makefile.in: Likewise.
1319 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
1322 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1323 container deduction guides.
1324 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1325 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1326 parameters in deduction guides.
1327 * include/bits/stl_multimap.h (multimap): Likewise.
1328 * include/bits/stl_multiset.h (multiset): Likewise.
1329 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1330 * include/bits/stl_set.h (set): Likewise.
1331 * include/bits/stl_stack.h (stack): Likewise.
1332 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1333 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1334 constrain parameters in deduction guides.
1335 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1337 * testsuite/23_containers/map/cons/deduction.cc: Test additional
1339 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1340 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1341 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1342 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1344 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1346 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1349 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1350 to class template and partial specialization using void_t.
1351 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1353 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
1356 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1357 copy and move members public.
1359 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
1361 * include/std/type_traits (__underlying_type_impl): New helper to
1362 make underlying_type SFINAE-friendly.
1363 (underlying_type): Derive from __underlying_type_impl.
1364 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1368 * include/bits/char_traits.h (__constant_char_array): Check index is
1369 in range before dereferencing.
1370 (char_traits<char>::compare, char_traits<char>::find)
1371 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1372 immediately if n is zero.
1373 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1374 Remove workarounds for PR 67026.
1375 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1377 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1380 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1382 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1383 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1385 2019-02-22 Jakub Jelinek <jakub@redhat.com>
1388 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1389 type to std::size_t and argument to type to long double.
1391 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1393 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1394 * config/abi/post/sparc64-linux-gnu: New directory.
1395 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1396 * config/abi/post/sparc64-linux-gnu/32: New directory.
1397 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1399 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1401 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1402 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1405 2019-02-22 Tom Honermann <tom@honermann.net>
1407 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1408 printers for u8string and u8string_view.
1410 2019-02-22 Tom Honermann <tom@honermann.net>
1412 * testsuite/18_support/byte/ops.cc: Validate
1413 std::to_integer<char8_t>, std::to_integer<char16_t>, and
1414 std::to_integer<char32_t>.
1415 * testsuite/18_support/numeric_limits/dr559.cc: Validate
1416 std::numeric_limits<char8_t>.
1417 * testsuite/18_support/numeric_limits/lowest.cc: Validate
1418 std::numeric_limits<char8_t>::lowest().
1419 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1420 std::numeric_limits<char8_t>::max_digits10.
1421 * testsuite/18_support/type_info/fundamental.cc: Validate
1422 typeinfo for char8_t.
1423 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1424 std::from_chars with char8_t.
1425 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1426 Validate explicit instantiation of std::hash<char8_t>.
1427 * testsuite/20_util/is_integral/value.cc: Validate
1428 std::is_integral<char8_t>.
1429 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1430 Validate std::make_signed<char8_t>.
1431 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1432 Validate u8string construction from char8_t sources.
1433 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1435 * testsuite/21_strings/basic_string_view/operations/compare/
1436 char/70483.cc: Validate substr operations on u8string_view.
1437 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1438 the u8string_view typedef is defined.
1439 * testsuite/21_strings/char_traits/requirements/
1440 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1442 * testsuite/21_strings/char_traits/requirements/
1443 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1444 constexpr member functions.
1445 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1446 that the u8string typedef is defined.
1447 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1448 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1449 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1450 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1452 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1453 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1455 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1456 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1457 Validate std::atomic<char8_t>::is_always_lock_free
1458 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1459 Update line numbers.
1460 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1462 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1464 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1465 Validate std::experimental::pmr::u8string.
1466 * testsuite/experimental/string_view/typedefs.cc: Validate that the
1467 u8string_view typedef is defined.
1468 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1469 char32_t to the typelists.
1471 2019-02-22 Tom Honermann <tom@honermann.net>
1473 * include/ext/typelist.h: Constrain a partial specialization of
1474 typelist::detail::append_ to only match chain<T1,T2>.
1476 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1479 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1480 class template with class. Replace move and copy member types with
1481 member alias templates, so they are only instantiated when needed.
1482 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1483 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1484 test for C++11/14/17 as well.
1485 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1488 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1491 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1492 _GLIBCXX_PURE to the alias declaration.
1494 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
1496 * testsuite/21_strings/basic_string/literals/types.cc
1497 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1498 * testsuite/21_strings/basic_string/literals/values.cc
1499 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1500 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1501 potentially having different type.
1502 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1503 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1505 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1506 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1507 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1508 string literals only using basic character set.
1509 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1510 u8 literals to char.
1511 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1512 Test ATOMIC_CHAR8_T_LOCK_FREE.
1513 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1514 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1515 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1516 * testsuite/experimental/string_view/literals/types.cc
1517 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1519 * testsuite/experimental/string_view/literals/values.cc
1520 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1522 2019-02-19 Tom Honermann <tom@honermann.net>
1524 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1525 from char16_32_t.cc; validates numeric_limits<char8_t>.
1526 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1527 test cloned from types.cc; validates operator""s for char8_t
1529 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1530 test cloned from values.cc; validates construction and comparison
1532 * testsuite/21_strings/basic_string/requirements/
1533 /explicit_instantiation/char8_t/1.cc: New test cloned from
1534 char16_t/1.cc; validates explicit instantiation of
1535 basic_string<char8_t>.
1536 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1537 New test cloned from types.cc; validates operator""sv for char8_t
1538 returns u8string_view.
1539 * testsuite/21_strings/basic_string_view/literals/
1540 values-char8_t.cc: New test cloned from values.cc; validates
1541 construction and comparison of u8string_view values.
1542 * testsuite/21_strings/basic_string_view/requirements/
1543 explicit_instantiation/char8_t/1.cc: New test cloned from
1544 char16_t/1.cc; validates explicit instantiation of
1545 basic_string_view<char8_t>.
1546 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1547 New test cloned from char16_t/65049.cc; validates that
1548 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1549 * testsuite/21_strings/char_traits/requirements/char8_t/
1550 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1551 that char_traits<char8_t> member typedefs are present and correct.
1552 * testsuite/21_strings/char_traits/requirements/
1553 explicit_instantiation/char8_t/1.cc: New test cloned from
1554 char16_t/1.cc; validates explicit instantiation of
1555 char_traits<char8_t>.
1556 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1557 from char16_t.cc: validates
1558 codecvt<char16_t, char8_t, mbstate_t>.
1559 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
1560 from char32_t.cc: validates
1561 codecvt<char32_t, char8_t, mbstate_t>.
1562 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1563 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1564 codecvt<char32_t, char8_t, std::mbstate_t>.
1565 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1566 test cloned from string.cc; validates filesystem::path construction
1568 * testsuite/experimental/feat-char8_t.cc: New test; validates that
1569 the __cpp_lib_char8_t feature test macro is defined with the
1571 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1572 New test cloned from string.cc; validates filesystem::path
1573 construction from char8_t input.
1574 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1575 test cloned from types.cc; validates operator""sv for char8_t
1576 returns u8string_view.
1577 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1578 New test cloned from values.cc; validates construction and
1579 comparison of u8string_view values.
1580 * testsuite/experimental/string_view/requirements/
1581 explicit_instantiation/char8_t/1.cc: New test cloned from
1582 char16_t/1.cc; validates explicit instantiation of
1583 basic_string_view<char8_t>.
1584 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1585 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1588 2019-02-19 Tom Honermann <tom@honermann.net>
1590 P0482R5 char8_t: Standard library support
1591 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1592 typeinfo symbols for char8_t.
1593 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1594 (GLIBCXX_3.4.26): Add symbols for specializations of
1595 numeric_limits and codecvt that involve char8_t.
1596 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1597 * include/bits/atomic_base.h: Add atomic_char8_t.
1598 * include/bits/basic_string.h: Add std::hash<u8string> and
1599 operator""s(const char8_t*, size_t).
1600 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1602 * include/bits/char_traits.h: Add char_traits<char8_t>.
1603 * include/bits/codecvt.h: Add
1604 codecvt<char16_t, char8_t, mbstate_t>,
1605 codecvt<char32_t, char8_t, mbstate_t>,
1606 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1607 codecvt_byname<char32_t, char8_t, mbstate_t>.
1608 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1609 recognize char8_t as an integral type.
1610 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1612 (path::u8string): Return std::u8string when char8_t support is
1614 (path::generic_u8string): Likewise.
1615 (path::_S_convert): Handle conversion from char8_t input.
1616 (path::_S_str_convert): Likewise.
1617 * include/bits/functional_hash.h: Add hash<char8_t>.
1618 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
1620 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
1621 for new char8_t specializations.
1622 * include/bits/localefwd.h: Add missing declarations of
1623 codecvt<char16_t, char, mbstate_t> and
1624 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
1625 codecvt<char16_t, char8_t, mbstate_t> and
1626 codecvt<char32_t, char8_t, mbstate_t>.
1627 * include/bits/postypes.h: Add u8streampos
1628 * include/bits/stringfwd.h: Add declarations of
1629 char_traits<char8_t> and u8string.
1630 * include/c_global/cstddef: Add __byte_operand<char8_t>.
1631 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1633 (path::u8string): Return std::u8string when char8_t support is
1635 (path::generic_u8string): Likewise.
1636 (path::_S_convert): Handle conversion from char8_t input.
1637 (path::_S_str_convert): Likewise.
1638 * include/experimental/string: Add u8string.
1639 * include/experimental/string_view: Add u8string_view,
1640 hash<experimental::u8string_view>, and
1641 operator""sv(const char8_t*, size_t).
1642 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
1643 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
1644 as a character type.
1645 * include/std/limits: Add numeric_limits<char8_t>.
1646 * include/std/string_view: Add u8string_view,
1647 hash<experimental::u8string_view>, and
1648 operator""sv(const char8_t*, size_t).
1649 * include/std/type_traits: Add __is_integral_helper<char8_t>,
1650 __make_unsigned<char8_t>, and __make_signed<char8_t>.
1651 * libsupc++/atomic_lockfree_defines.h: Define
1652 ATOMIC_CHAR8_T_LOCK_FREE.
1653 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
1654 codecvt.cc and limits.cc so that char8_t specializations of
1655 numeric_limits and codecvt and emitted.
1656 * src/c++11/Makefile.in: Likewise.
1657 * src/c++11/codecvt.cc: Define members of
1658 codecvt<char16_t, char8_t, mbstate_t>,
1659 codecvt<char32_t, char8_t, mbstate_t>,
1660 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1661 codecvt_byname<char32_t, char8_t, mbstate_t>.
1662 * src/c++11/limits.cc: Define members of
1663 numeric_limits<char8_t>.
1664 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
1665 locale_init.cc and localename.cc.
1666 * src/c++98/Makefile.in: Likewise.
1667 * src/c++98/locale_init.cc: Add initialization for the
1668 codecvt<char16_t, char8_t, mbstate_t> and
1669 codecvt<char32_t, char8_t, mbstate_t> facets.
1670 * src/c++98/localename.cc: Likewise.
1671 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
1673 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
1675 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
1676 * 27_io/filesystem/operations/resize_file.cc: Likewise.
1677 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
1679 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
1681 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
1682 * doc/html/*: Regenerate.
1684 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
1685 * doc/html/*: Regenerate.
1687 * doc/xml/manual/intro.xml: Document LWG 2586 status.
1688 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
1689 allocator type in is_constructible checks.
1690 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
1691 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
1692 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
1693 problematic type from LWG 2586 discussion.
1694 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
1695 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1697 * configure.ac: Check for C11 timespec_get function.
1698 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
1700 * config.h.in: Regenerate.
1701 * configure: Regenerate.
1702 * include/c_global/ctime (timespec, timespec_get): Add to namespace
1703 std for C++17 and up.
1705 * doc/xml/manual/intro.xml: Document LWG 2537 status.
1706 * include/bits/stl_queue.h
1707 (priority_queue(const Compare&, const Container&, const Alloc&))
1708 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
1710 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
1712 * doc/xml/manual/intro.xml: Document LWG 2566 status.
1713 * include/bits/stl_queue.h (queue, priority_queue): Add static
1714 assertions to enforce LWG 2566 requirement on value_type.
1715 * include/bits/stl_stack.h (stack): Likewise.
1718 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
1720 * doc/xml/manual/intro.xml: Document LWG 2735 status.
1721 * include/bits/std_abs.h: Add comment about LWG 2735.
1722 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
1724 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
1727 * include/std/version [__cpp_impl_destroying_delete]
1728 (__cpp_lib_destroying_delete): Only define for C++2a and later.
1729 * libsupc++/new [__cpp_impl_destroying_delete]
1730 (__cpp_lib_destroying_delete): Likewise.
1731 (destroying_delete_t, destroying_delete): Likewise, but define even
1732 when __cpp_impl_destroying_delete is not defined.
1733 * testsuite/18_support/destroying_delete.cc: New test.
1735 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
1738 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
1739 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
1740 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
1741 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
1743 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
1746 * include/bits/fs_path.h (path::has_root_name)
1747 (path::has_root_directory, path::has_root_path)
1748 (path::has_relative_path, path::has_parent_path)
1749 (path::has_filename, path::has_stem, path::has_extension)
1750 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
1752 * src/c++17/fs_path.cc (path::has_root_name)
1753 (path::has_root_directory, path::has_root_path)
1754 (path::has_relative_path, path::has_parent_path)
1755 (path::has_filename, path::_M_find_extension): Add noexcept.
1757 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
1759 PR libstdc++/89102 (partial)
1760 * include/std/type_traits (common_type<>): Define.
1761 (common_type<T>): Derive from common_type<T, T>.
1762 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1763 Test zero-length template argument list.
1764 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1765 Test additional single argument cases.
1766 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1767 Adjust expected error.
1769 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
1772 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
1774 * include/bits/stl_stack.h (stack): Likewise.
1775 * testsuite/23_containers/priority_queue/deduction.cc: New test.
1776 * testsuite/23_containers/queue/deduction.cc: New test.
1777 * testsuite/23_containers/stack/deduction.cc: New test.
1780 * include/std/type_traits (__is_convertible_helper)
1781 (__is_convertible_helper<_From, _To, false>): Revert changes to
1782 support is_nothrow_convertible.
1783 (__is_nt_convertible_helper): New helper.
1784 (is_nothrow_convertible): Use __is_nt_convertible_helper.
1786 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
1787 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
1790 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
1791 __is_alloc_insertable_impl. Replace single type member with two
1792 members, one for each of copy and move insertable.
1793 (__is_move_insertable): New trait for internal use.
1794 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
1795 (vector::_S_nothrow_relocate(true_type)): New functions to
1796 conditionally check if __relocate_a can throw.
1797 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
1798 on __is_move_insertable.
1799 (vector::_S_do_relocate): New overloaded functions to conditionally
1801 (vector::_S_relocate): New function that dispatches to _S_do_relocate
1802 based on _S_use_relocate.
1803 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1804 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
1805 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
1808 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
1809 parameter unnamed. Add message to static assertion.
1810 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1811 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
1814 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
1817 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
1819 (__is_bitwise_relocatable): ... to this.
1820 (__relocate_a_1): Adapt.
1821 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
1822 (__is_bitwise_relocatable): ... to this.
1824 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
1827 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
1828 final component as well as from _M_pathname. Append the dot using
1829 operator+= instead of only to _M_pathname.
1830 (path::_M_find_extension): Reformat slightly.
1831 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1832 Add more test cases.
1834 2019-01-30 Ulrich Drepper <drepper@redhat.com>
1836 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
1838 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
1840 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
1841 constexpr specifiers from arg and proj.
1843 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
1844 __shared_ptr instantiations used by gcc4-compatible ABI.
1846 * include/experimental/forward_list (experimental::erase): Qualify
1848 * include/experimental/list (experimental::erase): Likewise.
1849 * include/std/forward_list (std::erase): Likewise.
1850 * include/std/list (std::erase): Likewise.
1852 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
1854 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
1855 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
1856 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
1857 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
1858 * testsuite/ext/array_allocator/26875.cc: Likewise.
1859 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
1860 * testsuite/util/replacement_memory_operators.h: Likewise.
1861 * testsuite/util/testsuite_allocator.h: Likewise.
1863 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
1864 normal mode vector, even for debug mode.
1865 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
1866 Define alias template for normal mode vector.
1868 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
1871 * config/locale/generic/c_locale.h (__convert_from_v)
1872 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1873 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1874 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
1875 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1877 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
1880 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
1881 data member with static member function _S_use_relocate().
1882 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1883 (vector::_M_default_append): Use _S_use_relocate() instead of
1886 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
1889 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
1892 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
1893 write to stderr instead of using printf.
1895 2019-01-21 Jakub Jelinek <jakub@redhat.com>
1898 * include/bits/char_traits.h (__constant_string_p,
1899 __constant_char_array_p): Use __builtin_is_constant_evaluated if
1902 2019-01-20 Ulrich Drepper <drepper@redhat.com>
1904 Implement C++20 P0600r1.
1905 * include/backward/hash_map: Add nodiscard attribute to empty.
1906 * include/backward/hash_set: Likewise.
1907 * backward/hashtable.h: Likewise.
1908 * include/bits/basic_string.h: Likewise.
1909 * include/bits/forward_list.h: Likewise.
1910 * include/bits/hashtable.h: Likewise.
1911 * include/bits/regex.h: Likewise.
1912 * include/bits/stl_deque.h: Likewise.
1913 * include/bits/stl_list.h: Likewise.
1914 * include/bits/stl_map.h: Likewise.
1915 * include/bits/stl_multimap.h: Likewise.
1916 * include/bits/stl_multiset.h: Likewise.
1917 * include/bits/stl_queue.h: Likewise.
1918 * include/bits/stl_set.h: Likewise.
1919 * include/bits/stl_stack.h: Likewise.
1920 * include/bits/stl_tree.h: Likewise.
1921 * include/bits/stl_vector.h: Likewise.
1922 * include/bits/unordered_map.h: Likewise.
1923 * include/bits/unordered_set.h: Likewise.
1924 * include/debug/array: Likewise.
1925 * include/experimental/any: Likewise.
1926 * include/experimental/bits/fs_path.h: Likewise.
1927 * include/experimental/internet: Likewise.
1928 * include/experimental/string_view: Likewise.
1929 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
1931 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
1933 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
1935 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
1937 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
1939 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
1941 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
1943 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
1945 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1946 info_fn_imps.hpp: Likewise.
1947 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1948 left_child_next_sibling_heap_.hpp: Likewise.
1949 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
1951 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
1953 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
1955 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
1957 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
1959 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
1961 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
1963 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
1964 * include/ext/pb_ds/trie_policy.hpp: Likewise.
1965 * include/ext/rope: Likewise.
1966 * include/ext/slist: Likewise.
1967 * include/ext/vstring.h: Likewise.
1968 * include/profile/array: Likewise.
1969 * include/std/array: Likewise.
1970 * include/tr1/array: Likewise.
1971 * include/tr1/hashtable.h: Likewise.
1972 * include/tr1/regex: Likewise.
1973 * include/tr2/dynamic_bitset: Likewise.
1974 * include/bits/alloc_traits.h: Add nodiscard attribute to
1976 * include/experimental/memory_resource: Likewise.
1977 * include/ext/alloc_traits.h: Likewise.
1978 * include/ext/array_allocator.h: Likewise.
1979 * include/ext/bitmap_allocator.h: Likewise.
1980 * include/ext/debug_allocator.h: Likewise.
1981 * include/ext/extptr_allocator.h: Likewise.
1982 * include/ext/mt_allocator.h: Likewise.
1983 * include/ext/new_allocator.h: Likewise.
1984 * include/ext/pool_allocator.h: Likewise.
1985 * include/ext/throw_allocator.h: Likewise.
1986 * include/std/scoped_allocator: Likewise.
1987 * libsupc++/eh_alloc.cc: Likewise.
1988 * include/std/future: Add nodiscard attribute to async.
1989 * libsupc++/new: Add nodiscard attribute to new.
1991 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
1996 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
1997 * include/bits/shared_ptr.h
1998 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
1999 (allocate_shared): Change to use new tag type.
2000 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2001 Declare new member function.
2002 (_Sp_alloc_shared_tag): Define new type.
2003 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2004 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2005 _Sp_make_shared_tag::_S_eq to check type_info.
2006 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2007 Constrain to prevent being called with _Sp_alloc_shared_tag.
2008 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2009 Replace constructor with ...
2010 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2011 reference parameter so address of the new object can be returned to
2012 the caller. Obtain the allocator from the tag type.
2013 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2014 constructor with ...
2015 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2016 to the __shared_count constructor.
2017 (__allocate_shared): Change to use new tag type.
2018 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2020 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
2022 * src/c++17/fs_ops.cc
2023 (equivalent(const path&, const path&, error_code&))
2024 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2025 compare files instead of relying on incomplete info returned by stat.
2028 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2029 if the path is already absolute.
2030 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2031 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2034 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2035 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2036 of filesystem::exists.
2037 (create_directories(const path&, error_code&)): Add assertions.
2038 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2039 Add workaround for bug in _wstat for paths with trailing slash.
2040 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2041 for expected behaviour on mingw.
2042 * testsuite/experimental/filesystem/operations/create_directories.cc:
2044 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2045 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2046 not test permissions on mingw targets.
2048 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2050 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2051 constructors and open members taking wide strings. Fix patterns for
2052 filesystem::path members to match wstring_view parameters. Add
2053 exports for shared_ptr members used by directory iterators.
2054 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2055 error code parameter if the file doesn't exist.
2056 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2058 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2059 values for mingw targets, where "/" is not an absolute path. Do not
2060 test symlinks on mingw targets.
2061 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2062 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2064 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2065 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2066 that each component of the path is created.
2067 * testsuite/experimental/filesystem/operations/create_directories.cc:
2069 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2070 permissions on mingw targets.
2071 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2072 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2073 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2074 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2076 * testsuite/experimental/filesystem/operations/permissions.cc:
2078 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2079 symlinks or permissions on mingw targets.
2080 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2081 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2082 symlinks on mingw targets.
2083 * testsuite/experimental/filesystem/operations/remove_all.cc:
2085 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2086 permissions on mingw targets.
2087 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2088 test symlinks on mingw targets.
2089 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2092 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2095 Warn about unused comparisons of shared_ptr/unique_ptr
2096 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2097 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2098 <, <=, >, >= for shared_ptr.
2099 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2101 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2103 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2104 as 201611L, because P0497R0 changes are supported.
2105 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2107 * include/bits/erase_if.h [__cplusplus > 201703L]
2108 (__cpp_lib_erase_if): Only define for C++2a.
2109 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2110 (__cpp_lib_null_iterators): Define.
2111 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2112 (__cpp_lib_null_iterators): Define.
2113 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2115 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2117 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2119 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2120 changes are supported.
2121 * include/std/optional (__cpp_lib_optional): Likewise.
2122 * include/std/variant (__cpp_lib_variant): Likewise.
2123 * include/std/version [!__STRICT_ANSI__]
2124 (__cpp_lib_uncaught_exceptions): Define as long integer.
2125 [__cplusplus >= 201703L] (__cpp_lib_any)
2126 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2127 (__cpp_lib_variant): Define for C++17.
2128 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2130 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2133 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2135 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2139 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2141 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2144 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2146 * doc/xml/manual/intro.xml: Include new section.
2147 * doc/xml/manual/status_cxx2017.xml: Document more
2148 implementation-defined properties of the library.
2149 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2150 * doc/html/*: Regenerate.
2152 * include/bits/refwrap.h [__cplusplus > 201703L]
2153 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2154 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2155 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2157 (reference_wrapper::operator()): Add static assertion.
2158 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2160 * include/std/chrono (duration_values::zero(), duration_values::min())
2161 (duration_values::max()): Add noexcept.
2162 (duration::zero(), duration::min(), duration::max()): Likewise.
2163 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2164 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2165 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2167 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2169 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2171 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2172 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2174 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2177 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2178 specialization for C++17 (P0513R0, LWG 2817).
2179 * testsuite/20_util/hash/nullptr.cc: New test.
2182 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2183 pattern for std::basic_stringbuf::str().
2185 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2186 basic_ostream::operator<< patterns.
2188 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2190 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2191 test failures on targets with 32-bit time_t.
2193 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2194 * include/std/deque: Likewise.
2195 * include/std/forward_list: Likewise.
2196 * include/std/list: Likewise.
2197 * include/std/string: Likewise.
2198 * include/std/vector: Likewise.
2199 * include/std/version: Likewise.
2200 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2201 * testsuite/23_containers/deque/erasure.cc: Likewise.
2202 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2203 * testsuite/23_containers/list/erasure.cc: Likewise.
2204 * testsuite/23_containers/map/erasure.cc: Likewise.
2205 * testsuite/23_containers/set/erasure.cc: Likewise.
2206 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2207 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2208 * testsuite/23_containers/vector/erasure.cc: Likewise.
2210 * include/experimental/internet [AI_NUMERICSERV]
2211 (resolver_base::numeric_service): Define conditionally.
2212 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2214 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2217 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2218 Jonathan Wakely <jwakely@redhat.com>
2221 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2222 (GLIBCXX_3.4.26): Add new exports.
2223 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2224 correct list of sources.
2225 * include/Makefile.in: Regenerate.
2226 * include/std/ostream (operator<<(nullptr_t)): New member function.
2227 * src/c++17/ostream-inst.cc: New file.
2228 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2231 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2233 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2234 of the source file containing the caller.
2235 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2236 directories created by test.
2237 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2239 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2241 * testsuite/experimental/filesystem/iterators/
2242 recursive_directory_iterator.cc: Likewise.
2244 2019-01-10 Jakub Jelinek <jakub@redhat.com>
2246 PR tree-optimization/88775
2247 * include/bits/stl_function.h (greater<_Tp*>::operator(),
2248 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
2249 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
2250 instead of __builtin_constant_p if available. Don't bother with
2251 the pointer comparison in C++11 and earlier.
2253 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2257 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2260 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
2262 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2263 for filesystem::path. Give variables more distinctive names.
2265 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2266 member function to perform non-trivial assignment.
2267 (_Optional_payload_base::_M_move_assign): Likewise.
2268 (_Optional_payload<T, true, false, true>::operator=)
2269 (_Optional_payload<T, true, true, false>::operator=)
2270 (_Optional_payload<T, true, false, false>::operator=): Call
2271 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
2274 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
2275 test std::complex<long double> if long double format is IBM128.
2276 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
2279 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2281 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
2282 for old std::unique_ptr layout.
2283 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
2284 to become valueless. Add filesystem::path tests.
2287 * include/std/optional (_Optional_payload_base): New class template
2288 for common code hoisted from _Optional_payload specializations. Use
2289 a template for the union, to allow a partial specialization for
2290 types with non-trivial destructors. Add constructors for in-place
2291 initialization to the union.
2292 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2293 to perform non-trivial copy construction, instead of relying on
2294 non-standard copy elision in a delegating constructor.
2295 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2296 non-trivial move construction.
2297 (_Optional_payload): Derive from _Optional_payload_base and use it
2298 for everything except the non-trivial assignment operators, which are
2300 (_Optional_payload<false, C, M>): Derive from the specialization
2301 _Optional_payload<true, false, false> and add a destructor.
2302 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2303 Forward to corresponding members of _Optional_payload.
2304 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2305 Hoist common members from _Optional_base.
2306 (_Optional_base): Make all members and base class public.
2307 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2308 _Optional_base_impl.
2309 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2310 support for new std::optional layout.
2311 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2314 * include/bits/locale_conv.h: Use <> for includes not "".
2315 * include/ext/random: Likewise.
2316 * include/ext/vstring.h: Likewise.
2318 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2320 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2321 (GLIBCXX_3.4.21): Likewise.
2323 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2326 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2327 to match the one that controls whether utimbuf and utime are declared.
2329 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
2332 * include/bits/char_traits.h (char_traits::move): Do not pass null
2333 pointers to memmove.
2334 * include/bits/locale_facets.h
2335 (ctype<char>::widen(const char*, const char*, char*)): Do not
2336 pass null pointers to memcpy.
2337 (ctype<char>::narrow(const char*, const char*, char, char*)):
2339 (ctype<char>::do_widen(const char*, const char*, char*)):
2341 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2344 * doc/xml/manual/spine.xml: Update copyright years.
2345 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2346 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2347 for C++17 filesystem library.
2348 * doc/html/*: Regenerate.
2350 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2351 * config.h.in: Regenerate.
2352 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2353 alphabetically and add missing entries for copy_symlink,
2354 hard_link_count, rename, and resize_file.
2355 * configure: Regenerate.
2356 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2357 used unconditionally.
2358 * src/filesystem/ops-common.h (__gnu_posix::truncate)
2359 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2360 supports truncating to zero length.
2361 * testsuite/27_io/filesystem/operations/all.cc: New test.
2362 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2364 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
2367 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2368 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2369 * config.h.in: Regenerate.
2370 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2371 remaining std::filesystem types and functions.
2372 * configure: Regenerate.
2373 * src/c++17/Makefile.am: Add C++17 filesystem sources.
2374 * src/c++17/Makefile.in: Regenerate.
2375 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2376 here, and change name of included file.
2377 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2378 here, and change name of included file.
2379 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2380 path to dir-common.h.
2381 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2382 path to ops-common.h. Disable -Wunused-parameter warnings.
2383 (internal_file_clock): Define unconditionally.
2384 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2386 (do_copy_file, do_space): Move definitions to ops.common.h.
2387 (copy, file_size, hard_link_count, last_write_time, space): Only
2388 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2390 (last_write_time, read_symlink): Remove unused attributes from
2392 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2393 * src/filesystem/Makefile.in: Regenerate.
2394 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2395 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2396 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2397 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2398 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2399 dummy types and functions instead of using #error.
2400 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2401 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2403 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2404 (do_copy_file, do_space): Move definitions here from std-ops.cc.
2405 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2406 to account for new namespace.
2407 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2408 -lstdc++fs from dg-options.
2409 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2410 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2411 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2412 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2413 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2415 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2416 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2418 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2419 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2420 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2421 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2422 * testsuite/27_io/filesystem/operations/create_directories.cc:
2424 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2425 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2426 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2427 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2428 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2429 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2430 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2431 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2432 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2433 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2434 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2435 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2436 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2437 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2438 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2439 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2440 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2441 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2443 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2447 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2448 typeinfo and vtables less greedy.
2449 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2450 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2451 * src/c++17/Makefile.in: Regenerate.
2452 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2453 here, and change name of included file.
2454 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2455 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2457 * src/filesystem/Makefile.in: Regenerate.
2458 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2459 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2460 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2461 from dg-options and remove dg-require-filesystem-ts.
2462 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2463 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2464 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2465 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2466 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2467 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2468 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2469 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2470 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2471 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2472 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2473 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2474 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2475 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2476 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2477 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2478 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2479 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2480 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2481 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2482 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2484 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2485 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2486 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2487 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2488 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2489 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2490 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2491 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2492 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2493 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2494 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2495 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2497 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2499 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2501 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2503 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2504 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2505 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2506 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2507 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2508 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2509 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2510 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2511 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2512 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2514 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2515 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2516 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2517 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2518 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2521 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2522 Check is_trivially_copyable instead of is_scalar.
2523 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2524 contained value can throw and its type is trivially copyable then
2525 construct into a temporary variant and move from it, to provide the
2526 strong exception safety guarantee.
2527 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2529 * testsuite/20_util/variant/87431.cc: New test.
2530 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2531 conversion causes valueless state.
2534 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2535 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2536 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2537 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2538 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2540 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
2542 * include/bits/fs_fwd.h (__file_clock): Define new clock.
2543 (file_time_type): Redefine in terms of __file_clock.
2544 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2546 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2548 (internal_file_lock): New helper type for accessing __file_clock.
2549 (do_copy_file): Use internal_file_lock to convert system time to
2551 (last_write_time(const path&, error_code&)): Likewise.
2552 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2554 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
2556 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2557 for const member functions of std::basic_string.
2558 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
2560 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
2561 Make non-standard constructor private.
2562 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2564 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2565 explicit instantiations for C++17 as well as earlier dialects.
2566 * src/c++17/Makefile.am: Add new source files.
2567 * src/c++17/Makefile.in: Regenerate.
2568 * src/c++17/cow-string-inst.cc: New file defining explicit
2569 instantiations for basic_string member functions added in C++17.
2570 * src/c++17/string-inst.cc: Likewise.
2572 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2573 copy/move constructors for old std::basic_string.
2574 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2575 (basic_string::reference, basic_string::const_reference): Define
2576 as plain references for C++11 and later.
2577 (basic_string::basic_string()): Put constructor body outside
2578 preprocessor conditional groups.
2579 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2580 instead of copying it.
2581 (basic_string::basic_string(const basic_string&, const _Alloc&)):
2583 (basic_string::basic_string(basic_string&&, const _Alloc&)):
2585 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2586 cases for old basic_string.
2587 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2588 allocator-extended constructors unconditionally. Add extra members to
2589 allocator type when using old string ABI.
2590 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2592 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2594 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2595 -fno-inline added to test flags.
2597 * testsuite/21_strings/basic_string/requirements/
2598 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2600 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2601 assertion failures with old std::string ABI.
2603 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2605 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2606 functions that will only erase elements at the end.
2607 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2608 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2609 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2611 (path::_List::pop_back()): Define.
2612 (path::_List::_M_erase_from(const_iterator)): Define.
2613 (path::operator/=(const path&)): Use pop_back to remove last component
2614 and _M_erase_from to remove multiple components.
2615 (path::_M_append(basic_string_view<value_type>)): Likewise.
2616 (path::operator+=(const path&)): Likewise.
2617 (path::_M_concat(basic_string_view<value_type>)): Likewise.
2618 (path::remove_filename()): Likewise.
2619 (path::lexically_normal()): Use _List::_Impl iterators instead of
2620 path::iterator. Use pop_back to remove components from the end. Clear
2621 trailing filename, instead of using erase(const_iterator) to remove
2622 a non-final component.
2623 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
2625 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
2627 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
2628 incorrect treatment of empty filename after trailing slash.
2629 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
2631 * testsuite/21_strings/basic_string/modifiers/assign/char/
2632 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
2634 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2635 move_assign_optim.cc: Likewise.
2637 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2638 Jakub Jelinek <jakub@redhat.com>
2641 * include/experimental/memory: Replace UTF-8 quote characters.
2642 * include/std/future: Replace UTF-8 "em dash" characters.
2644 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2647 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
2648 * include/debug/forward_list: Likewise.
2649 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
2651 * include/experimental/chrono: Likewise.
2652 * include/experimental/functional: Likewise.
2653 * include/experimental/ratio: Likewise.
2654 * include/experimental/system_error: Likewise.
2655 * include/experimental/tuple: Likewise.
2656 * include/experimental/type_traits: Likewise.
2657 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
2658 * include/parallel/multiseq_selection.h: Likewise.
2661 * config/abi/pre/gnu.ver: Add missing exports.
2662 * testsuite/22_locale/collate_byname/88681.cc: New test.
2663 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
2664 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2666 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
2668 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
2669 initializer_list<value_type> and from input iterator ranges.
2670 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2672 * testsuite/experimental/string_view/element_access/char/empty.cc:
2673 Fix year range in copyright header.
2675 2019-01-02 Joel Brobecker <brobecker@adacore.com>
2677 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2678 Fix year range in copyright header.
2680 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2682 Update copyright years.
2684 Copyright (C) 2019 Free Software Foundation, Inc.
2686 Copying and distribution of this file, with or without modification,
2687 are permitted in any medium without royalty provided the copyright
2688 notice and this notice are preserved.