1 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3 * include/bits/unique_lock.h: Fix/improve doxygen markup.
4 * include/std/mutex: Likewise.
5 * include/std/shared_mutex: Likewise.
7 * include/bits/fs_dir.h: Fix/improve doxygen markup.
8 * include/bits/fs_fwd.h: Likewise.
9 * include/bits/fs_ops.h: Likewise.
10 * include/bits/fs_path.h: Likewise.
11 * include/std/filesystem: Likewise.
13 * include/experimental/bits/net.h: Fix/improve doxygen markup.
14 * include/experimental/buffer: Likewise.
15 * include/experimental/executor: Likewise.
16 * include/experimental/internet: Likewise.
17 * include/experimental/io_context: Likewise.
18 * include/experimental/net: Likewise.
19 * include/experimental/netfwd: Likewise.
20 * include/experimental/socket: Likewise.
21 * include/experimental/timer: Likewise.
23 * doc/doxygen/doxygroups.cc: Move description of experimental group
25 * include/experimental/algorithm: Add to libfund-ts doc group.
26 * include/experimental/any: Likewise. Do not document implementation
28 * include/experimental/array: Add to libfund-ts doc group.
29 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
30 for Library Fundamentals.
31 * include/experimental/chrono: Add to libfund-ts doc group.
32 * include/experimental/deque: Likewise.
33 * include/experimental/forward_list: Likewise.
34 * include/experimental/functional: Likewise.
35 * include/experimental/iterator: Likewise.
36 * include/experimental/list: Likewise.
37 * include/experimental/map: Likewise.
38 * include/experimental/memory: Likewise.
39 * include/experimental/memory_resource: Likewise. Improve docs.
41 * include/experimental/numeric: Add to libfund-ts doc group.
42 * include/experimental/optional: Likewise.
43 * include/experimental/propagate_const: Likewise.
44 * include/experimental/random: Likewise.
45 * include/experimental/ratio: Likewise.
46 * include/experimental/regex: Likewise.
47 * include/experimental/set: Likewise.
48 * include/experimental/source_location: Likewise.
49 * include/experimental/string: Likewise.
50 * include/experimental/string_view: Likewise.
51 * include/experimental/system_error: Likewise.
52 * include/experimental/tuple: Likewise.
53 * include/experimental/type_traits: Likewise.
54 * include/experimental/unordered_map: Likewise.
55 * include/experimental/unordered_set: Likewise.
56 * include/experimental/utility: Likewise.
57 * include/experimental/vector: Likewise.
58 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
59 * testsuite/experimental/array/neg.cc: Adjust dg-error.
60 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
62 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
63 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
64 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
65 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
66 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
68 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
69 * include/experimental/bits/fs_fwd.h: Improve docs.
70 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
71 * include/experimental/bits/fs_path.h: Likewise.
72 (path, filesystem_error, u8path): Improve docs.
73 * include/experimental/filesystem: Link to docs for TS.
75 * config/allocator/new_allocator_base.h (__allocator_base): Add
76 workaround for Doxygen bug #6945.
77 * include/std/memory: Improve docs. Define group for pointer safety.
78 * include/std/scoped_allocator: Improve docs. Use "undocumented"
79 conditional to suppress documentation for implementation details.
81 * include/bits/specfun.h: Improve docs.
82 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
85 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
86 (std::experimental): Add docs.
87 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
88 namespace to nothing when generating docs.
89 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
90 * include/std/chrono (std::chrono): Likewise.
91 * include/std/functional (std::placeholders): Likewise.
92 * include/std/thread (std::this_thread): Likewise.
94 * include/parallel/settings.h: Fix Doxygen markup.
96 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
97 anything unless PB_DS_CLASS_C_DEC is defined.
98 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
99 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
100 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
101 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
102 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
103 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
104 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
106 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
107 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
108 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
109 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
110 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
111 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
112 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
113 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
114 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
115 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
116 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
118 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
119 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
121 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
124 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
125 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
126 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
129 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
131 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
132 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
133 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
134 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
135 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
136 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
138 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
139 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
142 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
145 * include/std/complex (__complex_proj): Return parameter unchanged.
146 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
147 floating-point types to take std::complex arguments.
148 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
149 floating-point types.
150 * testsuite/26_numerics/complex/proj.cc: New test.
152 2019-04-30 Jakub Jelinek <jakub@redhat.com>
154 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
155 to _Lock_policyE[012].
156 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
158 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
160 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
161 macros accidentally left in.
162 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
163 unnecessary -lstdc++fs option. Fix test for mingw.
164 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
167 2019-04-30 Jakub Jelinek <jakub@redhat.com>
169 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
171 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
173 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
175 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
176 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
179 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
181 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
184 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
185 class template and partial specialization.
188 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
190 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
191 functions to convert a value to an integral type.
192 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
193 (fill_n): Convert _Size parameter to an integral type.
194 * testsuite/25_algorithms/fill_n/87982.cc: New test.
195 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
196 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
197 * testsuite/25_algorithms/generate_n/87982.cc: New test.
198 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
199 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
201 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
203 Adding noexcept-specification on tuple constructors (LWG 2899)
204 * libstdc++-v3/include/std/tuple:
205 (tuple()): Add noexcept-specification.
206 (tuple(const _Elements&...)): Likewise
207 (tuple(_UElements&&...)): Likewise
208 (tuple(const tuple<_UElements...>&)): Likewise
209 (tuple(tuple<_UElements...>&&)): Likewise
210 (tuple(const _T1&, const _T2&)): Likewise
211 (tuple(_U1&&, _U2&&)): Likewise
212 (tuple(const tuple<_U1, _U2>&): Likewise
213 (tuple(tuple<_U1, _U2>&&): Likewise
214 (tuple(const pair<_U1, _U2>&): Likewise
215 (tuple(pair<_U1, _U2>&&): Likewise
216 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
218 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
221 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
222 arguments with __restrict.
224 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
226 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
228 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
230 * include/experimental/bits/fs_path.h
231 (path::_S_convert_loc<_InputIterator>): Create const std::string to
232 avoid redundant call to _S_convert_loc with non-const pointers.
234 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
235 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
236 * testsuite/21_strings/basic_string/hash/hash.cc
237 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
238 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
239 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
241 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
242 wstring::_M_replace_dispatch with more specific patterns.
243 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
244 Create const std::string to avoid redundant call to _S_convert_loc
245 with non-const pointers.
246 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
247 avoid unnecessary basic_string::assign instantiations.
249 * include/std/memory (__uses_alloc_args): Add string-literal to
250 static_assert, to match the one in __uses_alloc.
251 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
252 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
253 for recursive uses-allocator construction of nested pairs.
254 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
257 2019-04-26 Jakub Jelinek <jakub@redhat.com>
259 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
260 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
261 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
262 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
264 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
265 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
266 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
267 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
268 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
269 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
270 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
272 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
275 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
276 * include/std/scoped_allocator [__cplusplus > 201703L]
277 (scoped_allocator_adaptor::construct): Define in terms of
278 uses_allocator_construction_args, as per P0591R4.
279 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
280 * testsuite/util/testsuite_allocator.h: Remove name of unused
283 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
285 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
286 * doc/html/*: Regenerate.
288 * include/bits/fs_path.h (operator<, operator<=, operator>)
289 (operator>=, operator==, operator!=): Make hidden friends, as per
291 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
293 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
295 * include/std/any (any::any(ValueType&&)): Use __and_v.
296 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
299 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
301 * include/std/type_traits (__result_of_memfun): Use remove_reference
302 instead of __remove_cvref_t and remove redundant is_same check.
303 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
305 * include/experimental/string_view (basic_string_view::pointer)
306 (basic_string_view::reference): Fix to refer to non-const value_type.
307 * include/bits/basic_string.h (basic_string): Use __sv_check and
308 __sv_limit instead of basic_string_view::_M_check and
309 basic_string_view::_M_limit.
310 * include/std/string_view (__sv_check, __sv_limit): New
311 helper functions to replace basic_string_view::_M_check and
312 basic_string_view::_M_limit.
313 (basic_string_view): Add static assertions to enforce ill-formed
314 requirement for traits_type::char_type from P1148R0, and to enforce
315 required properties of char-like types.
316 (basic_string_view::pointer, basic_string_view::reference): Fix to
317 refer to non-const value_type.
318 (basic_string_view::operator[], basic_string_view::at)
319 (basic_string_view::front, basic_string_view::back)
320 (basic_string_view::data): Use const_reference and const_pointer
321 typedefs for return types.
322 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
323 (hash<wstring_view>): Fix argument_type typedef.
324 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
325 char/1.cc: Fix expected return type of basic_string_view::data().
326 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
327 wchar_t/1.cc: Likewise.
328 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
330 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
331 wchar_t/1.cc: Likewise.
332 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
334 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
335 Check reference and pointer typedefs.
336 * testsuite/experimental/string_view/requirements/typedefs.cc:
338 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
339 Fix expected return type of basic_string_view::data().
340 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
342 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
344 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
348 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
349 Avoid a runtime check for types that can never be stored in std::any.
350 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
353 PR libstdc++/90220 (partial)
354 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
355 not attempt ill-formed static_cast to pointers to non-object types.
356 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
359 * testsuite/20_util/variant/run.cc: Catch exception by reference to
360 prevent -Wcatch-value warning.
362 * include/std/variant (__variant_construct): Use template parameter
363 type instead of equivalent decltype-specifier.
364 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
365 Replace forward with move.
366 (_Move_ctor_base<false, Types...>::_M_destructive_move)
367 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
368 (_Move_ctor_base<true, Types...>::_M_destructive_move)
369 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
370 index after construction succeeds.
371 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
372 if-constexpr checks that are always true. Use __remove_cvref_t instead
373 of remove_reference so that is_nothrow_move_constructible check
374 doesn't use a const rvalue parameter. In the potentially-throwing case
375 construct a temporary and move assign it, as per LWG 2904.
376 (_Move_assign_base<false, Types...>::operator=): Remove redundant
377 if-constexpr checks that are always true. Use emplace as per LWG 2904.
378 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
379 construct a temporary and move assign from it, as per LWG 2904.
380 * testsuite/20_util/variant/exception_safety.cc: Check that
381 assignment operators have strong exception safety guarantee.
383 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
385 Document PSTL linker flags
387 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
389 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
391 * include/std/variant (__detail::__variant::_Traits): Make
392 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
393 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
395 (__detail::__variant::_Copy_assign_alias): Only depend on
396 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
397 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
398 move assignment operators.
401 * include/std/variant (variant::__not_self): New helper for the
402 is_same_v<remove_cvref_t<T>, variant>==false constraints.
403 (variant::__to_type_impl): Remove.
404 (variant::__to_type): Add default argument to check pack size, instead
405 of using __to_type_impl.
406 (variant::__accepted_type): Add default argument using __not_self.
407 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
408 for variant(T&&) constructor constraint.
409 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
410 Extract __accepted_type into a named template parameter for reuse in
411 other constraints and in the exception specification.
412 (variant::variant(in_place_type_t<T>, Args&&...))
413 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
414 (variant::variant(in_place_index_t<T>, Args&&...))
415 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
416 (variant::operator=T&&)): Remove redundant && from trait arguments.
417 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
418 isn't used for in_place_type or in_place_index arguments.
420 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
421 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
422 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
424 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
425 Bernd Edlinger <bernd.edlinger@hotmail.de>
426 Jakub Jelinek <jakub@redhat.com>
429 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
430 general-regs-only target attribute for ARM.
432 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
435 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
436 specialization also depend on is_nothrow_move_constructible.
437 * include/std/variant (__detail::__variant::__never_valueless()):
438 Only true if the variant would have a move assignment operator.
439 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
440 Check __never_valueless<T...>().
441 (variant::emplace): Only perform non-throwing move assignments
442 for never-valueless alternatives if the variant has a move assignment
444 * testsuite/20_util/variant/compile.cc: Check that never-valueless
445 types can be emplaced into non-assignable variants.
446 * testsuite/20_util/variant/run.cc: Check that never-valueless types
447 don't get copied when emplaced into non-assignable variants.
449 * include/std/variant (__detail::__variant::__ref_cast): Remove
451 (__detail::__variant::_Uninitialized::_M_get)
452 (__detail::__variant::__get)
453 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
455 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
457 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
459 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
460 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
461 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
462 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
464 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
466 Delegate PSTL configuration to pstl/pstl_config.h
468 * include/bits/c++config: Remove explicit PSTL configuration
469 macros and use definitions from <pstl/pstl_config.h>.
471 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
473 Cleanup algorithm implementations
474 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
476 (mismatch): Forward execution policy.
477 (equal): Qualify call to std::equal().
478 (partial_sort): Forward execution policy.
479 (inplace_merge): Forward execution policy.
481 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
483 Improve implementation of parallel equal()
484 * include/pstl/algorithm_impl.h
485 (__internal::__brick_equal): use "4 iterator" version of
487 (__internal::__brick_equal): use simd for random access
488 iterators on unsequenced execution policies.
489 (__internal::__pattern_equal): add "4 iterator" version
490 (__internal::__pattern_equal): dispatch to simd __brick_equal
491 for vector-only execution policies.
492 (__internal::__pattern_equal): dispatch to __parallel_or for
493 parallel execution policies.
494 * include/pstl/glue_algorithm_impl.h
495 (std::equal): dispatch to "4 iterator" version of
496 __internal::__pattern_equal().
498 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
501 * include/bits/forward_list.h (operator==): Do not use operator!= to
503 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
504 earlier in the list, so that sort is stable.
505 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
506 * testsuite/23_containers/forward_list/comparable.cc: Test with
507 types that meet the minimum EqualityComparable and LessThanComparable
508 requirements. Remove irrelevant comment.
510 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
511 Do not depend on whether all alternative types are move constructible.
512 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
513 from the operand when deciding whether to perform the assignment.
514 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
515 with deleted move constructor and deleted move assignment operator.
516 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
517 behaviour of variants with DeletedMoves as an alternative.
518 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
519 (move_ctor, move_assign): Check that moving a variant with a
520 DeletedMoves alternative falls back to copying instead of moving.
522 * testsuite/20_util/variant/compile.cc: Remove empty string literals
523 from static_assert declarations.
525 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
526 actually match its name.
527 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
528 (test_swap()): Fix result for MoveCtorOnly and check
531 * include/std/optional (optional::value_or(U&&) &&): Add missing
533 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
534 for disengaged optionals and rvalue optionals.
535 * testsuite/20_util/optional/observers/4.cc: Likewise.
537 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
539 * include/pstl/algorithm_impl.h: Uglify identfiers.
540 * include/pstl/numeric_impl.h: Uglify identfiers.
541 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
543 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
545 * include/bits/c++config:
546 Add definition for __PSTL_ASSERT.
547 Add definition for __PSTL_ASSERT_MSG.
548 * include/pstl/algorithm_impl.h: Replace use of assert().
549 * include/pstl/numeric_impl.h: Replace use of assert().
550 * include/pstl/parallel_backend_tbb.h:
551 Replace use of assert().
552 Replace use of __TBB_ASSERT().
553 * include/pstl/parallel_backend_utils.h: Replace use of assert().
555 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
558 * src/c++17/memory_resource.cc
559 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
560 needed to allow placing a _Chunk at the end of the buffer.
561 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
563 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
565 * doc/xml/faq.xml: Add information about emergency EH pool.
566 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
567 Move outdated information on mt_allocator to a separate section.
568 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
569 doesn't affect the default allocator.
571 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
575 * testsuite/20_util/variant/89851.cc: New test.
577 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
579 * include/std/variant: Adjust whitespace. Add comments.
580 (_Multi_array): Leave primary template undefined.
581 (_Multi_array<_Tp>): Define partial specialization for base case of
583 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
584 which is always a reference.
585 (__gen_vtable::_S_apply()): Remove function, inline body into
586 default member initializer.
587 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
589 * include/std/variant (__variant_idx_cookie): Add member type.
590 (__visitor_result_type): Remove.
591 (__do_visit): Use invoke_result instead of __visitor_result_type.
592 * testsuite/20_util/variant/visit.cc: New test.
595 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
597 * testsuite/20_util/variant/90008.cc: New test.
599 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
601 * include/pstl/algorithm_impl.h: Add namespace qualification.
602 * include/pstl/execution_defs.h: Add namespace qualification.
603 * include/pstl/execution_impl.h: Add namespace qualification.
604 * include/pstl/numeric_impl.h: Add namespace qualification.
605 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
606 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
607 * include/pstl/parallel_backend_utils.h: Include <cassert>.
609 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
611 Fix visit<R> for variant.
612 * include/std/variant (__do_visit): Add a template parameter
613 for enforcing same return types for visit.
614 (__gen_vtable_impl): Likewise.
615 (_S_apply_single_alt): Adjust.
616 (__visit_invoke_impl): New. Handle casting to void.
617 (__do_visit_invoke): New. Enforces same return types.
618 (__do_visit_invoke_r): New. Converts return types.
619 (__visit_invoke): Adjust.
620 (__gen_vtable): Add a template parameter for enforcing
621 same return types for visit.
622 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
623 different return types.
624 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
625 visitors with different return types don't accidentally
626 compile with regular visitation.
628 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
630 * testsuite/27_io/filesystem/iterators/caching.cc: Add
631 dg-require-filesystem-ts.
633 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
635 * doc/xml/manual/status_cxx2020.xml: Update status.
636 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
637 * testsuite/20_util/variant/visit_r.cc: New test.
639 * include/bits/fs_dir.h (directory_iterator::operator*)
640 (directory_iterator::operator->): Add noexcept.
641 (operator==, operator!=): Replace namespace-scope equality operators
642 for directory iterators with hidden friends.
645 * config/abi/pre/gnu.ver: Add missing exports.
646 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
649 * config/abi/pre/gnu.ver: Export new symbols.
650 * include/bits/fs_dir.h (recursive_directory_iterator::options())
651 (recursive_directory_iterator::recursion_pending())
652 (recursive_directory_iterator::disable_recursion_pending()): Remove
653 inline definitions. Make noexcept.
654 (recursive_directory_iterator::depth())
655 (recursive_directory_iterator::operator*())
656 (recursive_directory_iterator::operator->()): Make noexcept.
657 (recursive_directory_iterator::_M_options)
658 (recursive_directory_iterator::_M_pending): Remove data members.
659 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
660 (recursive_directory_iterator::recursive_directory_iterator): Remove
661 ctor-initializer. Use new constructor for _Dir_stack.
662 (recursive_directory_iterator::options())
663 (recursive_directory_iterator::recursion_pending())
664 (recursive_directory_iterator::disable_recursion_pending()): Add
665 non-inline definitions.
666 (recursive_directory_iterator::depth()): Make noexcept.
667 (recursive_directory_iterator::increment(error_code&))
668 (recursive_directory_iterator::pop(error_code&)): Adjust to new
669 location of options and recursion_pending members.
670 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
671 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
672 user-declared move constructor and assignment operator, to make the
675 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
676 d_type == DT_UNKNOWN immediately.
677 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
679 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
681 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
683 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
684 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
687 PR libstdc++/87431 (again)
688 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
689 Define partial specialization for basic_string.
690 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
691 shared_ptr and weak_ptr.
692 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
694 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
696 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
698 * include/debug/vector (_Never_valueless_alt): Likewise for debug
700 * include/std/any (_Never_valueless_alt): Define explicit
701 specialization for any.
702 * include/std/variant (_Never_valueless_alt): Define primary template.
703 (__never_valueless): Use _Never_valueless_alt instead of
704 is_trivially_copyable.
705 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
706 initializations to avoid try-catch overhead. Add special case for
707 scalars produced by potentially-throwing conversions. Use
708 _Never_valueless_alt instead of is_trivially_copyable for the
709 remaining strong exception-safety cases.
710 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
711 * testsuite/20_util/variant/87431.cc: Run both test functions.
712 * testsuite/20_util/variant/exception_safety.cc: New test.
713 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
714 so the variant becomes valueless.
716 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
719 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
721 (variant::emplace<_Tp>): Return result of emplace<N> directly.
723 * include/std/string (__hash_string_base): New class template defining
724 operator() for hashing strings.
725 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
726 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
727 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
728 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
730 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
732 Use single-visitation in variant assignment and swap and relops.
733 Also use indices instead of types when checking whether
734 variants hold the same thing.
735 * include/std/variant (__do_visit): Add a template parameter
736 for index visitation, invoke with indices if index visitation
738 (__variant_idx_cookie): New.
739 (__visit_with_index): Likewise.
740 (_Copy_assign_base::operator=): Do single-visitation with
742 (_Move_assign_base::operator=): Likewise.
743 (_Extra_visit_slot_needed): Adjust.
744 (__visit_invoke): Call with indices if it's an index visitor.
745 (relops): Do single-visitation with an index visitor.
747 (__visitor_result_type): New.
749 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
751 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
753 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
755 Don't revisit a variant we are already visiting.
756 * include/std/variant (__variant_construct_single): New.
757 (__variant_construct): Use it.
758 (_M_destructive_move): Likewise.
759 (_M_destructive_copy): Likewise.
760 (_Copy_assign_base::operator=): Adjust.
761 (_Move_assign_base::operator=): Likewise.
764 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
767 * include/bits/hashtable.h (_Hashtable): Move static assertions to
768 destructor so they are not evaluated until the _Key type is complete.
769 * include/bits/stl_tree.h (_Rb_tree): Likewise.
770 * testsuite/23_containers/set/85965.cc: New test.
771 * testsuite/23_containers/unordered_set/85965.cc: New test.
772 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
773 with regexp matching the corresponding _Rb_tree specialization.
774 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
775 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
776 * testsuite/23_containers/set/48101_neg.cc: Likewise.
777 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
778 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
779 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
780 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
782 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
785 Fix based on a suggestion by Antony Polukhin.
786 * include/std/variant (__never_valueless): New.
788 (_Extra_visit_slot_needed): New.
789 (_Multi_array): Use it.
790 (_S_apply_all_alts): Likewise.
792 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
795 Fix based on a suggestion by Antony Polukhin.
796 * include/std/variant (__gen_vtable): Don't reserve an
797 additional table slot, _Multi_array already does that.
799 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
802 Fix based on a suggestion by Antony Polukhin.
803 * include/std/variant (__variant_construct): Capture a pointer
804 to the storage and visit just one variant.
806 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
808 * doc/xml/manual/backwards_compatibility.xml: Remove link to
809 Doxygen-generated pages with unstable URL.
810 * doc/xml/manual/concurrency_extensions.xml: Likewise.
811 * doc/xml/manual/extensions.xml: Likewise.
812 * doc/xml/manual/parallel_mode.xml: Likewise.
813 * doc/xml/manual/support.xml: Likewise.
815 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
816 avoid -Wconversion warnings.
818 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
820 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
821 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
822 (allstamped): Add stamp-pstl.
823 (install-headers): Add ptsl_builddir.
824 * include/Makefile.in: Regenerate.
825 * include/bits/c++config: Add pstl configuration.
826 * include/pstl/LICENSE.txt: New file.
827 * include/pstl/algorithm_fwd.h: New file.
828 * include/pstl/algorithm_impl.h: New file.
829 * include/pstl/execution_defs.h: New file.
830 * include/pstl/execution_impl.h: New file.
831 * include/pstl/glue_algorithm_defs.h: New file.
832 * include/pstl/glue_algorithm_impl.h: New file.
833 * include/pstl/glue_execution_defs.h: New file.
834 * include/pstl/glue_memory_defs.h: New file.
835 * include/pstl/glue_memory_impl.h: New file.
836 * include/pstl/glue_numeric_defs.h: New file.
837 * include/pstl/glue_numeric_impl.h: New file.
838 * include/pstl/memory_impl.h: New file.
839 * include/pstl/numeric_fwd.h: New file.
840 * include/pstl/numeric_impl.h: New file.
841 * include/pstl/parallel_backend.h: New file.
842 * include/pstl/parallel_backend_tbb.h: New file.
843 * include/pstl/parallel_backend_utils.h: New file.
844 * include/pstl/parallel_impl.h: New file.
845 * include/pstl/pstl_config.h: New file.
846 * include/pstl/unseq_backend_simd.h: New file.
847 * include/pstl/utils.h: New file.
848 * include/std/algorithm: Include parallel algorithm implementations.
849 * include/std/execution: New file.
850 * include/std/memory: Include parallel algorithm implementations.
851 * include/std/numeric: Include parallel algorithm implementations.
852 * include/std/version: Add parallel algorithms feature test macro.
853 * testsuite/util/pstl/pstl_test_config.h: New file.
854 * testsuite/util/pstl/test_utils.h: New file.
855 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
856 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
857 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
858 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
859 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
860 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
861 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
862 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
863 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
864 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
865 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
866 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
867 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
868 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
869 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
870 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
871 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
872 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
873 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
874 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
875 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
876 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
877 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
878 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
879 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
880 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
881 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
882 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
883 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
884 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
885 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
886 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
887 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
888 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
889 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
890 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
891 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
892 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
893 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
894 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
895 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
896 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
897 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
898 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
899 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
900 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
901 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
902 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
903 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
904 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
905 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
906 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
907 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
908 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
909 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
910 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
911 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
912 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
913 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
914 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
915 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
916 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
917 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
918 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
919 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
920 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
921 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
922 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
923 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
924 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
925 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
926 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
927 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
928 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
929 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
930 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
931 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
932 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
933 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
934 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
935 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
936 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
937 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
938 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
939 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
940 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
941 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
942 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
943 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
944 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
945 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
946 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
947 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
948 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
949 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
950 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
951 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
952 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
953 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
954 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
955 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
956 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
957 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
958 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
959 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
960 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
962 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
964 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
965 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
966 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
967 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
968 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
969 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
970 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
971 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
972 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
973 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
974 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
975 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
976 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
977 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
978 when the special functions IS is enabled, not for C++17.
979 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
981 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
982 without checks for special functions in C++17.
983 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
987 * include/backward/hash_map: Use <> for includes not "".
988 * include/backward/hash_set: Likewise.
989 * include/backward/strstream: Likewise.
990 * include/tr1/bessel_function.tcc: Likewise.
991 * include/tr1/exp_integral.tcc: Likewise.
992 * include/tr1/legendre_function.tcc: Likewise.
993 * include/tr1/modified_bessel_func.tcc: Likewise.
994 * include/tr1/riemann_zeta.tcc: Likewise.
996 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
998 * doc/xml/manual/allocator.xml: Link to table documenting evolution
999 of extension allocators.
1000 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1001 Document new headers in 7.2, 8.1 and 9.1 releases.
1002 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1003 * doc/html/*: Regenerate.
1005 2019-03-12 John David Anglin <dave.anglin@bell.net>
1008 * testsuite/lib/libstdc++.exp: Locate libatomic.
1009 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1010 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1012 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1013 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1014 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1015 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1017 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1020 * configure.ac: Check for sockatmark.
1021 * crossconfig.m4: Check for sockatmark.
1022 * config.h.in: Regenerate.
1023 * configure: Regenerate.
1024 * include/experimental/internet (address_v4::_S_hton): Rename
1025 overloaded functions to _S_hton_16 and _S_ntoh_16.
1026 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1027 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1028 * include/experimental/socket (basic_socket::at_mark): Check
1029 _GLIBCXX_HAVE_SOCKATMARK.
1031 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1032 const variables instead of macros.
1035 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1036 Use correct type for len_aligned.
1037 * testsuite/20_util/hash/89629.cc: New test.
1039 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1042 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1043 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1044 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1045 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1046 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1047 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1048 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1049 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1050 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1051 memory_order_seq_cst to int.
1053 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1055 * doc/xml/manual/using.xml: Use link element instead of xref.
1056 * doc/html/*: Regenerate.
1058 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1060 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1063 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1064 parameters in deduction guides.
1065 * include/debug/multimap.h (multimap): Likewise.
1066 * include/debug/set.h (multimap): Likewise.
1067 * include/debug/multiset.h (multimap): Likewise.
1068 * include/debug/unordered_map (unordered_map): Likewise.
1069 (unordered_multimap): Likewise.
1070 * include/debug/unordered_set (unordered_set): Likewise.
1071 (unordered_multiset): Likewise.
1074 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1075 Invalidate all iterators in case of rehash.
1076 (unordered_multimap<>::_M_check_rehashed): Likewise.
1077 * include/debug/unordered_set
1078 (unordered_set<>::_M_check_rehashed): Likewise.
1079 (unordered_multiset<>::_M_check_rehashed): Likewise.
1080 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1082 2019-03-07 Andreas Schwab <schwab@suse.de>
1084 * config/abi/post/riscv64-linux-gnu: New directory.
1085 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1087 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1089 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1090 compile test to run. Fix typo.
1092 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1093 * doc/html/*: Regenerate.
1095 P0356R5 Simplified partial function application
1096 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1097 helpers for bind_front.
1098 (bind_front, __cpp_lib_bind_front): Define.
1099 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1101 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1103 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1104 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1105 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1106 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1108 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1110 PR libstdc++/86655 - std::assoc_legendre should not constrain
1111 the value of m (or x).
1112 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1113 __sph_legendre): If degree > order Don't throw, return 0.
1114 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1115 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1116 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1117 * testsuite/tr1/5_numerical_facilities/special_functions/
1118 02_assoc_legendre/pr86655.cc: New test.
1119 * testsuite/tr1/5_numerical_facilities/special_functions/
1120 22_sph_legendre/pr86655.cc: New test.
1122 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1125 Also PR libstdc++/85517
1126 * include/std/variant (__do_visit): New.
1127 (__variant_cast): Likewise.
1128 (__variant_cookie): Likewise.
1129 (__erased_*): Remove.
1130 (_Variant_storage::_S_vtable): Likewise.
1131 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1132 (_Variant_storage::__M_reset): Adjust.
1133 (__variant_construct): New.
1134 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1135 __variant_construct.
1136 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1137 (_Move_ctor_base::__M_destructive_copy): New.
1138 (_Move_ctor_base::__M_destructive_move): Adjust to use
1139 __variant_construct.
1140 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1141 (_Copy_assign_alias): Adjust to check both copy assignment
1142 and copy construction for triviality.
1143 (_Move_assign_base::operator=): Adjust to use __do_visit.
1144 (_Multi_array): Add support for visitors that accept and return
1146 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1147 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1148 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1149 a __variant_cookie temporary for a variant that is valueless and..
1150 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1151 (__gen_vtable::_Array_type): Conditionally make space for
1152 the __variant_cookie visitor case.
1153 (__variant_construct_by_index): New.
1154 (get_if): Adjust to use std::addressof.
1155 (relops): Adjust to use __do_visit.
1156 (variant): Add __variant_cast and __variant_construct_by_index
1158 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1159 instead of self-destruction.
1160 (variant::swap): Adjust to use __do_visit.
1161 (visit): Reimplement in terms of __do_visit.
1162 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1163 * testsuite/20_util/variant/compile.cc: Adjust.
1164 * testsuite/20_util/variant/run.cc: Likewise.
1166 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1168 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1170 * testsuite/experimental/feat-char8_t.cc: Likewise.
1172 * include/std/type_traits [C++20] (is_bounded_array)
1173 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1175 * testsuite/20_util/is_bounded_array/requirements/
1176 explicit_instantiation.cc: New test.
1177 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1179 * testsuite/20_util/is_bounded_array/value.cc: New test.
1180 * testsuite/20_util/is_unbounded_array/requirements/
1181 explicit_instantiation.cc: New test.
1182 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1184 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1186 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1188 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1190 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
1192 * include/c_compatibility/math.h [C++20] (lerp): Add using
1194 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1195 (__lerp): Define function template to implement lerp.
1196 (lerp(float, float, float), lerp(double, double, double))
1197 (lerp(long double, long double, long double)): Define for C++20.
1198 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1199 (midpoint(T, T), midpoint(T*, T*)): Define.
1200 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1201 * testsuite/26_numerics/lerp.cc: New test.
1202 * testsuite/26_numerics/midpoint/floating.cc: New test.
1203 * testsuite/26_numerics/midpoint/integral.cc: New test.
1204 * testsuite/26_numerics/midpoint/pointer.cc: New test.
1206 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1208 PR libstdc++/88996 Implement P0439R0
1209 Make std::memory_order a scoped enumeration.
1210 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
1211 add variables for the old enumerators. Adjust calls.
1212 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
1213 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
1215 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
1217 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1220 * include/std/memory_resource (polymorphic_allocator): Add default
1221 template argument for C++20.
1222 (polymorphic_allocator::allocate_bytes)
1223 (polymorphic_allocator::deallocate_bytes)
1224 (polymorphic_allocator::allocate_object)
1225 (polymorphic_allocator::deallocate_object)
1226 (polymorphic_allocator::new_object)
1227 (polymorphic_allocator::delete_object): New member functions for
1229 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1232 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
1235 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
1238 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
1240 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
1241 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
1243 * include/std/memory (uses_allocator_construction_args): New set of
1244 overloaded functions.
1245 (make_obj_using_allocator, uninitialized_construct_using_allocator):
1247 * include/std/memory_resource (polymorphic_allocator::construct)
1248 [__cplusplus > 201703l]: Replace all overloads with a single function
1249 using uses_allocator_construction_args.
1250 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1252 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1254 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
1257 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1258 stylesheet directories before check for xsltproc. Try to use
1259 xmlcatalog to find local stylesheet directory before trying hardcoded
1260 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1261 check to look for the same stylesheet as doc/Makefile.am uses. Don't
1262 use xsltproc if xmlcatalog fails to find a local stylesheet.
1263 * configure.ac: Check for xmlcatalog.
1264 * Makefile.in: Regenerate.
1265 * configure: Likewise.
1266 * doc/Makefile.in: Likewise.
1267 * include/Makefile.in: Likewise.
1268 * libsupc++/Makefile.in: Likewise.
1269 * po/Makefile.in: Likewise.
1270 * python/Makefile.in: Likewise.
1271 * src/Makefile.in: Likewise.
1272 * src/c++11/Makefile.in: Likewise.
1273 * src/c++17/Makefile.in: Likewise.
1274 * src/c++98/Makefile.in: Likewise.
1275 * src/filesystem/Makefile.in: Likewise.
1276 * testsuite/Makefile.in: Likewise.
1278 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
1281 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1282 container deduction guides.
1283 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1284 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1285 parameters in deduction guides.
1286 * include/bits/stl_multimap.h (multimap): Likewise.
1287 * include/bits/stl_multiset.h (multiset): Likewise.
1288 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1289 * include/bits/stl_set.h (set): Likewise.
1290 * include/bits/stl_stack.h (stack): Likewise.
1291 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1292 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1293 constrain parameters in deduction guides.
1294 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1296 * testsuite/23_containers/map/cons/deduction.cc: Test additional
1298 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1299 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1300 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1301 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1303 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1305 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1308 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1309 to class template and partial specialization using void_t.
1310 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1312 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
1315 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1316 copy and move members public.
1318 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
1320 * include/std/type_traits (__underlying_type_impl): New helper to
1321 make underlying_type SFINAE-friendly.
1322 (underlying_type): Derive from __underlying_type_impl.
1323 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1327 * include/bits/char_traits.h (__constant_char_array): Check index is
1328 in range before dereferencing.
1329 (char_traits<char>::compare, char_traits<char>::find)
1330 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1331 immediately if n is zero.
1332 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1333 Remove workarounds for PR 67026.
1334 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1336 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1339 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1341 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1342 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1344 2019-02-22 Jakub Jelinek <jakub@redhat.com>
1347 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1348 type to std::size_t and argument to type to long double.
1350 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1352 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1353 * config/abi/post/sparc64-linux-gnu: New directory.
1354 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1355 * config/abi/post/sparc64-linux-gnu/32: New directory.
1356 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1358 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1360 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1361 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1364 2019-02-22 Tom Honermann <tom@honermann.net>
1366 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1367 printers for u8string and u8string_view.
1369 2019-02-22 Tom Honermann <tom@honermann.net>
1371 * testsuite/18_support/byte/ops.cc: Validate
1372 std::to_integer<char8_t>, std::to_integer<char16_t>, and
1373 std::to_integer<char32_t>.
1374 * testsuite/18_support/numeric_limits/dr559.cc: Validate
1375 std::numeric_limits<char8_t>.
1376 * testsuite/18_support/numeric_limits/lowest.cc: Validate
1377 std::numeric_limits<char8_t>::lowest().
1378 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1379 std::numeric_limits<char8_t>::max_digits10.
1380 * testsuite/18_support/type_info/fundamental.cc: Validate
1381 typeinfo for char8_t.
1382 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1383 std::from_chars with char8_t.
1384 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1385 Validate explicit instantiation of std::hash<char8_t>.
1386 * testsuite/20_util/is_integral/value.cc: Validate
1387 std::is_integral<char8_t>.
1388 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1389 Validate std::make_signed<char8_t>.
1390 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1391 Validate u8string construction from char8_t sources.
1392 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1394 * testsuite/21_strings/basic_string_view/operations/compare/
1395 char/70483.cc: Validate substr operations on u8string_view.
1396 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1397 the u8string_view typedef is defined.
1398 * testsuite/21_strings/char_traits/requirements/
1399 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1401 * testsuite/21_strings/char_traits/requirements/
1402 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1403 constexpr member functions.
1404 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1405 that the u8string typedef is defined.
1406 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1407 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1408 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1409 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1411 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1412 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1414 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1415 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1416 Validate std::atomic<char8_t>::is_always_lock_free
1417 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1418 Update line numbers.
1419 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1421 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1423 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1424 Validate std::experimental::pmr::u8string.
1425 * testsuite/experimental/string_view/typedefs.cc: Validate that the
1426 u8string_view typedef is defined.
1427 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1428 char32_t to the typelists.
1430 2019-02-22 Tom Honermann <tom@honermann.net>
1432 * include/ext/typelist.h: Constrain a partial specialization of
1433 typelist::detail::append_ to only match chain<T1,T2>.
1435 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1438 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1439 class template with class. Replace move and copy member types with
1440 member alias templates, so they are only instantiated when needed.
1441 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1442 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1443 test for C++11/14/17 as well.
1444 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1447 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1450 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1451 _GLIBCXX_PURE to the alias declaration.
1453 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
1455 * testsuite/21_strings/basic_string/literals/types.cc
1456 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1457 * testsuite/21_strings/basic_string/literals/values.cc
1458 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1459 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1460 potentially having different type.
1461 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1462 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1464 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1465 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1466 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1467 string literals only using basic character set.
1468 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1469 u8 literals to char.
1470 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1471 Test ATOMIC_CHAR8_T_LOCK_FREE.
1472 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1473 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1474 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1475 * testsuite/experimental/string_view/literals/types.cc
1476 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1478 * testsuite/experimental/string_view/literals/values.cc
1479 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1481 2019-02-19 Tom Honermann <tom@honermann.net>
1483 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1484 from char16_32_t.cc; validates numeric_limits<char8_t>.
1485 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1486 test cloned from types.cc; validates operator""s for char8_t
1488 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1489 test cloned from values.cc; validates construction and comparison
1491 * testsuite/21_strings/basic_string/requirements/
1492 /explicit_instantiation/char8_t/1.cc: New test cloned from
1493 char16_t/1.cc; validates explicit instantiation of
1494 basic_string<char8_t>.
1495 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1496 New test cloned from types.cc; validates operator""sv for char8_t
1497 returns u8string_view.
1498 * testsuite/21_strings/basic_string_view/literals/
1499 values-char8_t.cc: New test cloned from values.cc; validates
1500 construction and comparison of u8string_view values.
1501 * testsuite/21_strings/basic_string_view/requirements/
1502 explicit_instantiation/char8_t/1.cc: New test cloned from
1503 char16_t/1.cc; validates explicit instantiation of
1504 basic_string_view<char8_t>.
1505 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1506 New test cloned from char16_t/65049.cc; validates that
1507 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1508 * testsuite/21_strings/char_traits/requirements/char8_t/
1509 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1510 that char_traits<char8_t> member typedefs are present and correct.
1511 * testsuite/21_strings/char_traits/requirements/
1512 explicit_instantiation/char8_t/1.cc: New test cloned from
1513 char16_t/1.cc; validates explicit instantiation of
1514 char_traits<char8_t>.
1515 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1516 from char16_t.cc: validates
1517 codecvt<char16_t, char8_t, mbstate_t>.
1518 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
1519 from char32_t.cc: validates
1520 codecvt<char32_t, char8_t, mbstate_t>.
1521 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1522 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1523 codecvt<char32_t, char8_t, std::mbstate_t>.
1524 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1525 test cloned from string.cc; validates filesystem::path construction
1527 * testsuite/experimental/feat-char8_t.cc: New test; validates that
1528 the __cpp_lib_char8_t feature test macro is defined with the
1530 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1531 New test cloned from string.cc; validates filesystem::path
1532 construction from char8_t input.
1533 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1534 test cloned from types.cc; validates operator""sv for char8_t
1535 returns u8string_view.
1536 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1537 New test cloned from values.cc; validates construction and
1538 comparison of u8string_view values.
1539 * testsuite/experimental/string_view/requirements/
1540 explicit_instantiation/char8_t/1.cc: New test cloned from
1541 char16_t/1.cc; validates explicit instantiation of
1542 basic_string_view<char8_t>.
1543 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1544 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1547 2019-02-19 Tom Honermann <tom@honermann.net>
1549 P0482R5 char8_t: Standard library support
1550 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1551 typeinfo symbols for char8_t.
1552 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1553 (GLIBCXX_3.4.26): Add symbols for specializations of
1554 numeric_limits and codecvt that involve char8_t.
1555 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1556 * include/bits/atomic_base.h: Add atomic_char8_t.
1557 * include/bits/basic_string.h: Add std::hash<u8string> and
1558 operator""s(const char8_t*, size_t).
1559 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1561 * include/bits/char_traits.h: Add char_traits<char8_t>.
1562 * include/bits/codecvt.h: Add
1563 codecvt<char16_t, char8_t, mbstate_t>,
1564 codecvt<char32_t, char8_t, mbstate_t>,
1565 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1566 codecvt_byname<char32_t, char8_t, mbstate_t>.
1567 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1568 recognize char8_t as an integral type.
1569 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1571 (path::u8string): Return std::u8string when char8_t support is
1573 (path::generic_u8string): Likewise.
1574 (path::_S_convert): Handle conversion from char8_t input.
1575 (path::_S_str_convert): Likewise.
1576 * include/bits/functional_hash.h: Add hash<char8_t>.
1577 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
1579 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
1580 for new char8_t specializations.
1581 * include/bits/localefwd.h: Add missing declarations of
1582 codecvt<char16_t, char, mbstate_t> and
1583 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
1584 codecvt<char16_t, char8_t, mbstate_t> and
1585 codecvt<char32_t, char8_t, mbstate_t>.
1586 * include/bits/postypes.h: Add u8streampos
1587 * include/bits/stringfwd.h: Add declarations of
1588 char_traits<char8_t> and u8string.
1589 * include/c_global/cstddef: Add __byte_operand<char8_t>.
1590 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1592 (path::u8string): Return std::u8string when char8_t support is
1594 (path::generic_u8string): Likewise.
1595 (path::_S_convert): Handle conversion from char8_t input.
1596 (path::_S_str_convert): Likewise.
1597 * include/experimental/string: Add u8string.
1598 * include/experimental/string_view: Add u8string_view,
1599 hash<experimental::u8string_view>, and
1600 operator""sv(const char8_t*, size_t).
1601 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
1602 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
1603 as a character type.
1604 * include/std/limits: Add numeric_limits<char8_t>.
1605 * include/std/string_view: Add u8string_view,
1606 hash<experimental::u8string_view>, and
1607 operator""sv(const char8_t*, size_t).
1608 * include/std/type_traits: Add __is_integral_helper<char8_t>,
1609 __make_unsigned<char8_t>, and __make_signed<char8_t>.
1610 * libsupc++/atomic_lockfree_defines.h: Define
1611 ATOMIC_CHAR8_T_LOCK_FREE.
1612 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
1613 codecvt.cc and limits.cc so that char8_t specializations of
1614 numeric_limits and codecvt and emitted.
1615 * src/c++11/Makefile.in: Likewise.
1616 * src/c++11/codecvt.cc: Define members of
1617 codecvt<char16_t, char8_t, mbstate_t>,
1618 codecvt<char32_t, char8_t, mbstate_t>,
1619 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1620 codecvt_byname<char32_t, char8_t, mbstate_t>.
1621 * src/c++11/limits.cc: Define members of
1622 numeric_limits<char8_t>.
1623 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
1624 locale_init.cc and localename.cc.
1625 * src/c++98/Makefile.in: Likewise.
1626 * src/c++98/locale_init.cc: Add initialization for the
1627 codecvt<char16_t, char8_t, mbstate_t> and
1628 codecvt<char32_t, char8_t, mbstate_t> facets.
1629 * src/c++98/localename.cc: Likewise.
1630 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
1632 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
1634 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
1635 * 27_io/filesystem/operations/resize_file.cc: Likewise.
1636 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
1638 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
1640 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
1641 * doc/html/*: Regenerate.
1643 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
1644 * doc/html/*: Regenerate.
1646 * doc/xml/manual/intro.xml: Document LWG 2586 status.
1647 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
1648 allocator type in is_constructible checks.
1649 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
1650 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
1651 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
1652 problematic type from LWG 2586 discussion.
1653 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
1654 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1656 * configure.ac: Check for C11 timespec_get function.
1657 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
1659 * config.h.in: Regenerate.
1660 * configure: Regenerate.
1661 * include/c_global/ctime (timespec, timespec_get): Add to namespace
1662 std for C++17 and up.
1664 * doc/xml/manual/intro.xml: Document LWG 2537 status.
1665 * include/bits/stl_queue.h
1666 (priority_queue(const Compare&, const Container&, const Alloc&))
1667 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
1669 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
1671 * doc/xml/manual/intro.xml: Document LWG 2566 status.
1672 * include/bits/stl_queue.h (queue, priority_queue): Add static
1673 assertions to enforce LWG 2566 requirement on value_type.
1674 * include/bits/stl_stack.h (stack): Likewise.
1677 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
1679 * doc/xml/manual/intro.xml: Document LWG 2735 status.
1680 * include/bits/std_abs.h: Add comment about LWG 2735.
1681 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
1683 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
1686 * include/std/version [__cpp_impl_destroying_delete]
1687 (__cpp_lib_destroying_delete): Only define for C++2a and later.
1688 * libsupc++/new [__cpp_impl_destroying_delete]
1689 (__cpp_lib_destroying_delete): Likewise.
1690 (destroying_delete_t, destroying_delete): Likewise, but define even
1691 when __cpp_impl_destroying_delete is not defined.
1692 * testsuite/18_support/destroying_delete.cc: New test.
1694 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
1697 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
1698 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
1699 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
1700 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
1702 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
1705 * include/bits/fs_path.h (path::has_root_name)
1706 (path::has_root_directory, path::has_root_path)
1707 (path::has_relative_path, path::has_parent_path)
1708 (path::has_filename, path::has_stem, path::has_extension)
1709 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
1711 * src/c++17/fs_path.cc (path::has_root_name)
1712 (path::has_root_directory, path::has_root_path)
1713 (path::has_relative_path, path::has_parent_path)
1714 (path::has_filename, path::_M_find_extension): Add noexcept.
1716 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
1718 PR libstdc++/89102 (partial)
1719 * include/std/type_traits (common_type<>): Define.
1720 (common_type<T>): Derive from common_type<T, T>.
1721 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1722 Test zero-length template argument list.
1723 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1724 Test additional single argument cases.
1725 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1726 Adjust expected error.
1728 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
1731 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
1733 * include/bits/stl_stack.h (stack): Likewise.
1734 * testsuite/23_containers/priority_queue/deduction.cc: New test.
1735 * testsuite/23_containers/queue/deduction.cc: New test.
1736 * testsuite/23_containers/stack/deduction.cc: New test.
1739 * include/std/type_traits (__is_convertible_helper)
1740 (__is_convertible_helper<_From, _To, false>): Revert changes to
1741 support is_nothrow_convertible.
1742 (__is_nt_convertible_helper): New helper.
1743 (is_nothrow_convertible): Use __is_nt_convertible_helper.
1745 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
1746 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
1749 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
1750 __is_alloc_insertable_impl. Replace single type member with two
1751 members, one for each of copy and move insertable.
1752 (__is_move_insertable): New trait for internal use.
1753 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
1754 (vector::_S_nothrow_relocate(true_type)): New functions to
1755 conditionally check if __relocate_a can throw.
1756 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
1757 on __is_move_insertable.
1758 (vector::_S_do_relocate): New overloaded functions to conditionally
1760 (vector::_S_relocate): New function that dispatches to _S_do_relocate
1761 based on _S_use_relocate.
1762 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1763 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
1764 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
1767 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
1768 parameter unnamed. Add message to static assertion.
1769 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1770 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
1773 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
1776 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
1778 (__is_bitwise_relocatable): ... to this.
1779 (__relocate_a_1): Adapt.
1780 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
1781 (__is_bitwise_relocatable): ... to this.
1783 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
1786 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
1787 final component as well as from _M_pathname. Append the dot using
1788 operator+= instead of only to _M_pathname.
1789 (path::_M_find_extension): Reformat slightly.
1790 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1791 Add more test cases.
1793 2019-01-30 Ulrich Drepper <drepper@redhat.com>
1795 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
1797 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
1799 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
1800 constexpr specifiers from arg and proj.
1802 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
1803 __shared_ptr instantiations used by gcc4-compatible ABI.
1805 * include/experimental/forward_list (experimental::erase): Qualify
1807 * include/experimental/list (experimental::erase): Likewise.
1808 * include/std/forward_list (std::erase): Likewise.
1809 * include/std/list (std::erase): Likewise.
1811 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
1813 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
1814 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
1815 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
1816 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
1817 * testsuite/ext/array_allocator/26875.cc: Likewise.
1818 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
1819 * testsuite/util/replacement_memory_operators.h: Likewise.
1820 * testsuite/util/testsuite_allocator.h: Likewise.
1822 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
1823 normal mode vector, even for debug mode.
1824 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
1825 Define alias template for normal mode vector.
1827 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
1830 * config/locale/generic/c_locale.h (__convert_from_v)
1831 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1832 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1833 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
1834 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1836 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
1839 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
1840 data member with static member function _S_use_relocate().
1841 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1842 (vector::_M_default_append): Use _S_use_relocate() instead of
1845 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
1848 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
1851 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
1852 write to stderr instead of using printf.
1854 2019-01-21 Jakub Jelinek <jakub@redhat.com>
1857 * include/bits/char_traits.h (__constant_string_p,
1858 __constant_char_array_p): Use __builtin_is_constant_evaluated if
1861 2019-01-20 Ulrich Drepper <drepper@redhat.com>
1863 Implement C++20 P0600r1.
1864 * include/backward/hash_map: Add nodiscard attribute to empty.
1865 * include/backward/hash_set: Likewise.
1866 * backward/hashtable.h: Likewise.
1867 * include/bits/basic_string.h: Likewise.
1868 * include/bits/forward_list.h: Likewise.
1869 * include/bits/hashtable.h: Likewise.
1870 * include/bits/regex.h: Likewise.
1871 * include/bits/stl_deque.h: Likewise.
1872 * include/bits/stl_list.h: Likewise.
1873 * include/bits/stl_map.h: Likewise.
1874 * include/bits/stl_multimap.h: Likewise.
1875 * include/bits/stl_multiset.h: Likewise.
1876 * include/bits/stl_queue.h: Likewise.
1877 * include/bits/stl_set.h: Likewise.
1878 * include/bits/stl_stack.h: Likewise.
1879 * include/bits/stl_tree.h: Likewise.
1880 * include/bits/stl_vector.h: Likewise.
1881 * include/bits/unordered_map.h: Likewise.
1882 * include/bits/unordered_set.h: Likewise.
1883 * include/debug/array: Likewise.
1884 * include/experimental/any: Likewise.
1885 * include/experimental/bits/fs_path.h: Likewise.
1886 * include/experimental/internet: Likewise.
1887 * include/experimental/string_view: Likewise.
1888 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
1890 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
1892 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
1894 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
1896 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
1898 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
1900 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
1902 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
1904 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1905 info_fn_imps.hpp: Likewise.
1906 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1907 left_child_next_sibling_heap_.hpp: Likewise.
1908 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
1910 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
1912 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
1914 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
1916 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
1918 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
1920 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
1922 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
1923 * include/ext/pb_ds/trie_policy.hpp: Likewise.
1924 * include/ext/rope: Likewise.
1925 * include/ext/slist: Likewise.
1926 * include/ext/vstring.h: Likewise.
1927 * include/profile/array: Likewise.
1928 * include/std/array: Likewise.
1929 * include/tr1/array: Likewise.
1930 * include/tr1/hashtable.h: Likewise.
1931 * include/tr1/regex: Likewise.
1932 * include/tr2/dynamic_bitset: Likewise.
1933 * include/bits/alloc_traits.h: Add nodiscard attribute to
1935 * include/experimental/memory_resource: Likewise.
1936 * include/ext/alloc_traits.h: Likewise.
1937 * include/ext/array_allocator.h: Likewise.
1938 * include/ext/bitmap_allocator.h: Likewise.
1939 * include/ext/debug_allocator.h: Likewise.
1940 * include/ext/extptr_allocator.h: Likewise.
1941 * include/ext/mt_allocator.h: Likewise.
1942 * include/ext/new_allocator.h: Likewise.
1943 * include/ext/pool_allocator.h: Likewise.
1944 * include/ext/throw_allocator.h: Likewise.
1945 * include/std/scoped_allocator: Likewise.
1946 * libsupc++/eh_alloc.cc: Likewise.
1947 * include/std/future: Add nodiscard attribute to async.
1948 * libsupc++/new: Add nodiscard attribute to new.
1950 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
1955 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
1956 * include/bits/shared_ptr.h
1957 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
1958 (allocate_shared): Change to use new tag type.
1959 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
1960 Declare new member function.
1961 (_Sp_alloc_shared_tag): Define new type.
1962 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
1963 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
1964 _Sp_make_shared_tag::_S_eq to check type_info.
1965 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
1966 Constrain to prevent being called with _Sp_alloc_shared_tag.
1967 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
1968 Replace constructor with ...
1969 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
1970 reference parameter so address of the new object can be returned to
1971 the caller. Obtain the allocator from the tag type.
1972 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
1973 constructor with ...
1974 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
1975 to the __shared_count constructor.
1976 (__allocate_shared): Change to use new tag type.
1977 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
1979 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
1981 * src/c++17/fs_ops.cc
1982 (equivalent(const path&, const path&, error_code&))
1983 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
1984 compare files instead of relying on incomplete info returned by stat.
1987 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
1988 if the path is already absolute.
1989 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
1990 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
1993 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
1994 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
1995 of filesystem::exists.
1996 (create_directories(const path&, error_code&)): Add assertions.
1997 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1998 Add workaround for bug in _wstat for paths with trailing slash.
1999 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2000 for expected behaviour on mingw.
2001 * testsuite/experimental/filesystem/operations/create_directories.cc:
2003 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2004 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2005 not test permissions on mingw targets.
2007 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2009 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2010 constructors and open members taking wide strings. Fix patterns for
2011 filesystem::path members to match wstring_view parameters. Add
2012 exports for shared_ptr members used by directory iterators.
2013 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2014 error code parameter if the file doesn't exist.
2015 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2017 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2018 values for mingw targets, where "/" is not an absolute path. Do not
2019 test symlinks on mingw targets.
2020 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2021 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2023 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2024 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2025 that each component of the path is created.
2026 * testsuite/experimental/filesystem/operations/create_directories.cc:
2028 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2029 permissions on mingw targets.
2030 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2031 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2032 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2033 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2035 * testsuite/experimental/filesystem/operations/permissions.cc:
2037 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2038 symlinks or permissions on mingw targets.
2039 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2040 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2041 symlinks on mingw targets.
2042 * testsuite/experimental/filesystem/operations/remove_all.cc:
2044 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2045 permissions on mingw targets.
2046 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2047 test symlinks on mingw targets.
2048 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2051 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2054 Warn about unused comparisons of shared_ptr/unique_ptr
2055 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2056 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2057 <, <=, >, >= for shared_ptr.
2058 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2060 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2062 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2063 as 201611L, because P0497R0 changes are supported.
2064 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2066 * include/bits/erase_if.h [__cplusplus > 201703L]
2067 (__cpp_lib_erase_if): Only define for C++2a.
2068 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2069 (__cpp_lib_null_iterators): Define.
2070 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2071 (__cpp_lib_null_iterators): Define.
2072 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2074 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2076 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2078 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2079 changes are supported.
2080 * include/std/optional (__cpp_lib_optional): Likewise.
2081 * include/std/variant (__cpp_lib_variant): Likewise.
2082 * include/std/version [!__STRICT_ANSI__]
2083 (__cpp_lib_uncaught_exceptions): Define as long integer.
2084 [__cplusplus >= 201703L] (__cpp_lib_any)
2085 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2086 (__cpp_lib_variant): Define for C++17.
2087 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2089 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2092 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2094 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2098 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2100 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2103 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2105 * doc/xml/manual/intro.xml: Include new section.
2106 * doc/xml/manual/status_cxx2017.xml: Document more
2107 implementation-defined properties of the library.
2108 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2109 * doc/html/*: Regenerate.
2111 * include/bits/refwrap.h [__cplusplus > 201703L]
2112 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2113 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2114 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2116 (reference_wrapper::operator()): Add static assertion.
2117 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2119 * include/std/chrono (duration_values::zero(), duration_values::min())
2120 (duration_values::max()): Add noexcept.
2121 (duration::zero(), duration::min(), duration::max()): Likewise.
2122 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2123 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2124 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2126 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2128 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2130 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2131 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2133 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2136 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2137 specialization for C++17 (P0513R0, LWG 2817).
2138 * testsuite/20_util/hash/nullptr.cc: New test.
2141 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2142 pattern for std::basic_stringbuf::str().
2144 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2145 basic_ostream::operator<< patterns.
2147 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2149 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2150 test failures on targets with 32-bit time_t.
2152 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2153 * include/std/deque: Likewise.
2154 * include/std/forward_list: Likewise.
2155 * include/std/list: Likewise.
2156 * include/std/string: Likewise.
2157 * include/std/vector: Likewise.
2158 * include/std/version: Likewise.
2159 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2160 * testsuite/23_containers/deque/erasure.cc: Likewise.
2161 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2162 * testsuite/23_containers/list/erasure.cc: Likewise.
2163 * testsuite/23_containers/map/erasure.cc: Likewise.
2164 * testsuite/23_containers/set/erasure.cc: Likewise.
2165 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2166 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2167 * testsuite/23_containers/vector/erasure.cc: Likewise.
2169 * include/experimental/internet [AI_NUMERICSERV]
2170 (resolver_base::numeric_service): Define conditionally.
2171 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2173 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2176 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2177 Jonathan Wakely <jwakely@redhat.com>
2180 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2181 (GLIBCXX_3.4.26): Add new exports.
2182 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2183 correct list of sources.
2184 * include/Makefile.in: Regenerate.
2185 * include/std/ostream (operator<<(nullptr_t)): New member function.
2186 * src/c++17/ostream-inst.cc: New file.
2187 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2190 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2192 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2193 of the source file containing the caller.
2194 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2195 directories created by test.
2196 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2198 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2200 * testsuite/experimental/filesystem/iterators/
2201 recursive_directory_iterator.cc: Likewise.
2203 2019-01-10 Jakub Jelinek <jakub@redhat.com>
2205 PR tree-optimization/88775
2206 * include/bits/stl_function.h (greater<_Tp*>::operator(),
2207 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
2208 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
2209 instead of __builtin_constant_p if available. Don't bother with
2210 the pointer comparison in C++11 and earlier.
2212 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2216 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2219 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
2221 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2222 for filesystem::path. Give variables more distinctive names.
2224 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2225 member function to perform non-trivial assignment.
2226 (_Optional_payload_base::_M_move_assign): Likewise.
2227 (_Optional_payload<T, true, false, true>::operator=)
2228 (_Optional_payload<T, true, true, false>::operator=)
2229 (_Optional_payload<T, true, false, false>::operator=): Call
2230 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
2233 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
2234 test std::complex<long double> if long double format is IBM128.
2235 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
2238 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2240 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
2241 for old std::unique_ptr layout.
2242 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
2243 to become valueless. Add filesystem::path tests.
2246 * include/std/optional (_Optional_payload_base): New class template
2247 for common code hoisted from _Optional_payload specializations. Use
2248 a template for the union, to allow a partial specialization for
2249 types with non-trivial destructors. Add constructors for in-place
2250 initialization to the union.
2251 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2252 to perform non-trivial copy construction, instead of relying on
2253 non-standard copy elision in a delegating constructor.
2254 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2255 non-trivial move construction.
2256 (_Optional_payload): Derive from _Optional_payload_base and use it
2257 for everything except the non-trivial assignment operators, which are
2259 (_Optional_payload<false, C, M>): Derive from the specialization
2260 _Optional_payload<true, false, false> and add a destructor.
2261 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2262 Forward to corresponding members of _Optional_payload.
2263 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2264 Hoist common members from _Optional_base.
2265 (_Optional_base): Make all members and base class public.
2266 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2267 _Optional_base_impl.
2268 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2269 support for new std::optional layout.
2270 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2273 * include/bits/locale_conv.h: Use <> for includes not "".
2274 * include/ext/random: Likewise.
2275 * include/ext/vstring.h: Likewise.
2277 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2279 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2280 (GLIBCXX_3.4.21): Likewise.
2282 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2285 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2286 to match the one that controls whether utimbuf and utime are declared.
2288 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
2291 * include/bits/char_traits.h (char_traits::move): Do not pass null
2292 pointers to memmove.
2293 * include/bits/locale_facets.h
2294 (ctype<char>::widen(const char*, const char*, char*)): Do not
2295 pass null pointers to memcpy.
2296 (ctype<char>::narrow(const char*, const char*, char, char*)):
2298 (ctype<char>::do_widen(const char*, const char*, char*)):
2300 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2303 * doc/xml/manual/spine.xml: Update copyright years.
2304 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2305 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2306 for C++17 filesystem library.
2307 * doc/html/*: Regenerate.
2309 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2310 * config.h.in: Regenerate.
2311 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2312 alphabetically and add missing entries for copy_symlink,
2313 hard_link_count, rename, and resize_file.
2314 * configure: Regenerate.
2315 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2316 used unconditionally.
2317 * src/filesystem/ops-common.h (__gnu_posix::truncate)
2318 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2319 supports truncating to zero length.
2320 * testsuite/27_io/filesystem/operations/all.cc: New test.
2321 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2323 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
2326 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2327 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2328 * config.h.in: Regenerate.
2329 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2330 remaining std::filesystem types and functions.
2331 * configure: Regenerate.
2332 * src/c++17/Makefile.am: Add C++17 filesystem sources.
2333 * src/c++17/Makefile.in: Regenerate.
2334 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2335 here, and change name of included file.
2336 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2337 here, and change name of included file.
2338 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2339 path to dir-common.h.
2340 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2341 path to ops-common.h. Disable -Wunused-parameter warnings.
2342 (internal_file_clock): Define unconditionally.
2343 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2345 (do_copy_file, do_space): Move definitions to ops.common.h.
2346 (copy, file_size, hard_link_count, last_write_time, space): Only
2347 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2349 (last_write_time, read_symlink): Remove unused attributes from
2351 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2352 * src/filesystem/Makefile.in: Regenerate.
2353 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2354 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2355 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2356 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2357 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2358 dummy types and functions instead of using #error.
2359 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2360 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2362 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2363 (do_copy_file, do_space): Move definitions here from std-ops.cc.
2364 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2365 to account for new namespace.
2366 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2367 -lstdc++fs from dg-options.
2368 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2369 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2370 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2371 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2372 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2374 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2375 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2377 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2378 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2379 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2380 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2381 * testsuite/27_io/filesystem/operations/create_directories.cc:
2383 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2384 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2385 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2386 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2387 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2388 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2389 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2390 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2391 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2392 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2393 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2394 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2395 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2396 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2397 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2398 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2399 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2400 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2402 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2406 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2407 typeinfo and vtables less greedy.
2408 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2409 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2410 * src/c++17/Makefile.in: Regenerate.
2411 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2412 here, and change name of included file.
2413 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2414 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2416 * src/filesystem/Makefile.in: Regenerate.
2417 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2418 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2419 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2420 from dg-options and remove dg-require-filesystem-ts.
2421 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2422 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2423 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2424 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2425 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2426 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2427 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2428 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2429 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2430 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2431 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2432 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2433 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2434 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2435 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2436 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2437 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2438 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2439 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2440 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2441 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2443 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2444 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2445 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2446 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2447 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2448 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2449 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2450 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2451 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2452 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2453 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2454 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2456 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2458 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2460 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2462 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2463 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2464 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2465 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2466 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2467 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2468 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2469 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2470 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2471 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2473 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2474 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2475 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2476 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2477 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2480 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2481 Check is_trivially_copyable instead of is_scalar.
2482 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2483 contained value can throw and its type is trivially copyable then
2484 construct into a temporary variant and move from it, to provide the
2485 strong exception safety guarantee.
2486 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2488 * testsuite/20_util/variant/87431.cc: New test.
2489 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2490 conversion causes valueless state.
2493 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2494 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2495 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2496 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2497 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2499 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
2501 * include/bits/fs_fwd.h (__file_clock): Define new clock.
2502 (file_time_type): Redefine in terms of __file_clock.
2503 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2505 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2507 (internal_file_lock): New helper type for accessing __file_clock.
2508 (do_copy_file): Use internal_file_lock to convert system time to
2510 (last_write_time(const path&, error_code&)): Likewise.
2511 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2513 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
2515 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2516 for const member functions of std::basic_string.
2517 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
2519 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
2520 Make non-standard constructor private.
2521 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2523 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2524 explicit instantiations for C++17 as well as earlier dialects.
2525 * src/c++17/Makefile.am: Add new source files.
2526 * src/c++17/Makefile.in: Regenerate.
2527 * src/c++17/cow-string-inst.cc: New file defining explicit
2528 instantiations for basic_string member functions added in C++17.
2529 * src/c++17/string-inst.cc: Likewise.
2531 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2532 copy/move constructors for old std::basic_string.
2533 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2534 (basic_string::reference, basic_string::const_reference): Define
2535 as plain references for C++11 and later.
2536 (basic_string::basic_string()): Put constructor body outside
2537 preprocessor conditional groups.
2538 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2539 instead of copying it.
2540 (basic_string::basic_string(const basic_string&, const _Alloc&)):
2542 (basic_string::basic_string(basic_string&&, const _Alloc&)):
2544 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2545 cases for old basic_string.
2546 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2547 allocator-extended constructors unconditionally. Add extra members to
2548 allocator type when using old string ABI.
2549 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2551 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2553 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2554 -fno-inline added to test flags.
2556 * testsuite/21_strings/basic_string/requirements/
2557 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2559 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2560 assertion failures with old std::string ABI.
2562 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2564 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2565 functions that will only erase elements at the end.
2566 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2567 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2568 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2570 (path::_List::pop_back()): Define.
2571 (path::_List::_M_erase_from(const_iterator)): Define.
2572 (path::operator/=(const path&)): Use pop_back to remove last component
2573 and _M_erase_from to remove multiple components.
2574 (path::_M_append(basic_string_view<value_type>)): Likewise.
2575 (path::operator+=(const path&)): Likewise.
2576 (path::_M_concat(basic_string_view<value_type>)): Likewise.
2577 (path::remove_filename()): Likewise.
2578 (path::lexically_normal()): Use _List::_Impl iterators instead of
2579 path::iterator. Use pop_back to remove components from the end. Clear
2580 trailing filename, instead of using erase(const_iterator) to remove
2581 a non-final component.
2582 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
2584 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
2586 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
2587 incorrect treatment of empty filename after trailing slash.
2588 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
2590 * testsuite/21_strings/basic_string/modifiers/assign/char/
2591 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
2593 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2594 move_assign_optim.cc: Likewise.
2596 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2597 Jakub Jelinek <jakub@redhat.com>
2600 * include/experimental/memory: Replace UTF-8 quote characters.
2601 * include/std/future: Replace UTF-8 "em dash" characters.
2603 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2606 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
2607 * include/debug/forward_list: Likewise.
2608 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
2610 * include/experimental/chrono: Likewise.
2611 * include/experimental/functional: Likewise.
2612 * include/experimental/ratio: Likewise.
2613 * include/experimental/system_error: Likewise.
2614 * include/experimental/tuple: Likewise.
2615 * include/experimental/type_traits: Likewise.
2616 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
2617 * include/parallel/multiseq_selection.h: Likewise.
2620 * config/abi/pre/gnu.ver: Add missing exports.
2621 * testsuite/22_locale/collate_byname/88681.cc: New test.
2622 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
2623 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2625 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
2627 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
2628 initializer_list<value_type> and from input iterator ranges.
2629 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2631 * testsuite/experimental/string_view/element_access/char/empty.cc:
2632 Fix year range in copyright header.
2634 2019-01-02 Joel Brobecker <brobecker@adacore.com>
2636 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2637 Fix year range in copyright header.
2639 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2641 Update copyright years.
2643 Copyright (C) 2019 Free Software Foundation, Inc.
2645 Copying and distribution of this file, with or without modification,
2646 are permitted in any medium without royalty provided the copyright
2647 notice and this notice are preserved.