1 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
4 * configure: Regenerate.
5 * src/Makefile.am (stamp-debug): Also test for missing makefile.
6 * src/Makefile.in: Regenerate.
8 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
10 * include/std/array: Do not include <stdexcept>.
11 * include/std/optional: Include <exception> and
12 <bits/exception_defines.h> instead of <stdexcept>.
13 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
15 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
17 * testsuite/23_containers/map/erasure.cc: Include <string>.
18 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
20 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
21 dg-prune-output for different C++98 diagnostic.
22 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
24 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
26 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
28 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
30 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
32 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
34 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
36 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
38 * testsuite/23_containers/vector/requirements/dr438/
39 constructor_1_neg.cc: Likewise.
40 * testsuite/23_containers/vector/requirements/dr438/
41 constructor_2_neg.cc: Likewise.
42 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
44 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
46 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
47 Do not test allocator rebinding extension for C++2a.
48 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
49 dg-do directive for C++17 and C++2a.
51 * testsuite/23_containers/deque/requirements/explicit_instantiation/
52 1_c++0x.cc: Remove redundant test.
53 * testsuite/23_containers/deque/requirements/explicit_instantiation/
54 2.cc: Use target selector instead of preprocessor condition.
55 * testsuite/23_containers/deque/requirements/explicit_instantiation/
56 3.cc: Do not run test for C++2a.
57 * testsuite/23_containers/forward_list/requirements/
58 explicit_instantiation/3.cc: Likewise.
59 * testsuite/23_containers/forward_list/requirements/
60 explicit_instantiation/5.cc: Do not test allocator rebinding extension
62 * testsuite/23_containers/list/requirements/explicit_instantiation/
63 1_c++0x.cc: Remove redundant test.
64 * testsuite/23_containers/list/requirements/explicit_instantiation/
65 2.cc: Use target selector instead of preprocessor condition.
66 * testsuite/23_containers/list/requirements/explicit_instantiation/
67 3.cc: Do not run test for C++2a.
68 * testsuite/23_containers/list/requirements/explicit_instantiation/
69 5.cc: Do not test allocator rebinding extension for C++2a.
70 * testsuite/23_containers/map/requirements/explicit_instantiation/
71 1_c++0x.cc: Remove redundant test.
72 * testsuite/23_containers/map/requirements/explicit_instantiation/
74 * testsuite/23_containers/map/requirements/explicit_instantiation/
75 3.cc: Do not run test for C++2a.
76 * testsuite/23_containers/map/requirements/explicit_instantiation/
77 5.cc: Do not test allocator rebinding extension for C++2a.
78 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
79 1_c++0x.cc: Remove redundant test.
80 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
81 3.cc: Do not run test for C++2a.
82 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
83 5.cc: Do not test allocator rebinding extension for C++2a.
84 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
85 3.cc: Do not run test for C++2a.
86 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
87 5.cc: Do not test allocator rebinding extension for C++2a.
88 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
89 Do not run test for C++2a.
90 * testsuite/23_containers/set/requirements/explicit_instantiation/
91 1_c++0x.cc: Remove redundant test.
92 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
93 Do not test allocator rebinding extension for C++2a.
94 * testsuite/23_containers/unordered_map/requirements/
95 explicit_instantiation/3.cc: Likewise.
96 * testsuite/23_containers/unordered_map/requirements/
97 explicit_instantiation/5.cc: Do not test allocator rebinding extension
99 * testsuite/23_containers/unordered_multimap/requirements/
100 explicit_instantiation/3.cc: Do not run test for C++2a.
101 * testsuite/23_containers/unordered_multimap/requirements/
102 explicit_instantiation/5.cc: Do not test allocator rebinding extension
104 * testsuite/23_containers/unordered_multiset/requirements/
105 explicit_instantiation/3.cc: Do not run test for C++2a.
106 * testsuite/23_containers/unordered_multiset/requirements/
107 explicit_instantiation/5.cc: Do not test allocator rebinding extension
109 * testsuite/23_containers/unordered_set/requirements/
110 explicit_instantiation/3.cc: Do not run test for C++2a.
111 * testsuite/23_containers/unordered_set/requirements/
112 explicit_instantiation/5.cc: Do not test allocator rebinding extension
114 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
115 2.cc: Remove redundant test.
116 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
117 3.cc: Do not run test for C++2a.
118 * testsuite/23_containers/vector/requirements/explicit_instantiation/
121 * include/std/type_traits (is_empty, is_polymorphic, is_final)
122 (is_abstract, is_aggregate): Remove static_assert.
123 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
125 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
126 missing -std=gnu++17 option.
127 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
128 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
129 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
132 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
133 * testsuite/18_support/set_unexpected.cc: Likewise.
134 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
136 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
137 function to be valid in C++11.
138 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
139 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
140 include Library Fundamentals or Networking headers in C++11 mode.
141 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
143 * include/std/tuple (_TC): Replace with _TupleConstraints.
144 (_TupleConstraints): New helper for SFINAE constraints, with more
145 expressive member functions to reduce duplication when used.
146 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
147 (tuple::_TCC): Replace dummy type parameter with bool non-type
148 parameter that can be used to check the pack size.
149 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
150 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
151 checking constraints in constructors.
152 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
154 (tuple::tuple): Use new helpers to reduce repitition in constraints.
155 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
156 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
157 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
158 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
159 constraints in constructors.
160 (tuple::__is_alloc_arg()): New SFINAE helpers.
161 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
163 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
164 * testsuite/20_util/tuple/cons/90700.cc: New test.
165 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
166 to meet new constraint on allocator-extended default constructor.
168 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
170 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
171 * include/bits/stl_multimap.h (multimap): Likewise.
173 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
175 Rename variables and cleanup comments.
176 * include/bits/hashtable_policy.h
177 * include/bits/hashtable.h
179 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
181 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
182 Fix bgcolor for P0340R3.
183 * doc/html/*: Regenerate.
186 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
187 <experimental/memory_resource>.
188 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
189 P0339R6, P0340R3, P1164R1 and P1357R1.
190 * doc/html/*: Regenerate.
192 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
193 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
194 allocator::value_type assertion for C++2a.
195 * include/bits/hashtable.h: Likewise.
196 * include/bits/stl_deque.h: Likewise.
197 * include/bits/stl_list.h: Likewise.
198 * include/bits/stl_map.h: Likewise.
199 * include/bits/stl_multimap.h: Likewise.
200 * include/bits/stl_multiset.h: Likewise.
201 * include/bits/stl_set.h: Likewise.
202 * include/bits/stl_vector.h: Likewise.
203 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
204 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
205 * testsuite/23_containers/list/48101-3_neg.cc: New test.
206 * testsuite/23_containers/map/48101-3_neg.cc: New test.
207 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
208 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
209 * testsuite/23_containers/set/48101-3_neg.cc: New test.
210 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
211 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
212 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
213 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
214 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
216 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
218 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
220 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
222 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
224 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
226 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
228 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
230 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
233 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
234 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
235 * libsupc++/eh_term_handler.h: New header defining
236 _GLIBCXX_DEFAULT_TERM_HANDLER.
237 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
238 (set_terminate): Restore default handler when argument is null.
239 (set_unexpected): Likewise.
240 * testsuite/18_support/set_terminate.cc: New test.
241 * testsuite/18_support/set_unexpected.cc: New test.
243 * include/backward/hashtable.h (size_t, ptrdiff_t)
244 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
245 (distance, vector, pair, __iterator_category): Remove
246 using-declarations that add these names to namespace __gnu_cxx.
247 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
248 * include/ext/debug_allocator.h (size_t): Likewise.
249 * include/ext/functional (size_t, unary_function, binary_function)
250 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
252 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
253 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
254 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
255 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
256 * include/ext/numeric (iota): Fix outdated comment.
257 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
258 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
259 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
260 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
261 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
263 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
264 (allocator, __true_type, __false_type): Likewise.
266 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
269 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
270 New helpers for checking preconditions in traits.
271 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
272 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
273 (is_destructible, is_nothrow_destructible, is_constructible)
274 (is_default_constructible, is_copy_constructible)
275 (is_move_constructible, is_nothrow_default_constructible)
276 (is_nothrow_constructible, is_nothrow_copy_constructible)
277 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
278 (is_nothrow_assignable, is_nothrow_copy_assignable)
279 (is_nothrow_move_assignable, is_trivially_constructible)
280 (is_trivially_copy_constructible, is_trivially_move_constructible)
281 is_trivially_assignable, is_trivially_copy_assignable)
282 (is_trivially_move_assignable, is_trivially_destructible)
283 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
284 (is_invocable_r, is_nothrow_invocable)
285 (has_unique_object_representations, is_aggregate): Add static_asserts
286 to make sure that type traits are not misused with incomplete types.
287 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
288 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
289 base characteristics without assertions that can be reused in other
291 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
292 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
294 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
295 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
296 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
297 * testsuite/20_util/is_class/value.cc: Check incomplete type.
298 * testsuite/20_util/is_function/value.cc: Likewise.
299 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
300 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
302 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
303 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
304 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
305 * testsuite/20_util/is_union/value.cc: Likewise.
306 * testsuite/20_util/is_void/value.cc: Likewise.
307 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
309 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
311 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
312 Add new private member function.
313 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
314 (random_device::_M_init_pretr1(const string&)): Call new private
315 member with string data.
316 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
318 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
319 test using COW strings.
320 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
321 a value from the device.
322 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
323 Fix typo in token string.
325 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
327 LWG2788 basic_string spurious use of a default constructible allocator
328 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
329 (basic_string::_M_replace_dispatch): Construct temporary string with
330 the current allocator.
331 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
332 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
334 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
336 * doc/xml/manual/diagnostics.xml: Update list of headers that define
338 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
339 section about new/delete overloads. Improve section on verbose
341 * doc/html/*: Regenerate.
343 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
344 P0811R3. Change status of P1353R0.
345 * doc/html/*: Regenerate.
347 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
348 documentation of implementation-defined types for [thread.req.native].
349 * doc/xml/manual/status_cxx2017.xml: Update documentation of
350 implementation-defined strings for [variant.bad.access]. Fix typo in
351 documentation of implementation-defined support for [fs.conform.9945].
352 * doc/html/*: Regenerate.
354 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
357 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
358 that fails on mingw-w64.
361 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
362 (status(const path&, error_code&)): Use parent_path() to remove
364 (symlink_status(const path&, error_code&)): Duplicate workaround for
365 bug in _wstat for paths with trailing slash.
366 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
368 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
369 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
371 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
372 once instead of building it iteratively.
374 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
376 PR libstdc++/85494 use rdseed and rand_s in std::random_device
377 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
378 the assembler supports rdseed.
379 * config.h.in: Regenerate.
380 * configure: Regenerate.
381 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
382 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
383 * doc/html/*: Regenerate.
384 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
385 * include/bits/random.h (random_device::random_device()): Always call
386 _M_init rather than _M_init_pretr1.
387 (random_device::random_device(const string&)): Likewise.
388 (random_device::operator()()): Always call _M_getval().
389 (random_device::_M_file): Replace first member of union with an
390 anonymous struct, with _M_file as its first member.
391 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
392 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
393 (USE_MT19937): Define if none of the above are defined.
394 (USE_POSIX_FILE_IO): Define.
395 (_M_strtoul): Remove.
396 [USE_RDSEED] (__x86_rdseed): Define new function.
397 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
398 (random_device::_M_init(const string&)): Initialize new union members.
399 Add support for "rdseed" and "rand_s" tokens. Decide what the
400 "default" token does according to which USE_* macros are defined.
401 [USE_POSIX_FILE_IO]: Store a file descriptor.
402 [USE_MT19937]: Forward to _M_init_pretr1 instead.
403 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
404 code from _M_strtoul.
405 [!USE_MT19937]: Call _M_init, transforming the old default token or
406 numeric tokens to "default".
407 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
408 (random_device::_M_getval()): Use new union members to obtain a
409 random number from the stored function pointer or file descriptor.
410 [USE_MT19937]: Obtain a value from the mt19937 engine.
411 (random_device::_M_getval_pretr1()): Call _M_getval().
412 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
414 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
415 * testsuite/26_numerics/random/random_device/85494.cc: New test.
417 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
420 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
421 _M_split_cmpts() for a path with multiple components.
422 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
423 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
424 components and reserve space in vector. Return early when there is
426 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
427 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
429 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
430 form of std::equals for C++11 compatibility.
432 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
434 * doc/xml/manual/appendix_contributing.xml: Update pointer to
435 C++ standard at ansi.org.
437 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
439 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
440 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
443 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
444 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
446 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
448 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
450 * testsuite/20_util/function_objects/invoke/3.cc: New test.
451 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
452 "compile" test to "run".
454 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
455 * doc/html/*: Regenerate.
456 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
457 rvalue aliasing constructor.
458 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
459 (reinterpret_pointer_cast): Add overloads taking rvalues.
460 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
461 Add rvalue aliasing constructor.
462 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
463 "run" and check return values as well as types.
464 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
465 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
466 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
467 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
470 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
471 * doc/xml/manual/intro.xml: Likewise.
472 * include/std/future (__create_task_state): Add default arguments
473 to make providing an allocator optional.
474 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
475 instead of delegating to another constructor.
476 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
477 define allocator-extended constructors for C++17 and later.
478 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
480 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
481 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
482 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
484 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
486 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
487 Don't run the libstdc++/83237 part on simulator targets.
489 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
491 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
493 * doc/html/*: Regenerate.
495 * include/experimental/any (__any_caster): Use RTTI if comparing
496 addresses fails, to support non-unique addresses in shared libraries.
497 * include/std/any (__any_caster): Likewise.
500 * include/experimental/any (__any_caster): Constrain to only be
501 callable for object types. Use remove_cv_t instead of decay_t.
502 If the type decays or isn't copy constructible, compare the manager
503 function to a dummy specialization.
504 (__any_caster): Add overload constrained for non-object types.
505 (any::_Manager_internal<_Op>): Add dummy specialization.
506 * testsuite/experimental/any/misc/any_cast.cc: Test function types
509 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
512 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
513 reversed arguments to uninitialized_copy_n.
514 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
515 is unchanged by copy assignment.
516 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
517 compare path components.
520 * include/experimental/memory_resource: Add system header pragma and
521 do not define anything unless compiled as C++14 or later.
522 (__resource_adaptor_common::__guaranteed_alignment): Remove.
523 (__resource_adaptor_imp::do_allocate): If the requested alignment
524 is a fundamental alignment then either allocate directly from _M_alloc
525 or call the new _M_allocate function.
526 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
527 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
528 of the allocator rebound to a POD type with the specified alignment.
529 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
530 * testsuite/experimental/memory_resource/new_delete_resource.cc:
531 Adjust expected allocation sizes.
532 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
533 xfail for Solaris x86.
535 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
537 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
538 * include/pstl/execution_defs.h (__enable_if_execution_policy):
539 Use std::__remove_cvref_t when building with GCC.
541 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
544 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
545 Use "additional_flags" to pass -ltbb to v3_target_compile command.
546 Use check_v3_target_prop_cached to cache the result of the test.
548 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
550 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
553 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
554 Changed v3_target_compile check from preprocess to executable.
555 Added "-ltbb" to v3_target_compile flags.
557 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
559 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
560 Add check for Thread Building Blocks 2018 or later.
562 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
564 * testsuite/experimental/names.cc: Only include Networking TS headers
565 on targets with the necessary Gthreads support.
567 2019-05-20 Marek Polacek <polacek@redhat.com>
569 CWG 2094 - volatile scalars are trivially copyable.
571 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
572 result for volatile int.
574 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
576 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
577 * testsuite/experimental/names.cc: Include <experimental/filesystem>
580 PR c++/90532 Ensure __is_constructible(T[]) is false
581 * include/std/type_traits (__do_is_default_constructible_impl)
582 (__is_default_constructible_atom, __is_default_constructible_safe):
584 (is_default_constructible): Use is_constructible.
585 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
586 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
587 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
588 * testsuite/20_util/is_trivially_default_constructible/value.cc:
591 2019-05-20 Pádraig Brady <pbrady@fb.com>
593 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
594 to the deallocator with -fsized-deallocation.
596 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
598 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
599 test by passing correct alignment to deallocate function.
601 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
604 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
605 Raise exception if unique_ptr tuple member has unknown structure.
606 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
607 Adjust worker to support new __uniq_ptr_data base class. Do not
608 assume field called _M_head_impl is the first tuple element.
610 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
612 * include/bits/stl_deque.h
613 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
614 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
615 (_Deque_base::_Deque_impl_data): New.
616 (_Deque_base::_Deque_impl): Inherit latter.
617 (_Deque_base::_Deque_impl::_M_swap_data): Move...
618 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
619 (_Deque_base::_Deque_impl()): Add noexcept qualification.
620 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
621 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
622 (deque<>::deque()): Default.
623 (deque<>::deque(deque&&)): Default.
624 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
625 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
626 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
627 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
629 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
630 (deque<>::resize(size_type, const value_type&)): Share a single
632 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
634 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
635 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
636 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
637 * testsuite/23_containers/deque/allocator/default_init.cc: New.
639 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
642 * include/std/variant (holds_alternative, get, get_if): Improve
643 static assertion messages.
644 (bad_variant_access::bad_variant_access()): Change default message.
645 (__throw_bad_variant_access(bool)): New overload.
646 (get): Use new overload.
647 (visit, visit<R>): Improve exception message.
649 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
650 targets. Add more cases from P0608R3.
651 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
653 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
654 * include/experimental/type_traits (is_detected_exact)
655 (is_detected_exact_v): Likewise.
656 * include/pstl/execution_defs.h (is_execution_policy)
657 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
658 * include/pstl/execution_impl.h (__policy_traits): Likewise.
659 * testsuite/17_intro/names.cc: Check for more non-reserved names.
660 * testsuite/experimental/names.cc: New test.
663 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
664 assertions from the destructor.
665 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
666 Move static_assert for hash function to here.
667 (_Hash_table_base::_M_equals): Move static_assert for equality
669 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
671 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
672 the value directly instead of calling _S_value.
673 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
674 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
675 _S_key(_Const_Link_type).
676 * testsuite/23_containers/set/85965.cc: Check construction,
677 destruction, assignment and size() do not trigger the assertions.
678 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
679 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
681 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
682 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
683 * testsuite/23_containers/set/48101_neg.cc: Likewise.
684 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
685 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
686 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
687 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
689 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
690 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
693 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
695 * doc/html/*: Regenerate.
696 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
697 of decay_t (P0777R1).
699 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
701 Move from state of allocators (LWG2593)
702 * include/bits/stl_deque.h
703 (_Deque_base(_Deque_base&&, false_type)): Remove.
704 (_Deque_base(_Deque_base&&, true_type)): Remove.
705 (_Deque_base(_Deque_base&&)): Adapt.
706 (_Deque_base::_M_move_impl()): Remove.
707 * testsuite/util/testsuite_allocator.h
708 (propagating_allocator(propagating_allocator&&)): Preserve move from
710 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
712 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
714 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
715 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
716 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
718 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
720 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
721 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
723 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
725 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
727 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
729 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
731 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
733 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
735 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
738 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
740 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
741 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
743 * include/std/variant (__overload_set): Remove.
745 (_Build_FUN): New class template to define a single FUN overload,
746 with specializations to prevent unwanted conversions, as per P0608R3.
747 (_Build_FUNs): New class template to build an overload set of FUN.
748 (_FUN_type): New alias template to perform overload resolution.
749 (__accepted_type): Use integer_constant base for failure case. Use
750 _FUN_type for successful case.
751 (variant::__accepted_index): Use _Tp instead of _Tp&&.
752 (variant::variant(_Tp&&)): Likewise.
753 (variant::operator=(_Tp&&)): Likewise.
755 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
756 Replace raw visitation with a runtime check for the valueless state
757 and a non-raw visitor.
758 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
759 (variant::index()): Remove branch.
760 (variant::swap(variant&)): Use valueless_by_exception() instead of
761 comparing the index to variant_npos, and add likelihood attribute.
763 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
764 (_Hashtable_base::_Equal_hash_code): Define new class template.
765 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
768 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
769 Replace with _M_get non-static member function.
770 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
772 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
773 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
775 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
776 _S_get accessors for members in EBO helpers.
777 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
778 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
780 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
782 (_Hashtable_base::_M_eq()): Remove non-const overload.
784 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
786 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
788 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
790 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
793 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
795 * config/os/solaris/solaris2.10: Move to ...
796 * config/os/solaris: ... this.
797 * configure.host (os_include_dir): Adapt.
798 (abi_baseline_pair): Remove Solaris 10 handling.
799 * config/abi/post/i386-solaris2.10: Remove.
800 * config/abi/post/sparc-solaris2.10: Remove.
801 * config/abi/post/i386-solaris2.11: Rename to ...
802 * config/abi/post/i386-solaris: ... this.
803 * config/abi/post/sparc-solaris2.11: Rename to ...
804 * config/abi/post/sparc-solaris: ... this.
806 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
809 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
812 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
814 * include/std/variant (__visit_with_index): Remove typedef.
815 (__deduce_visit_result): New tag type.
816 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
817 visitation of possibly-valueless variants, forwarding to __do_visit
818 with the relevant tag type.
819 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
820 and make lambda return void.
821 (__variant_construct): Likewise.
822 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
823 __raw_idx_visit and make lambda return void.
824 (_Multi_array::__untag_result): Add metafunction to check the function
825 pointer type for a tag type that dictates the kind of visitation.
826 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
827 Use decltype(auto) instead of tagged function pointer type.
828 (__gen_vtable_impl): Remove bool non-type parameter and unused
829 _Variant_tuple parameter.
830 (__gen_vtable_impl::__visit_invoke_impl): Remove.
831 (__gen_vtable_impl::__do_visit_invoke): Remove.
832 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
833 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
834 for the visit<R> case, rather than dispatching to separate functions.
835 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
837 (variant::swap): Likewise.
838 (__do_visit): Replace two non-type template parameters with a single
839 type parameter, so that the caller must specify the visitor's return
840 type (or one of the tag types).
841 (visit): Deduce a return type from the visitor and use the
842 __deduce_visit_result tag to enforce that all overloads return the
844 (visit<R>): Call __do_visit<R> with explicit result type.
845 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
848 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
850 nonesuch is insufficiently useless (lwg2996)
851 * include/std/type_traits (struct __nonesuch): Added private base
852 class to make __nonesuch not an aggregate and removed deleted default
854 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
855 (operator=(const pair&)): Use __nonesuch instead of
856 __nonesuch_no_braces.
857 (operator=(pair&&)): Likewise
858 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
859 of __nonesuch_no_braces.
860 (operator=(tuple&&)): Likewise
861 * include/experimental/type_traits (struct nonesuch): Added private
862 base class to make nonesuch not an aggregate and removed deleted
864 * testsuite/20_util/nonesuch/nonesuch.cc: New.
865 * testsuite/experimental/type_traits/nonesuch.cc: New.
867 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
869 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
870 (_Function_handler): Remove partial specializations for void return
871 types and pointers to member.
872 (_Function_handler::_M_manager): Adapt to removal of
873 _Simple_type_wrapper.
874 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
875 * include/std/functional (_Bind_result::__enable_if_void)
876 (_Bind_result::__disable_if_void): Remove sfinae helpers.
877 (_Bind_result::__call): Use __invoke_r and remove overloads for void
879 * include/std/future (__future_base::_Task_state::_M_run)
880 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
881 change return type of lambda expressions.
883 * include/bits/invoke.h (__invoke_r): Define new function implementing
884 the INVOKE<R> pseudo-function.
885 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
886 * testsuite/20_util/function_objects/invoke/2.cc: New test.
888 * include/std/type_traits (__is_nt_convertible_helper): Define it
889 unconditionally, not only for C++20.
890 (__is_nothrow_convertible): Define internal trait for use in C++11.
891 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
892 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
893 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
894 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
895 that has nothrow explicit conversion but potentially-throwing implicit
897 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
898 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
899 function to only consider implicit conversions.
900 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
902 * include/std/iterator: Include <iosfwd> instead of <istream> and
905 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
906 Remove unused, non-standard function.
908 * include/bits/regex.h (match_results::max_size()): Adjust return
909 value to account for prefix/suffix/unmatched subs.
910 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
911 reset the contained sub matches.
912 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
913 function to set result state following a failed match.
914 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
915 sub_match states after _M_resize. Use _M_establish_failed_match.
918 * include/std/thread (thread::_State_impl, thread::_S_make_state):
919 Replace single _Callable parameter with variadic _Args pack, to
920 forward them directly to the tuple of decayed copies.
921 * testsuite/30_threads/thread/cons/69724.cc: New test.
923 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
925 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
926 * include/bits/basic_string.h: (operator=(const basic_string&):
927 Move allocator decision to assign.
928 (assign(const basic_string&)): Move allocator decision here.
929 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
931 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
934 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
936 * testsuite/util/testsuite_allocator.h (memory_resource)
937 (default_resource_mgr): Fix indentation.
939 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
940 Use operator-> to access raw pointer member.
941 * testsuite/23_containers/vector/59829.cc: Likewise.
942 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
943 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
944 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
946 (PointerBase, PointerBase_void): Derive from NullablePointer and use
947 its constructors and equality operators. Change converting
948 constructors to use operator-> to access private member of the other
950 (PointerBase_void::operator->()): Add, for access to private member.
951 (operator-(PointerBase, PointerBase)): Change to hidden friend.
952 (operator==(PointerBase, PointerBase)): Remove.
953 (operator!=(PointerBase, PointerBase)): Remove.
955 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
956 not assume field called _M_head_impl is the first tuple element.
957 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
958 implementation more accurate.
959 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
960 empty pointer type and non-empty deleter.
962 LWG 2899 - Make is_move_constructible correct for unique_ptr
963 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
964 move assignment operator.
965 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
966 (__uniq_ptr_data): New class template with conditionally deleted
968 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
969 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
970 constructor and move assignment operator as defaulted.
971 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
972 __uniq_ptr_impl::release().
973 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
974 to __uniq_ptr_impl::reset(pointer).
975 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
976 Check for new __uniq_ptr_data type.
977 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
979 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
981 PR libstdc++/90454.cc path construction from void*
982 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
983 pointers to void are rejected as well as void.
984 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
985 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
987 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
989 * doc/xml/manual/policy_data_structures.xml: Comment out stray
990 <remark> elements. Fix formatting of bibliography references.
992 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
994 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
996 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
998 Remove Profile Mode, deprecated since 7.1.0
999 * doc/Makefile.am: Remove XML file for profile mode docs.
1000 * doc/Makefile.in: Regenerate.
1001 * doc/xml/authors.xml: Remove authors of profile mode docs.
1002 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1004 * doc/xml/manual/debug.xml: Likewise.
1005 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1006 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1007 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1008 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1010 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1012 * doc/html/*: Regenerate.
1013 * include/Makefile.am: Remove profile mode headers.
1014 * include/Makefile.in: Regenerate.
1015 * include/bits/c++config (std::__profile): Remove namespace.
1016 [_GLIBCXX_PROFILE]: Remove checks for macro.
1017 * include/profile/array: Remove.
1018 * include/profile/base.h: Remove.
1019 * include/profile/bitset: Remove.
1020 * include/profile/deque: Remove.
1021 * include/profile/forward_list: Remove.
1022 * include/profile/impl/profiler.h: Remove.
1023 * include/profile/impl/profiler_algos.h: Remove.
1024 * include/profile/impl/profiler_container_size.h: Remove.
1025 * include/profile/impl/profiler_hash_func.h: Remove.
1026 * include/profile/impl/profiler_hashtable_size.h: Remove.
1027 * include/profile/impl/profiler_list_to_slist.h: Remove.
1028 * include/profile/impl/profiler_list_to_vector.h: Remove.
1029 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1030 * include/profile/impl/profiler_node.h: Remove.
1031 * include/profile/impl/profiler_state.h: Remove.
1032 * include/profile/impl/profiler_trace.h: Remove.
1033 * include/profile/impl/profiler_vector_size.h: Remove.
1034 * include/profile/impl/profiler_vector_to_list.h: Remove.
1035 * include/profile/iterator_tracker.h: Remove.
1036 * include/profile/list: Remove.
1037 * include/profile/map: Remove.
1038 * include/profile/map.h: Remove.
1039 * include/profile/multimap.h: Remove.
1040 * include/profile/multiset.h: Remove.
1041 * include/profile/ordered_base.h: Remove.
1042 * include/profile/set: Remove.
1043 * include/profile/set.h: Remove.
1044 * include/profile/unordered_base.h: Remove.
1045 * include/profile/unordered_map: Remove.
1046 * include/profile/unordered_set: Remove.
1047 * include/profile/vector: Remove.
1048 * scripts/run_doxygen: Do not process profile mode headers.
1049 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1051 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1052 Remove dg-skip-if for profile mode.
1053 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1054 preprocessor check for profile mode.
1055 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1056 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1058 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1060 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1061 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1062 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1063 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1064 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1066 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1068 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1070 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1072 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1073 preprocessor check for profile mode.
1074 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1076 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1077 Remove dg-skip-if for profile mode.
1078 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1079 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1080 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1081 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1082 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1083 * testsuite/Makefile.am: Remove profile_flags variable and
1084 * testsuite/Makefile.am: Remove profile_flags variable and
1085 check-profile target.
1086 * testsuite/Makefile.in: Regenerate.
1087 * testsuite/ext/profile/all.cc: Remove.
1088 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1089 * testsuite/ext/profile/profiler_algos.cc: Remove.
1090 * testsuite/ext/profile/replace_new.cc: Remove.
1091 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1092 preprocessor check for profile mode.
1093 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1094 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1095 (check_v3_target_normal_mode): Do not check for profile mode macro.
1096 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1098 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1099 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1100 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1101 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1102 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1103 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1104 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1105 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1106 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1107 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1109 Remove array_allocator extension, deprecated since 4.9.0
1110 * doc/xml/manual/allocator.xml: Remove documentation for
1112 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1113 * doc/xml/manual/using.xml: Remove header from documentation.
1114 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1115 * include/Makefile.in: Regenerate.
1116 * include/ext/array_allocator.h: Remove.
1117 * include/precompiled/extc++.h: Do not include removed header.
1118 * testsuite/ext/array_allocator/1.cc: Remove.
1119 * testsuite/ext/array_allocator/2.cc: Remove.
1120 * testsuite/ext/array_allocator/26875.cc: Remove.
1121 * testsuite/ext/array_allocator/3.cc: Remove.
1122 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1123 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1124 * testsuite/ext/array_allocator/check_new.cc: Remove.
1125 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1126 * testsuite/ext/headers.cc: Do not include removed header.
1128 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1130 * include/bits/stl_bvector.h
1131 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1133 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1135 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1137 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1139 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1141 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1143 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1145 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1147 (_Bit_iterator::operator-(difference_type)): Likewise.
1148 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1149 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1151 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1152 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1154 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1157 * testsuite/util/thread/all.h: Do not use remove_pointer for
1158 std::thread::native_handle_type.
1161 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1162 (_Variant_storage<true, Types...>::_M_reset()))
1163 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1164 (__get_storage): Likewise.
1165 (variant): Add noexcept to friend declarations for __get and
1169 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1170 Use _Require for constraints.
1171 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1173 (__uniq_ptr_hash): New base class with conditionally-disabled call
1175 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1176 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1177 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1179 * include/bits/shared_ptr.h: Improve docs.
1180 * include/bits/shared_ptr_base.h: Likewise.
1181 * include/bits/stl_uninitialized.h: Likewise.
1182 * include/bits/unique_ptr.h: Likewise.
1183 * libsupc++/new: Likewise.
1185 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1187 * include/bits/stl_deque.h
1188 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1190 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1192 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1194 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1196 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1198 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1200 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1202 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1204 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1207 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1208 (test01): Reserve for number of insertions to avoid rehash during test.
1209 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1211 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1216 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1218 * include/experimental/bits/fs_path.h: Improve docs.
1219 * include/experimental/bits/net.h: Fix wrong header name in comment.
1220 Do not document implementation details.
1221 * include/experimental/netfwd: Fix doxygen grouping.
1223 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1225 * include/bits/stl_pair.h: Improve docs.
1226 * include/std/tuple: Likewise.
1228 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1230 * include/std/chrono: Improve docs.
1231 * include/std/ratio: Do not document implementation details.
1232 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1234 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1237 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1238 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1239 (__duration_common_type): New helper.
1240 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1241 __duration_common_type.
1242 (__timepoint_common_type_wrapper): Replace with ...
1243 (__timepoint_common_type): New helper.
1244 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1245 Use __time_point_common_type.
1246 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1247 (__common_type_impl): If either argument is transformed by decay,
1248 use the common_type of the decayed types.
1249 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1250 decayed, use __do_common_type_impl to get the common_type.
1251 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1252 (__do_member_type_wrapper, __member_type_wrapper)
1253 (__expanded_common_type_wrapper): Remove.
1254 (__common_type_pack, __common_type_fold): New helpers.
1255 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1256 __member_type_wrapper and __expanded_common_type_wrapper.
1257 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1258 Test zero-length template argument list.
1259 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1260 Test single argument cases and argument types that should decay.
1261 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1262 Adjust expected error.
1263 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1265 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1266 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1267 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1269 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1271 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1273 Make allocator propagation more consistent for
1274 operator+(basic_string) (P1165R1)
1275 * include/bits/basic_string.h
1276 (operator+(basic_string&&, basic_string&&): Changed resulting
1277 allocator to always be the one from the first parameter.
1278 * include/bits/basic_string.tcc
1279 (operator+(const _CharT*, const basic_string&)): Changed
1280 resulting allocator to be SOCCC on the second parameter's allocator.
1281 (operator+(_CharT, const basic_string&)): Likewise.
1282 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1284 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1287 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1289 * include/bits/regex.h: Improve docs.
1290 * include/bits/regex.tcc: Do not document implementation details.
1292 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1294 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1296 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1297 Add type printer for container types in std::__debug namespace.
1298 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1299 (gdb-tests): Use distinct parameters for the type of test and use of
1301 (gdb-test): Check for regex test even if 'whatis' test.
1302 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1304 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1305 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1306 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1307 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1308 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1309 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1310 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1312 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1314 * include/std/system_error (error_category): Fix comment.
1317 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1318 argument is an empty path.
1319 (absolute(const path&, error_code&)): Use invalid_argument as error
1320 code instead of no_such_file_or_directory.
1321 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1322 of non-existent paths and empty paths with both overloads of absolute.
1324 * include/std/system_error (error_category, error_code)
1325 (error_condition): Improve docs.
1326 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1327 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1328 to class documentation. Suppress documentation for implementation
1330 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1331 Suppress documentation for implementation details.
1333 * include/std/system_error (error_code): Remove friend declaration
1334 for hash<error_code>.
1335 (hash<error_code>::operator()): Use public member functions to access
1337 (hash<error_condition>::operator()): Use address of category, not
1338 its object representation.
1339 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1340 Use public member functions to access value and category.
1341 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1343 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1345 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1346 * include/bits/hashtable_policy.h
1347 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1348 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1349 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1350 smaller than input value rather than always greater. Preserve
1351 _M_next_resize if called with 0 input. Use __builtin_floorl.
1352 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1353 elements + number of insertions is greater than _M_next_resize. Start
1354 with 11 buckets if not told otherwise. Use __builtin_floorl.
1355 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1356 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1357 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1358 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1359 told otherwise. Use __builtin_floorl.
1360 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1361 to also validate _Power2_rehash_policy.
1362 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1365 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1368 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1372 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1373 overflow warning with -Wpedantic -Wsystem-headers.
1375 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1378 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1379 * include/bits/move.h (swap): Remove extra parentheses.
1381 * include/experimental/bits/lfts_config.h: Improve doc markup.
1382 * include/experimental/optional: Improve docs.
1383 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1384 (__constexpr_addressof): Remove.
1385 (optional::operator->()): Use std::__addressof().
1386 * include/std/optional (optional::operator->()): Adjust whitespace.
1387 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1388 that operator-> is still constexpr with overloaded operator&. Change
1389 to compile-only test.
1390 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1393 * include/bits/shared_ptr.h: Improve docs.
1394 * include/bits/shared_ptr_atomic.h: Likewise.
1395 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1397 * include/bits/basic_string.h: Fix iterator/index confusion in
1399 * include/bits/range_access.h: Fix Doxygen warnings.
1400 * include/bits/refwrap.h: Do not document implementation details.
1401 (ref, cref): Group docs with reference_wrapper.
1402 * include/std/fstream: Fix Doxygen markup.
1403 * libsupc++/initializer_list (begin, end): Group docs with
1406 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1408 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1409 * include/std/mutex: Likewise.
1410 * include/std/shared_mutex: Likewise.
1412 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1413 * include/bits/fs_fwd.h: Likewise.
1414 * include/bits/fs_ops.h: Likewise.
1415 * include/bits/fs_path.h: Likewise.
1416 * include/std/filesystem: Likewise.
1418 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1419 * include/experimental/buffer: Likewise.
1420 * include/experimental/executor: Likewise.
1421 * include/experimental/internet: Likewise.
1422 * include/experimental/io_context: Likewise.
1423 * include/experimental/net: Likewise.
1424 * include/experimental/netfwd: Likewise.
1425 * include/experimental/socket: Likewise.
1426 * include/experimental/timer: Likewise.
1428 * doc/doxygen/doxygroups.cc: Move description of experimental group
1430 * include/experimental/algorithm: Add to libfund-ts doc group.
1431 * include/experimental/any: Likewise. Do not document implementation
1433 * include/experimental/array: Add to libfund-ts doc group.
1434 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1435 for Library Fundamentals.
1436 * include/experimental/chrono: Add to libfund-ts doc group.
1437 * include/experimental/deque: Likewise.
1438 * include/experimental/forward_list: Likewise.
1439 * include/experimental/functional: Likewise.
1440 * include/experimental/iterator: Likewise.
1441 * include/experimental/list: Likewise.
1442 * include/experimental/map: Likewise.
1443 * include/experimental/memory: Likewise.
1444 * include/experimental/memory_resource: Likewise. Improve docs.
1446 * include/experimental/numeric: Add to libfund-ts doc group.
1447 * include/experimental/optional: Likewise.
1448 * include/experimental/propagate_const: Likewise.
1449 * include/experimental/random: Likewise.
1450 * include/experimental/ratio: Likewise.
1451 * include/experimental/regex: Likewise.
1452 * include/experimental/set: Likewise.
1453 * include/experimental/source_location: Likewise.
1454 * include/experimental/string: Likewise.
1455 * include/experimental/string_view: Likewise.
1456 * include/experimental/system_error: Likewise.
1457 * include/experimental/tuple: Likewise.
1458 * include/experimental/type_traits: Likewise.
1459 * include/experimental/unordered_map: Likewise.
1460 * include/experimental/unordered_set: Likewise.
1461 * include/experimental/utility: Likewise.
1462 * include/experimental/vector: Likewise.
1463 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1464 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1465 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1467 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1468 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1469 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1470 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1471 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1473 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1474 * include/experimental/bits/fs_fwd.h: Improve docs.
1475 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1476 * include/experimental/bits/fs_path.h: Likewise.
1477 (path, filesystem_error, u8path): Improve docs.
1478 * include/experimental/filesystem: Link to docs for TS.
1480 * config/allocator/new_allocator_base.h (__allocator_base): Add
1481 workaround for Doxygen bug #6945.
1482 * include/std/memory: Improve docs. Define group for pointer safety.
1483 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1484 conditional to suppress documentation for implementation details.
1486 * include/bits/specfun.h: Improve docs.
1487 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1490 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1491 (std::experimental): Add docs.
1492 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1493 namespace to nothing when generating docs.
1494 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1495 * include/std/chrono (std::chrono): Likewise.
1496 * include/std/functional (std::placeholders): Likewise.
1497 * include/std/thread (std::this_thread): Likewise.
1499 * include/parallel/settings.h: Fix Doxygen markup.
1501 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1502 anything unless PB_DS_CLASS_C_DEC is defined.
1503 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1504 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1505 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1506 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1507 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1508 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1509 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1511 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1512 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1513 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1514 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1515 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1516 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1517 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1518 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1519 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1520 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1521 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1523 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1524 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1526 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1529 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1530 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1531 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1534 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1536 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1537 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1538 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1539 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1540 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1541 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1543 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1544 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1547 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1550 * include/std/complex (__complex_proj): Return parameter unchanged.
1551 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1552 floating-point types to take std::complex arguments.
1553 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1554 floating-point types.
1555 * testsuite/26_numerics/complex/proj.cc: New test.
1557 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1559 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1560 to _Lock_policyE[012].
1561 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1563 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1565 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1566 macros accidentally left in.
1567 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1568 unnecessary -lstdc++fs option. Fix test for mingw.
1569 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1572 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1574 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1576 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1578 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1580 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1581 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1584 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1586 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1589 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1590 class template and partial specialization.
1593 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1595 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1596 functions to convert a value to an integral type.
1597 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1598 (fill_n): Convert _Size parameter to an integral type.
1599 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1600 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1601 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1602 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1603 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1604 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1606 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1608 Adding noexcept-specification on tuple constructors (LWG 2899)
1609 * libstdc++-v3/include/std/tuple:
1610 (tuple()): Add noexcept-specification.
1611 (tuple(const _Elements&...)): Likewise
1612 (tuple(_UElements&&...)): Likewise
1613 (tuple(const tuple<_UElements...>&)): Likewise
1614 (tuple(tuple<_UElements...>&&)): Likewise
1615 (tuple(const _T1&, const _T2&)): Likewise
1616 (tuple(_U1&&, _U2&&)): Likewise
1617 (tuple(const tuple<_U1, _U2>&): Likewise
1618 (tuple(tuple<_U1, _U2>&&): Likewise
1619 (tuple(const pair<_U1, _U2>&): Likewise
1620 (tuple(pair<_U1, _U2>&&): Likewise
1621 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1623 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1626 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1627 arguments with __restrict.
1629 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1631 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1633 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1635 * include/experimental/bits/fs_path.h
1636 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1637 avoid redundant call to _S_convert_loc with non-const pointers.
1639 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1640 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1641 * testsuite/21_strings/basic_string/hash/hash.cc
1642 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1643 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1644 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1646 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1647 wstring::_M_replace_dispatch with more specific patterns.
1648 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1649 Create const std::string to avoid redundant call to _S_convert_loc
1650 with non-const pointers.
1651 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1652 avoid unnecessary basic_string::assign instantiations.
1654 * include/std/memory (__uses_alloc_args): Add string-literal to
1655 static_assert, to match the one in __uses_alloc.
1656 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1657 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1658 for recursive uses-allocator construction of nested pairs.
1659 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1662 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1664 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1665 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1666 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1667 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1669 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1670 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1671 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1672 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1673 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1674 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1675 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1677 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1680 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1681 * include/std/scoped_allocator [__cplusplus > 201703L]
1682 (scoped_allocator_adaptor::construct): Define in terms of
1683 uses_allocator_construction_args, as per P0591R4.
1684 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1685 * testsuite/util/testsuite_allocator.h: Remove name of unused
1688 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1690 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1691 * doc/html/*: Regenerate.
1693 * include/bits/fs_path.h (operator<, operator<=, operator>)
1694 (operator>=, operator==, operator!=): Make hidden friends, as per
1696 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1697 string type in test.
1698 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1700 * include/std/any (any::any(ValueType&&)): Use __and_v.
1701 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1704 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1706 * include/std/type_traits (__result_of_memfun): Use remove_reference
1707 instead of __remove_cvref_t and remove redundant is_same check.
1708 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1710 * include/experimental/string_view (basic_string_view::pointer)
1711 (basic_string_view::reference): Fix to refer to non-const value_type.
1712 * include/bits/basic_string.h (basic_string): Use __sv_check and
1713 __sv_limit instead of basic_string_view::_M_check and
1714 basic_string_view::_M_limit.
1715 * include/std/string_view (__sv_check, __sv_limit): New
1716 helper functions to replace basic_string_view::_M_check and
1717 basic_string_view::_M_limit.
1718 (basic_string_view): Add static assertions to enforce ill-formed
1719 requirement for traits_type::char_type from P1148R0, and to enforce
1720 required properties of char-like types.
1721 (basic_string_view::pointer, basic_string_view::reference): Fix to
1722 refer to non-const value_type.
1723 (basic_string_view::operator[], basic_string_view::at)
1724 (basic_string_view::front, basic_string_view::back)
1725 (basic_string_view::data): Use const_reference and const_pointer
1726 typedefs for return types.
1727 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1728 (hash<wstring_view>): Fix argument_type typedef.
1729 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1730 char/1.cc: Fix expected return type of basic_string_view::data().
1731 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1732 wchar_t/1.cc: Likewise.
1733 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1734 char/1.cc: Likewise.
1735 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1736 wchar_t/1.cc: Likewise.
1737 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1739 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1740 Check reference and pointer typedefs.
1741 * testsuite/experimental/string_view/requirements/typedefs.cc:
1743 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1744 Fix expected return type of basic_string_view::data().
1745 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1747 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1749 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1753 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1754 Avoid a runtime check for types that can never be stored in std::any.
1755 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1758 PR libstdc++/90220 (partial)
1759 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1760 not attempt ill-formed static_cast to pointers to non-object types.
1761 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1764 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1765 prevent -Wcatch-value warning.
1767 * include/std/variant (__variant_construct): Use template parameter
1768 type instead of equivalent decltype-specifier.
1769 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1770 Replace forward with move.
1771 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1772 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1773 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1774 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1775 index after construction succeeds.
1776 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1777 if-constexpr checks that are always true. Use __remove_cvref_t instead
1778 of remove_reference so that is_nothrow_move_constructible check
1779 doesn't use a const rvalue parameter. In the potentially-throwing case
1780 construct a temporary and move assign it, as per LWG 2904.
1781 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1782 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1783 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1784 construct a temporary and move assign from it, as per LWG 2904.
1785 * testsuite/20_util/variant/exception_safety.cc: Check that
1786 assignment operators have strong exception safety guarantee.
1788 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1790 Document PSTL linker flags
1792 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1794 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1796 * include/std/variant (__detail::__variant::_Traits): Make
1797 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1798 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1800 (__detail::__variant::_Copy_assign_alias): Only depend on
1801 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1802 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1803 move assignment operators.
1806 * include/std/variant (variant::__not_self): New helper for the
1807 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1808 (variant::__to_type_impl): Remove.
1809 (variant::__to_type): Add default argument to check pack size, instead
1810 of using __to_type_impl.
1811 (variant::__accepted_type): Add default argument using __not_self.
1812 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1813 for variant(T&&) constructor constraint.
1814 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1815 Extract __accepted_type into a named template parameter for reuse in
1816 other constraints and in the exception specification.
1817 (variant::variant(in_place_type_t<T>, Args&&...))
1818 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1819 (variant::variant(in_place_index_t<T>, Args&&...))
1820 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1821 (variant::operator=T&&)): Remove redundant && from trait arguments.
1822 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1823 isn't used for in_place_type or in_place_index arguments.
1825 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1826 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1827 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1829 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1830 Bernd Edlinger <bernd.edlinger@hotmail.de>
1831 Jakub Jelinek <jakub@redhat.com>
1834 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1835 general-regs-only target attribute for ARM.
1837 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1840 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1841 specialization also depend on is_nothrow_move_constructible.
1842 * include/std/variant (__detail::__variant::__never_valueless()):
1843 Only true if the variant would have a move assignment operator.
1844 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1845 Check __never_valueless<T...>().
1846 (variant::emplace): Only perform non-throwing move assignments
1847 for never-valueless alternatives if the variant has a move assignment
1849 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1850 types can be emplaced into non-assignable variants.
1851 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1852 don't get copied when emplaced into non-assignable variants.
1854 * include/std/variant (__detail::__variant::__ref_cast): Remove
1856 (__detail::__variant::_Uninitialized::_M_get)
1857 (__detail::__variant::__get)
1858 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1860 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1862 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1864 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1865 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1866 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1867 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1869 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1871 Delegate PSTL configuration to pstl/pstl_config.h
1873 * include/bits/c++config: Remove explicit PSTL configuration
1874 macros and use definitions from <pstl/pstl_config.h>.
1876 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1878 Cleanup algorithm implementations
1879 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1881 (mismatch): Forward execution policy.
1882 (equal): Qualify call to std::equal().
1883 (partial_sort): Forward execution policy.
1884 (inplace_merge): Forward execution policy.
1886 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1888 Improve implementation of parallel equal()
1889 * include/pstl/algorithm_impl.h
1890 (__internal::__brick_equal): use "4 iterator" version of
1892 (__internal::__brick_equal): use simd for random access
1893 iterators on unsequenced execution policies.
1894 (__internal::__pattern_equal): add "4 iterator" version
1895 (__internal::__pattern_equal): dispatch to simd __brick_equal
1896 for vector-only execution policies.
1897 (__internal::__pattern_equal): dispatch to __parallel_or for
1898 parallel execution policies.
1899 * include/pstl/glue_algorithm_impl.h
1900 (std::equal): dispatch to "4 iterator" version of
1901 __internal::__pattern_equal().
1903 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1906 * include/bits/forward_list.h (operator==): Do not use operator!= to
1908 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1909 earlier in the list, so that sort is stable.
1910 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1911 * testsuite/23_containers/forward_list/comparable.cc: Test with
1912 types that meet the minimum EqualityComparable and LessThanComparable
1913 requirements. Remove irrelevant comment.
1915 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1916 Do not depend on whether all alternative types are move constructible.
1917 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1918 from the operand when deciding whether to perform the assignment.
1919 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1920 with deleted move constructor and deleted move assignment operator.
1921 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1922 behaviour of variants with DeletedMoves as an alternative.
1923 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1924 (move_ctor, move_assign): Check that moving a variant with a
1925 DeletedMoves alternative falls back to copying instead of moving.
1927 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1928 from static_assert declarations.
1930 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1931 actually match its name.
1932 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1933 (test_swap()): Fix result for MoveCtorOnly and check
1934 MoveCtorAndSwapOnly.
1936 * include/std/optional (optional::value_or(U&&) &&): Add missing
1937 constexpr specifier.
1938 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1939 for disengaged optionals and rvalue optionals.
1940 * testsuite/20_util/optional/observers/4.cc: Likewise.
1942 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1944 * include/pstl/algorithm_impl.h: Uglify identfiers.
1945 * include/pstl/numeric_impl.h: Uglify identfiers.
1946 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1948 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1950 * include/bits/c++config:
1951 Add definition for __PSTL_ASSERT.
1952 Add definition for __PSTL_ASSERT_MSG.
1953 * include/pstl/algorithm_impl.h: Replace use of assert().
1954 * include/pstl/numeric_impl.h: Replace use of assert().
1955 * include/pstl/parallel_backend_tbb.h:
1956 Replace use of assert().
1957 Replace use of __TBB_ASSERT().
1958 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1960 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1963 * src/c++17/memory_resource.cc
1964 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1965 needed to allow placing a _Chunk at the end of the buffer.
1966 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1968 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1970 * doc/xml/faq.xml: Add information about emergency EH pool.
1971 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1972 Move outdated information on mt_allocator to a separate section.
1973 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1974 doesn't affect the default allocator.
1976 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1980 * testsuite/20_util/variant/89851.cc: New test.
1982 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1984 * include/std/variant: Adjust whitespace. Add comments.
1985 (_Multi_array): Leave primary template undefined.
1986 (_Multi_array<_Tp>): Define partial specialization for base case of
1988 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1989 which is always a reference.
1990 (__gen_vtable::_S_apply()): Remove function, inline body into
1991 default member initializer.
1992 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1994 * include/std/variant (__variant_idx_cookie): Add member type.
1995 (__visitor_result_type): Remove.
1996 (__do_visit): Use invoke_result instead of __visitor_result_type.
1997 * testsuite/20_util/variant/visit.cc: New test.
2000 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2002 * testsuite/20_util/variant/90008.cc: New test.
2004 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2006 * include/pstl/algorithm_impl.h: Add namespace qualification.
2007 * include/pstl/execution_defs.h: Add namespace qualification.
2008 * include/pstl/execution_impl.h: Add namespace qualification.
2009 * include/pstl/numeric_impl.h: Add namespace qualification.
2010 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2011 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2012 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2014 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2016 Fix visit<R> for variant.
2017 * include/std/variant (__do_visit): Add a template parameter
2018 for enforcing same return types for visit.
2019 (__gen_vtable_impl): Likewise.
2020 (_S_apply_single_alt): Adjust.
2021 (__visit_invoke_impl): New. Handle casting to void.
2022 (__do_visit_invoke): New. Enforces same return types.
2023 (__do_visit_invoke_r): New. Converts return types.
2024 (__visit_invoke): Adjust.
2025 (__gen_vtable): Add a template parameter for enforcing
2026 same return types for visit.
2027 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2028 different return types.
2029 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2030 visitors with different return types don't accidentally
2031 compile with regular visitation.
2033 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2035 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2036 dg-require-filesystem-ts.
2038 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2040 * doc/xml/manual/status_cxx2020.xml: Update status.
2041 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2042 * testsuite/20_util/variant/visit_r.cc: New test.
2044 * include/bits/fs_dir.h (directory_iterator::operator*)
2045 (directory_iterator::operator->): Add noexcept.
2046 (operator==, operator!=): Replace namespace-scope equality operators
2047 for directory iterators with hidden friends.
2050 * config/abi/pre/gnu.ver: Add missing exports.
2051 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2054 * config/abi/pre/gnu.ver: Export new symbols.
2055 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2056 (recursive_directory_iterator::recursion_pending())
2057 (recursive_directory_iterator::disable_recursion_pending()): Remove
2058 inline definitions. Make noexcept.
2059 (recursive_directory_iterator::depth())
2060 (recursive_directory_iterator::operator*())
2061 (recursive_directory_iterator::operator->()): Make noexcept.
2062 (recursive_directory_iterator::_M_options)
2063 (recursive_directory_iterator::_M_pending): Remove data members.
2064 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2065 (recursive_directory_iterator::recursive_directory_iterator): Remove
2066 ctor-initializer. Use new constructor for _Dir_stack.
2067 (recursive_directory_iterator::options())
2068 (recursive_directory_iterator::recursion_pending())
2069 (recursive_directory_iterator::disable_recursion_pending()): Add
2070 non-inline definitions.
2071 (recursive_directory_iterator::depth()): Make noexcept.
2072 (recursive_directory_iterator::increment(error_code&))
2073 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2074 location of options and recursion_pending members.
2075 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2076 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2077 user-declared move constructor and assignment operator, to make the
2080 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2081 d_type == DT_UNKNOWN immediately.
2082 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2084 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2086 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2088 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2089 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2092 PR libstdc++/87431 (again)
2093 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2094 Define partial specialization for basic_string.
2095 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2096 shared_ptr and weak_ptr.
2097 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2099 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2101 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2103 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2105 * include/std/any (_Never_valueless_alt): Define explicit
2106 specialization for any.
2107 * include/std/variant (_Never_valueless_alt): Define primary template.
2108 (__never_valueless): Use _Never_valueless_alt instead of
2109 is_trivially_copyable.
2110 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2111 initializations to avoid try-catch overhead. Add special case for
2112 scalars produced by potentially-throwing conversions. Use
2113 _Never_valueless_alt instead of is_trivially_copyable for the
2114 remaining strong exception-safety cases.
2115 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2116 * testsuite/20_util/variant/87431.cc: Run both test functions.
2117 * testsuite/20_util/variant/exception_safety.cc: New test.
2118 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2119 so the variant becomes valueless.
2121 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2124 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2126 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2128 * include/std/string (__hash_string_base): New class template defining
2129 operator() for hashing strings.
2130 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2131 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2132 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2133 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2135 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2137 Use single-visitation in variant assignment and swap and relops.
2138 Also use indices instead of types when checking whether
2139 variants hold the same thing.
2140 * include/std/variant (__do_visit): Add a template parameter
2141 for index visitation, invoke with indices if index visitation
2143 (__variant_idx_cookie): New.
2144 (__visit_with_index): Likewise.
2145 (_Copy_assign_base::operator=): Do single-visitation with
2147 (_Move_assign_base::operator=): Likewise.
2148 (_Extra_visit_slot_needed): Adjust.
2149 (__visit_invoke): Call with indices if it's an index visitor.
2150 (relops): Do single-visitation with an index visitor.
2152 (__visitor_result_type): New.
2154 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2156 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2158 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2160 Don't revisit a variant we are already visiting.
2161 * include/std/variant (__variant_construct_single): New.
2162 (__variant_construct): Use it.
2163 (_M_destructive_move): Likewise.
2164 (_M_destructive_copy): Likewise.
2165 (_Copy_assign_base::operator=): Adjust.
2166 (_Move_assign_base::operator=): Likewise.
2169 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2172 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2173 destructor so they are not evaluated until the _Key type is complete.
2174 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2175 * testsuite/23_containers/set/85965.cc: New test.
2176 * testsuite/23_containers/unordered_set/85965.cc: New test.
2177 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2178 with regexp matching the corresponding _Rb_tree specialization.
2179 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2180 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2181 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2182 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2183 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2184 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2185 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2187 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2190 Fix based on a suggestion by Antony Polukhin.
2191 * include/std/variant (__never_valueless): New.
2193 (_Extra_visit_slot_needed): New.
2194 (_Multi_array): Use it.
2195 (_S_apply_all_alts): Likewise.
2197 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2200 Fix based on a suggestion by Antony Polukhin.
2201 * include/std/variant (__gen_vtable): Don't reserve an
2202 additional table slot, _Multi_array already does that.
2204 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2207 Fix based on a suggestion by Antony Polukhin.
2208 * include/std/variant (__variant_construct): Capture a pointer
2209 to the storage and visit just one variant.
2211 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2213 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2214 Doxygen-generated pages with unstable URL.
2215 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2216 * doc/xml/manual/extensions.xml: Likewise.
2217 * doc/xml/manual/parallel_mode.xml: Likewise.
2218 * doc/xml/manual/support.xml: Likewise.
2220 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2221 avoid -Wconversion warnings.
2223 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2225 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2226 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2227 (allstamped): Add stamp-pstl.
2228 (install-headers): Add ptsl_builddir.
2229 * include/Makefile.in: Regenerate.
2230 * include/bits/c++config: Add pstl configuration.
2231 * include/pstl/LICENSE.txt: New file.
2232 * include/pstl/algorithm_fwd.h: New file.
2233 * include/pstl/algorithm_impl.h: New file.
2234 * include/pstl/execution_defs.h: New file.
2235 * include/pstl/execution_impl.h: New file.
2236 * include/pstl/glue_algorithm_defs.h: New file.
2237 * include/pstl/glue_algorithm_impl.h: New file.
2238 * include/pstl/glue_execution_defs.h: New file.
2239 * include/pstl/glue_memory_defs.h: New file.
2240 * include/pstl/glue_memory_impl.h: New file.
2241 * include/pstl/glue_numeric_defs.h: New file.
2242 * include/pstl/glue_numeric_impl.h: New file.
2243 * include/pstl/memory_impl.h: New file.
2244 * include/pstl/numeric_fwd.h: New file.
2245 * include/pstl/numeric_impl.h: New file.
2246 * include/pstl/parallel_backend.h: New file.
2247 * include/pstl/parallel_backend_tbb.h: New file.
2248 * include/pstl/parallel_backend_utils.h: New file.
2249 * include/pstl/parallel_impl.h: New file.
2250 * include/pstl/pstl_config.h: New file.
2251 * include/pstl/unseq_backend_simd.h: New file.
2252 * include/pstl/utils.h: New file.
2253 * include/std/algorithm: Include parallel algorithm implementations.
2254 * include/std/execution: New file.
2255 * include/std/memory: Include parallel algorithm implementations.
2256 * include/std/numeric: Include parallel algorithm implementations.
2257 * include/std/version: Add parallel algorithms feature test macro.
2258 * testsuite/util/pstl/pstl_test_config.h: New file.
2259 * testsuite/util/pstl/test_utils.h: New file.
2260 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2261 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2262 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2263 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2264 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2265 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2266 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2267 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2268 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2269 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2270 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2271 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2272 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2273 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2274 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2275 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2276 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2277 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2278 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2279 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2280 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2281 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2282 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2283 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2284 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2285 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2286 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2287 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2288 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2289 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2290 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2291 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2292 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2293 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2294 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2295 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2296 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2297 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2298 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2299 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2300 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2301 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2302 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2303 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2304 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2305 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2306 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2307 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2308 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2309 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2310 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2311 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2312 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2313 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2314 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2315 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2316 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2317 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2318 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2319 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2320 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2321 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2322 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2323 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2324 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2325 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2326 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2327 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2328 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2329 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2330 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2331 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2332 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2333 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2334 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2335 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2336 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2337 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2338 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2339 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2340 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2341 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2342 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2343 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2344 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2345 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2346 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2347 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2348 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2349 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2350 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2351 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2352 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2353 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2354 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2355 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2356 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2357 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2358 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2359 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2360 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2361 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2362 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2363 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2364 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2365 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2367 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2369 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2370 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2371 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2372 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2373 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2374 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2375 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2376 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2377 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2378 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2379 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2380 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2381 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2382 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2383 when the special functions IS is enabled, not for C++17.
2384 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2386 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2387 without checks for special functions in C++17.
2388 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2392 * include/backward/hash_map: Use <> for includes not "".
2393 * include/backward/hash_set: Likewise.
2394 * include/backward/strstream: Likewise.
2395 * include/tr1/bessel_function.tcc: Likewise.
2396 * include/tr1/exp_integral.tcc: Likewise.
2397 * include/tr1/legendre_function.tcc: Likewise.
2398 * include/tr1/modified_bessel_func.tcc: Likewise.
2399 * include/tr1/riemann_zeta.tcc: Likewise.
2401 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2403 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2404 of extension allocators.
2405 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2406 Document new headers in 7.2, 8.1 and 9.1 releases.
2407 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2408 * doc/html/*: Regenerate.
2410 2019-03-12 John David Anglin <dave.anglin@bell.net>
2413 * testsuite/lib/libstdc++.exp: Locate libatomic.
2414 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2415 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2417 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2418 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2419 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2420 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2422 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2425 * configure.ac: Check for sockatmark.
2426 * crossconfig.m4: Check for sockatmark.
2427 * config.h.in: Regenerate.
2428 * configure: Regenerate.
2429 * include/experimental/internet (address_v4::_S_hton): Rename
2430 overloaded functions to _S_hton_16 and _S_ntoh_16.
2431 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2432 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2433 * include/experimental/socket (basic_socket::at_mark): Check
2434 _GLIBCXX_HAVE_SOCKATMARK.
2436 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2437 const variables instead of macros.
2440 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2441 Use correct type for len_aligned.
2442 * testsuite/20_util/hash/89629.cc: New test.
2444 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2447 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2448 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2449 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2450 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2451 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2452 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2453 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2454 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2455 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2456 memory_order_seq_cst to int.
2458 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2460 * doc/xml/manual/using.xml: Use link element instead of xref.
2461 * doc/html/*: Regenerate.
2463 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2465 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2468 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2469 parameters in deduction guides.
2470 * include/debug/multimap.h (multimap): Likewise.
2471 * include/debug/set.h (multimap): Likewise.
2472 * include/debug/multiset.h (multimap): Likewise.
2473 * include/debug/unordered_map (unordered_map): Likewise.
2474 (unordered_multimap): Likewise.
2475 * include/debug/unordered_set (unordered_set): Likewise.
2476 (unordered_multiset): Likewise.
2479 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2480 Invalidate all iterators in case of rehash.
2481 (unordered_multimap<>::_M_check_rehashed): Likewise.
2482 * include/debug/unordered_set
2483 (unordered_set<>::_M_check_rehashed): Likewise.
2484 (unordered_multiset<>::_M_check_rehashed): Likewise.
2485 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2487 2019-03-07 Andreas Schwab <schwab@suse.de>
2489 * config/abi/post/riscv64-linux-gnu: New directory.
2490 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2492 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2494 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2495 compile test to run. Fix typo.
2497 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2498 * doc/html/*: Regenerate.
2500 P0356R5 Simplified partial function application
2501 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2502 helpers for bind_front.
2503 (bind_front, __cpp_lib_bind_front): Define.
2504 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2506 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2508 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2509 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2510 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2511 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2513 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2515 PR libstdc++/86655 - std::assoc_legendre should not constrain
2516 the value of m (or x).
2517 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2518 __sph_legendre): If degree > order Don't throw, return 0.
2519 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2520 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2521 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2522 * testsuite/tr1/5_numerical_facilities/special_functions/
2523 02_assoc_legendre/pr86655.cc: New test.
2524 * testsuite/tr1/5_numerical_facilities/special_functions/
2525 22_sph_legendre/pr86655.cc: New test.
2527 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2530 Also PR libstdc++/85517
2531 * include/std/variant (__do_visit): New.
2532 (__variant_cast): Likewise.
2533 (__variant_cookie): Likewise.
2534 (__erased_*): Remove.
2535 (_Variant_storage::_S_vtable): Likewise.
2536 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2537 (_Variant_storage::__M_reset): Adjust.
2538 (__variant_construct): New.
2539 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2540 __variant_construct.
2541 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2542 (_Move_ctor_base::__M_destructive_copy): New.
2543 (_Move_ctor_base::__M_destructive_move): Adjust to use
2544 __variant_construct.
2545 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2546 (_Copy_assign_alias): Adjust to check both copy assignment
2547 and copy construction for triviality.
2548 (_Move_assign_base::operator=): Adjust to use __do_visit.
2549 (_Multi_array): Add support for visitors that accept and return
2551 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2552 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2553 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2554 a __variant_cookie temporary for a variant that is valueless and..
2555 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2556 (__gen_vtable::_Array_type): Conditionally make space for
2557 the __variant_cookie visitor case.
2558 (__variant_construct_by_index): New.
2559 (get_if): Adjust to use std::addressof.
2560 (relops): Adjust to use __do_visit.
2561 (variant): Add __variant_cast and __variant_construct_by_index
2563 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2564 instead of self-destruction.
2565 (variant::swap): Adjust to use __do_visit.
2566 (visit): Reimplement in terms of __do_visit.
2567 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2568 * testsuite/20_util/variant/compile.cc: Adjust.
2569 * testsuite/20_util/variant/run.cc: Likewise.
2571 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2573 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2575 * testsuite/experimental/feat-char8_t.cc: Likewise.
2577 * include/std/type_traits [C++20] (is_bounded_array)
2578 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2580 * testsuite/20_util/is_bounded_array/requirements/
2581 explicit_instantiation.cc: New test.
2582 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2584 * testsuite/20_util/is_bounded_array/value.cc: New test.
2585 * testsuite/20_util/is_unbounded_array/requirements/
2586 explicit_instantiation.cc: New test.
2587 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2589 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2591 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2593 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2595 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2597 * include/c_compatibility/math.h [C++20] (lerp): Add using
2599 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2600 (__lerp): Define function template to implement lerp.
2601 (lerp(float, float, float), lerp(double, double, double))
2602 (lerp(long double, long double, long double)): Define for C++20.
2603 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2604 (midpoint(T, T), midpoint(T*, T*)): Define.
2605 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2606 * testsuite/26_numerics/lerp.cc: New test.
2607 * testsuite/26_numerics/midpoint/floating.cc: New test.
2608 * testsuite/26_numerics/midpoint/integral.cc: New test.
2609 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2611 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2613 PR libstdc++/88996 Implement P0439R0
2614 Make std::memory_order a scoped enumeration.
2615 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2616 add variables for the old enumerators. Adjust calls.
2617 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2618 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2620 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2622 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2625 * include/std/memory_resource (polymorphic_allocator): Add default
2626 template argument for C++20.
2627 (polymorphic_allocator::allocate_bytes)
2628 (polymorphic_allocator::deallocate_bytes)
2629 (polymorphic_allocator::allocate_object)
2630 (polymorphic_allocator::deallocate_object)
2631 (polymorphic_allocator::new_object)
2632 (polymorphic_allocator::delete_object): New member functions for
2634 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2637 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2640 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2643 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2645 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2646 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2648 * include/std/memory (uses_allocator_construction_args): New set of
2649 overloaded functions.
2650 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2652 * include/std/memory_resource (polymorphic_allocator::construct)
2653 [__cplusplus > 201703l]: Replace all overloads with a single function
2654 using uses_allocator_construction_args.
2655 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2657 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2659 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2662 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2663 stylesheet directories before check for xsltproc. Try to use
2664 xmlcatalog to find local stylesheet directory before trying hardcoded
2665 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2666 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2667 use xsltproc if xmlcatalog fails to find a local stylesheet.
2668 * configure.ac: Check for xmlcatalog.
2669 * Makefile.in: Regenerate.
2670 * configure: Likewise.
2671 * doc/Makefile.in: Likewise.
2672 * include/Makefile.in: Likewise.
2673 * libsupc++/Makefile.in: Likewise.
2674 * po/Makefile.in: Likewise.
2675 * python/Makefile.in: Likewise.
2676 * src/Makefile.in: Likewise.
2677 * src/c++11/Makefile.in: Likewise.
2678 * src/c++17/Makefile.in: Likewise.
2679 * src/c++98/Makefile.in: Likewise.
2680 * src/filesystem/Makefile.in: Likewise.
2681 * testsuite/Makefile.in: Likewise.
2683 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2686 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2687 container deduction guides.
2688 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2689 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2690 parameters in deduction guides.
2691 * include/bits/stl_multimap.h (multimap): Likewise.
2692 * include/bits/stl_multiset.h (multiset): Likewise.
2693 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2694 * include/bits/stl_set.h (set): Likewise.
2695 * include/bits/stl_stack.h (stack): Likewise.
2696 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2697 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2698 constrain parameters in deduction guides.
2699 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2701 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2703 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2704 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2705 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2706 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2708 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2710 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2713 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2714 to class template and partial specialization using void_t.
2715 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2717 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2720 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2721 copy and move members public.
2723 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2725 * include/std/type_traits (__underlying_type_impl): New helper to
2726 make underlying_type SFINAE-friendly.
2727 (underlying_type): Derive from __underlying_type_impl.
2728 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2732 * include/bits/char_traits.h (__constant_char_array): Check index is
2733 in range before dereferencing.
2734 (char_traits<char>::compare, char_traits<char>::find)
2735 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2736 immediately if n is zero.
2737 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2738 Remove workarounds for PR 67026.
2739 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2741 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2744 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2746 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2747 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2749 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2752 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2753 type to std::size_t and argument to type to long double.
2755 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2757 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2758 * config/abi/post/sparc64-linux-gnu: New directory.
2759 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2760 * config/abi/post/sparc64-linux-gnu/32: New directory.
2761 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2763 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2765 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2766 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2769 2019-02-22 Tom Honermann <tom@honermann.net>
2771 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2772 printers for u8string and u8string_view.
2774 2019-02-22 Tom Honermann <tom@honermann.net>
2776 * testsuite/18_support/byte/ops.cc: Validate
2777 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2778 std::to_integer<char32_t>.
2779 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2780 std::numeric_limits<char8_t>.
2781 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2782 std::numeric_limits<char8_t>::lowest().
2783 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2784 std::numeric_limits<char8_t>::max_digits10.
2785 * testsuite/18_support/type_info/fundamental.cc: Validate
2786 typeinfo for char8_t.
2787 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2788 std::from_chars with char8_t.
2789 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2790 Validate explicit instantiation of std::hash<char8_t>.
2791 * testsuite/20_util/is_integral/value.cc: Validate
2792 std::is_integral<char8_t>.
2793 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2794 Validate std::make_signed<char8_t>.
2795 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2796 Validate u8string construction from char8_t sources.
2797 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2799 * testsuite/21_strings/basic_string_view/operations/compare/
2800 char/70483.cc: Validate substr operations on u8string_view.
2801 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2802 the u8string_view typedef is defined.
2803 * testsuite/21_strings/char_traits/requirements/
2804 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2806 * testsuite/21_strings/char_traits/requirements/
2807 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2808 constexpr member functions.
2809 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2810 that the u8string typedef is defined.
2811 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2812 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2813 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2814 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2816 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2817 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2819 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2820 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2821 Validate std::atomic<char8_t>::is_always_lock_free
2822 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2823 Update line numbers.
2824 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2826 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2828 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2829 Validate std::experimental::pmr::u8string.
2830 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2831 u8string_view typedef is defined.
2832 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2833 char32_t to the typelists.
2835 2019-02-22 Tom Honermann <tom@honermann.net>
2837 * include/ext/typelist.h: Constrain a partial specialization of
2838 typelist::detail::append_ to only match chain<T1,T2>.
2840 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2843 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2844 class template with class. Replace move and copy member types with
2845 member alias templates, so they are only instantiated when needed.
2846 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2847 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2848 test for C++11/14/17 as well.
2849 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2852 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2855 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2856 _GLIBCXX_PURE to the alias declaration.
2858 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2860 * testsuite/21_strings/basic_string/literals/types.cc
2861 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2862 * testsuite/21_strings/basic_string/literals/values.cc
2863 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2864 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2865 potentially having different type.
2866 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2867 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2869 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2870 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2871 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2872 string literals only using basic character set.
2873 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2874 u8 literals to char.
2875 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2876 Test ATOMIC_CHAR8_T_LOCK_FREE.
2877 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2878 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2879 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2880 * testsuite/experimental/string_view/literals/types.cc
2881 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2883 * testsuite/experimental/string_view/literals/values.cc
2884 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2886 2019-02-19 Tom Honermann <tom@honermann.net>
2888 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2889 from char16_32_t.cc; validates numeric_limits<char8_t>.
2890 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2891 test cloned from types.cc; validates operator""s for char8_t
2893 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2894 test cloned from values.cc; validates construction and comparison
2896 * testsuite/21_strings/basic_string/requirements/
2897 /explicit_instantiation/char8_t/1.cc: New test cloned from
2898 char16_t/1.cc; validates explicit instantiation of
2899 basic_string<char8_t>.
2900 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2901 New test cloned from types.cc; validates operator""sv for char8_t
2902 returns u8string_view.
2903 * testsuite/21_strings/basic_string_view/literals/
2904 values-char8_t.cc: New test cloned from values.cc; validates
2905 construction and comparison of u8string_view values.
2906 * testsuite/21_strings/basic_string_view/requirements/
2907 explicit_instantiation/char8_t/1.cc: New test cloned from
2908 char16_t/1.cc; validates explicit instantiation of
2909 basic_string_view<char8_t>.
2910 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2911 New test cloned from char16_t/65049.cc; validates that
2912 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2913 * testsuite/21_strings/char_traits/requirements/char8_t/
2914 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2915 that char_traits<char8_t> member typedefs are present and correct.
2916 * testsuite/21_strings/char_traits/requirements/
2917 explicit_instantiation/char8_t/1.cc: New test cloned from
2918 char16_t/1.cc; validates explicit instantiation of
2919 char_traits<char8_t>.
2920 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2921 from char16_t.cc: validates
2922 codecvt<char16_t, char8_t, mbstate_t>.
2923 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2924 from char32_t.cc: validates
2925 codecvt<char32_t, char8_t, mbstate_t>.
2926 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2927 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2928 codecvt<char32_t, char8_t, std::mbstate_t>.
2929 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2930 test cloned from string.cc; validates filesystem::path construction
2932 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2933 the __cpp_lib_char8_t feature test macro is defined with the
2935 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2936 New test cloned from string.cc; validates filesystem::path
2937 construction from char8_t input.
2938 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2939 test cloned from types.cc; validates operator""sv for char8_t
2940 returns u8string_view.
2941 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2942 New test cloned from values.cc; validates construction and
2943 comparison of u8string_view values.
2944 * testsuite/experimental/string_view/requirements/
2945 explicit_instantiation/char8_t/1.cc: New test cloned from
2946 char16_t/1.cc; validates explicit instantiation of
2947 basic_string_view<char8_t>.
2948 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2949 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2952 2019-02-19 Tom Honermann <tom@honermann.net>
2954 P0482R5 char8_t: Standard library support
2955 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2956 typeinfo symbols for char8_t.
2957 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2958 (GLIBCXX_3.4.26): Add symbols for specializations of
2959 numeric_limits and codecvt that involve char8_t.
2960 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2961 * include/bits/atomic_base.h: Add atomic_char8_t.
2962 * include/bits/basic_string.h: Add std::hash<u8string> and
2963 operator""s(const char8_t*, size_t).
2964 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2966 * include/bits/char_traits.h: Add char_traits<char8_t>.
2967 * include/bits/codecvt.h: Add
2968 codecvt<char16_t, char8_t, mbstate_t>,
2969 codecvt<char32_t, char8_t, mbstate_t>,
2970 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2971 codecvt_byname<char32_t, char8_t, mbstate_t>.
2972 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2973 recognize char8_t as an integral type.
2974 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2976 (path::u8string): Return std::u8string when char8_t support is
2978 (path::generic_u8string): Likewise.
2979 (path::_S_convert): Handle conversion from char8_t input.
2980 (path::_S_str_convert): Likewise.
2981 * include/bits/functional_hash.h: Add hash<char8_t>.
2982 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2984 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2985 for new char8_t specializations.
2986 * include/bits/localefwd.h: Add missing declarations of
2987 codecvt<char16_t, char, mbstate_t> and
2988 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2989 codecvt<char16_t, char8_t, mbstate_t> and
2990 codecvt<char32_t, char8_t, mbstate_t>.
2991 * include/bits/postypes.h: Add u8streampos
2992 * include/bits/stringfwd.h: Add declarations of
2993 char_traits<char8_t> and u8string.
2994 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2995 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2997 (path::u8string): Return std::u8string when char8_t support is
2999 (path::generic_u8string): Likewise.
3000 (path::_S_convert): Handle conversion from char8_t input.
3001 (path::_S_str_convert): Likewise.
3002 * include/experimental/string: Add u8string.
3003 * include/experimental/string_view: Add u8string_view,
3004 hash<experimental::u8string_view>, and
3005 operator""sv(const char8_t*, size_t).
3006 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3007 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3008 as a character type.
3009 * include/std/limits: Add numeric_limits<char8_t>.
3010 * include/std/string_view: Add u8string_view,
3011 hash<experimental::u8string_view>, and
3012 operator""sv(const char8_t*, size_t).
3013 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3014 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3015 * libsupc++/atomic_lockfree_defines.h: Define
3016 ATOMIC_CHAR8_T_LOCK_FREE.
3017 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3018 codecvt.cc and limits.cc so that char8_t specializations of
3019 numeric_limits and codecvt and emitted.
3020 * src/c++11/Makefile.in: Likewise.
3021 * src/c++11/codecvt.cc: Define members of
3022 codecvt<char16_t, char8_t, mbstate_t>,
3023 codecvt<char32_t, char8_t, mbstate_t>,
3024 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3025 codecvt_byname<char32_t, char8_t, mbstate_t>.
3026 * src/c++11/limits.cc: Define members of
3027 numeric_limits<char8_t>.
3028 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3029 locale_init.cc and localename.cc.
3030 * src/c++98/Makefile.in: Likewise.
3031 * src/c++98/locale_init.cc: Add initialization for the
3032 codecvt<char16_t, char8_t, mbstate_t> and
3033 codecvt<char32_t, char8_t, mbstate_t> facets.
3034 * src/c++98/localename.cc: Likewise.
3035 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3037 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3039 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3040 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3041 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3043 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3045 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3046 * doc/html/*: Regenerate.
3048 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3049 * doc/html/*: Regenerate.
3051 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3052 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3053 allocator type in is_constructible checks.
3054 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3055 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3056 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3057 problematic type from LWG 2586 discussion.
3058 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3059 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3061 * configure.ac: Check for C11 timespec_get function.
3062 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3064 * config.h.in: Regenerate.
3065 * configure: Regenerate.
3066 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3067 std for C++17 and up.
3069 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3070 * include/bits/stl_queue.h
3071 (priority_queue(const Compare&, const Container&, const Alloc&))
3072 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3074 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3076 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3077 * include/bits/stl_queue.h (queue, priority_queue): Add static
3078 assertions to enforce LWG 2566 requirement on value_type.
3079 * include/bits/stl_stack.h (stack): Likewise.
3082 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3084 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3085 * include/bits/std_abs.h: Add comment about LWG 2735.
3086 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3088 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3091 * include/std/version [__cpp_impl_destroying_delete]
3092 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3093 * libsupc++/new [__cpp_impl_destroying_delete]
3094 (__cpp_lib_destroying_delete): Likewise.
3095 (destroying_delete_t, destroying_delete): Likewise, but define even
3096 when __cpp_impl_destroying_delete is not defined.
3097 * testsuite/18_support/destroying_delete.cc: New test.
3099 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3102 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3103 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3104 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3105 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3107 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3110 * include/bits/fs_path.h (path::has_root_name)
3111 (path::has_root_directory, path::has_root_path)
3112 (path::has_relative_path, path::has_parent_path)
3113 (path::has_filename, path::has_stem, path::has_extension)
3114 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3116 * src/c++17/fs_path.cc (path::has_root_name)
3117 (path::has_root_directory, path::has_root_path)
3118 (path::has_relative_path, path::has_parent_path)
3119 (path::has_filename, path::_M_find_extension): Add noexcept.
3121 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3123 PR libstdc++/89102 (partial)
3124 * include/std/type_traits (common_type<>): Define.
3125 (common_type<T>): Derive from common_type<T, T>.
3126 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3127 Test zero-length template argument list.
3128 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3129 Test additional single argument cases.
3130 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3131 Adjust expected error.
3133 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3136 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3138 * include/bits/stl_stack.h (stack): Likewise.
3139 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3140 * testsuite/23_containers/queue/deduction.cc: New test.
3141 * testsuite/23_containers/stack/deduction.cc: New test.
3144 * include/std/type_traits (__is_convertible_helper)
3145 (__is_convertible_helper<_From, _To, false>): Revert changes to
3146 support is_nothrow_convertible.
3147 (__is_nt_convertible_helper): New helper.
3148 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3150 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3151 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3154 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3155 __is_alloc_insertable_impl. Replace single type member with two
3156 members, one for each of copy and move insertable.
3157 (__is_move_insertable): New trait for internal use.
3158 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3159 (vector::_S_nothrow_relocate(true_type)): New functions to
3160 conditionally check if __relocate_a can throw.
3161 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3162 on __is_move_insertable.
3163 (vector::_S_do_relocate): New overloaded functions to conditionally
3165 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3166 based on _S_use_relocate.
3167 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3168 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3169 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3172 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3173 parameter unnamed. Add message to static assertion.
3174 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3175 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3178 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3181 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3183 (__is_bitwise_relocatable): ... to this.
3184 (__relocate_a_1): Adapt.
3185 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3186 (__is_bitwise_relocatable): ... to this.
3188 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3191 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3192 final component as well as from _M_pathname. Append the dot using
3193 operator+= instead of only to _M_pathname.
3194 (path::_M_find_extension): Reformat slightly.
3195 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3196 Add more test cases.
3198 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3200 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3202 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3204 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3205 constexpr specifiers from arg and proj.
3207 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3208 __shared_ptr instantiations used by gcc4-compatible ABI.
3210 * include/experimental/forward_list (experimental::erase): Qualify
3212 * include/experimental/list (experimental::erase): Likewise.
3213 * include/std/forward_list (std::erase): Likewise.
3214 * include/std/list (std::erase): Likewise.
3216 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3218 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3219 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3220 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3221 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3222 * testsuite/ext/array_allocator/26875.cc: Likewise.
3223 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3224 * testsuite/util/replacement_memory_operators.h: Likewise.
3225 * testsuite/util/testsuite_allocator.h: Likewise.
3227 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3228 normal mode vector, even for debug mode.
3229 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3230 Define alias template for normal mode vector.
3232 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3235 * config/locale/generic/c_locale.h (__convert_from_v)
3236 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3237 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3238 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3239 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3241 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3244 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3245 data member with static member function _S_use_relocate().
3246 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3247 (vector::_M_default_append): Use _S_use_relocate() instead of
3250 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3253 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3256 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3257 write to stderr instead of using printf.
3259 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3262 * include/bits/char_traits.h (__constant_string_p,
3263 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3266 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3268 Implement C++20 P0600r1.
3269 * include/backward/hash_map: Add nodiscard attribute to empty.
3270 * include/backward/hash_set: Likewise.
3271 * backward/hashtable.h: Likewise.
3272 * include/bits/basic_string.h: Likewise.
3273 * include/bits/forward_list.h: Likewise.
3274 * include/bits/hashtable.h: Likewise.
3275 * include/bits/regex.h: Likewise.
3276 * include/bits/stl_deque.h: Likewise.
3277 * include/bits/stl_list.h: Likewise.
3278 * include/bits/stl_map.h: Likewise.
3279 * include/bits/stl_multimap.h: Likewise.
3280 * include/bits/stl_multiset.h: Likewise.
3281 * include/bits/stl_queue.h: Likewise.
3282 * include/bits/stl_set.h: Likewise.
3283 * include/bits/stl_stack.h: Likewise.
3284 * include/bits/stl_tree.h: Likewise.
3285 * include/bits/stl_vector.h: Likewise.
3286 * include/bits/unordered_map.h: Likewise.
3287 * include/bits/unordered_set.h: Likewise.
3288 * include/debug/array: Likewise.
3289 * include/experimental/any: Likewise.
3290 * include/experimental/bits/fs_path.h: Likewise.
3291 * include/experimental/internet: Likewise.
3292 * include/experimental/string_view: Likewise.
3293 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3295 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3297 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3299 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3301 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3303 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3305 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3307 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3309 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3310 info_fn_imps.hpp: Likewise.
3311 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3312 left_child_next_sibling_heap_.hpp: Likewise.
3313 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3315 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3317 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3319 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3321 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3323 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3325 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3327 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3328 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3329 * include/ext/rope: Likewise.
3330 * include/ext/slist: Likewise.
3331 * include/ext/vstring.h: Likewise.
3332 * include/profile/array: Likewise.
3333 * include/std/array: Likewise.
3334 * include/tr1/array: Likewise.
3335 * include/tr1/hashtable.h: Likewise.
3336 * include/tr1/regex: Likewise.
3337 * include/tr2/dynamic_bitset: Likewise.
3338 * include/bits/alloc_traits.h: Add nodiscard attribute to
3340 * include/experimental/memory_resource: Likewise.
3341 * include/ext/alloc_traits.h: Likewise.
3342 * include/ext/array_allocator.h: Likewise.
3343 * include/ext/bitmap_allocator.h: Likewise.
3344 * include/ext/debug_allocator.h: Likewise.
3345 * include/ext/extptr_allocator.h: Likewise.
3346 * include/ext/mt_allocator.h: Likewise.
3347 * include/ext/new_allocator.h: Likewise.
3348 * include/ext/pool_allocator.h: Likewise.
3349 * include/ext/throw_allocator.h: Likewise.
3350 * include/std/scoped_allocator: Likewise.
3351 * libsupc++/eh_alloc.cc: Likewise.
3352 * include/std/future: Add nodiscard attribute to async.
3353 * libsupc++/new: Add nodiscard attribute to new.
3355 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3360 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3361 * include/bits/shared_ptr.h
3362 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3363 (allocate_shared): Change to use new tag type.
3364 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3365 Declare new member function.
3366 (_Sp_alloc_shared_tag): Define new type.
3367 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3368 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3369 _Sp_make_shared_tag::_S_eq to check type_info.
3370 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3371 Constrain to prevent being called with _Sp_alloc_shared_tag.
3372 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3373 Replace constructor with ...
3374 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3375 reference parameter so address of the new object can be returned to
3376 the caller. Obtain the allocator from the tag type.
3377 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3378 constructor with ...
3379 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3380 to the __shared_count constructor.
3381 (__allocate_shared): Change to use new tag type.
3382 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3384 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3386 * src/c++17/fs_ops.cc
3387 (equivalent(const path&, const path&, error_code&))
3388 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3389 compare files instead of relying on incomplete info returned by stat.
3392 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3393 if the path is already absolute.
3394 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3395 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3398 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3399 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3400 of filesystem::exists.
3401 (create_directories(const path&, error_code&)): Add assertions.
3402 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3403 Add workaround for bug in _wstat for paths with trailing slash.
3404 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3405 for expected behaviour on mingw.
3406 * testsuite/experimental/filesystem/operations/create_directories.cc:
3408 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3409 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3410 not test permissions on mingw targets.
3412 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3414 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3415 constructors and open members taking wide strings. Fix patterns for
3416 filesystem::path members to match wstring_view parameters. Add
3417 exports for shared_ptr members used by directory iterators.
3418 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3419 error code parameter if the file doesn't exist.
3420 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3422 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3423 values for mingw targets, where "/" is not an absolute path. Do not
3424 test symlinks on mingw targets.
3425 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3426 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3428 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3429 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3430 that each component of the path is created.
3431 * testsuite/experimental/filesystem/operations/create_directories.cc:
3433 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3434 permissions on mingw targets.
3435 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3436 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3437 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3438 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3440 * testsuite/experimental/filesystem/operations/permissions.cc:
3442 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3443 symlinks or permissions on mingw targets.
3444 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3445 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3446 symlinks on mingw targets.
3447 * testsuite/experimental/filesystem/operations/remove_all.cc:
3449 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3450 permissions on mingw targets.
3451 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3452 test symlinks on mingw targets.
3453 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3456 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3459 Warn about unused comparisons of shared_ptr/unique_ptr
3460 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3461 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3462 <, <=, >, >= for shared_ptr.
3463 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3465 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3467 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3468 as 201611L, because P0497R0 changes are supported.
3469 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3471 * include/bits/erase_if.h [__cplusplus > 201703L]
3472 (__cpp_lib_erase_if): Only define for C++2a.
3473 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3474 (__cpp_lib_null_iterators): Define.
3475 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3476 (__cpp_lib_null_iterators): Define.
3477 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3479 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3481 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3483 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3484 changes are supported.
3485 * include/std/optional (__cpp_lib_optional): Likewise.
3486 * include/std/variant (__cpp_lib_variant): Likewise.
3487 * include/std/version [!__STRICT_ANSI__]
3488 (__cpp_lib_uncaught_exceptions): Define as long integer.
3489 [__cplusplus >= 201703L] (__cpp_lib_any)
3490 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3491 (__cpp_lib_variant): Define for C++17.
3492 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3494 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3497 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3499 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3503 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3505 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3508 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3510 * doc/xml/manual/intro.xml: Include new section.
3511 * doc/xml/manual/status_cxx2017.xml: Document more
3512 implementation-defined properties of the library.
3513 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3514 * doc/html/*: Regenerate.
3516 * include/bits/refwrap.h [__cplusplus > 201703L]
3517 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3518 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3519 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3521 (reference_wrapper::operator()): Add static assertion.
3522 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3524 * include/std/chrono (duration_values::zero(), duration_values::min())
3525 (duration_values::max()): Add noexcept.
3526 (duration::zero(), duration::min(), duration::max()): Likewise.
3527 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3528 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3529 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3531 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3533 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3535 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3536 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3538 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3541 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3542 specialization for C++17 (P0513R0, LWG 2817).
3543 * testsuite/20_util/hash/nullptr.cc: New test.
3546 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3547 pattern for std::basic_stringbuf::str().
3549 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3550 basic_ostream::operator<< patterns.
3552 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3554 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3555 test failures on targets with 32-bit time_t.
3557 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3558 * include/std/deque: Likewise.
3559 * include/std/forward_list: Likewise.
3560 * include/std/list: Likewise.
3561 * include/std/string: Likewise.
3562 * include/std/vector: Likewise.
3563 * include/std/version: Likewise.
3564 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3565 * testsuite/23_containers/deque/erasure.cc: Likewise.
3566 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3567 * testsuite/23_containers/list/erasure.cc: Likewise.
3568 * testsuite/23_containers/map/erasure.cc: Likewise.
3569 * testsuite/23_containers/set/erasure.cc: Likewise.
3570 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3571 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3572 * testsuite/23_containers/vector/erasure.cc: Likewise.
3574 * include/experimental/internet [AI_NUMERICSERV]
3575 (resolver_base::numeric_service): Define conditionally.
3576 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3578 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3581 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3582 Jonathan Wakely <jwakely@redhat.com>
3585 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3586 (GLIBCXX_3.4.26): Add new exports.
3587 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3588 correct list of sources.
3589 * include/Makefile.in: Regenerate.
3590 * include/std/ostream (operator<<(nullptr_t)): New member function.
3591 * src/c++17/ostream-inst.cc: New file.
3592 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3595 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3597 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3598 of the source file containing the caller.
3599 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3600 directories created by test.
3601 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3603 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3605 * testsuite/experimental/filesystem/iterators/
3606 recursive_directory_iterator.cc: Likewise.
3608 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3610 PR tree-optimization/88775
3611 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3612 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3613 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3614 instead of __builtin_constant_p if available. Don't bother with
3615 the pointer comparison in C++11 and earlier.
3617 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3621 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3624 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3626 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3627 for filesystem::path. Give variables more distinctive names.
3629 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3630 member function to perform non-trivial assignment.
3631 (_Optional_payload_base::_M_move_assign): Likewise.
3632 (_Optional_payload<T, true, false, true>::operator=)
3633 (_Optional_payload<T, true, true, false>::operator=)
3634 (_Optional_payload<T, true, false, false>::operator=): Call
3635 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3638 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3639 test std::complex<long double> if long double format is IBM128.
3640 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3643 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3645 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3646 for old std::unique_ptr layout.
3647 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3648 to become valueless. Add filesystem::path tests.
3651 * include/std/optional (_Optional_payload_base): New class template
3652 for common code hoisted from _Optional_payload specializations. Use
3653 a template for the union, to allow a partial specialization for
3654 types with non-trivial destructors. Add constructors for in-place
3655 initialization to the union.
3656 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3657 to perform non-trivial copy construction, instead of relying on
3658 non-standard copy elision in a delegating constructor.
3659 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3660 non-trivial move construction.
3661 (_Optional_payload): Derive from _Optional_payload_base and use it
3662 for everything except the non-trivial assignment operators, which are
3664 (_Optional_payload<false, C, M>): Derive from the specialization
3665 _Optional_payload<true, false, false> and add a destructor.
3666 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3667 Forward to corresponding members of _Optional_payload.
3668 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3669 Hoist common members from _Optional_base.
3670 (_Optional_base): Make all members and base class public.
3671 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3672 _Optional_base_impl.
3673 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3674 support for new std::optional layout.
3675 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3678 * include/bits/locale_conv.h: Use <> for includes not "".
3679 * include/ext/random: Likewise.
3680 * include/ext/vstring.h: Likewise.
3682 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3684 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3685 (GLIBCXX_3.4.21): Likewise.
3687 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3690 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3691 to match the one that controls whether utimbuf and utime are declared.
3693 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3696 * include/bits/char_traits.h (char_traits::move): Do not pass null
3697 pointers to memmove.
3698 * include/bits/locale_facets.h
3699 (ctype<char>::widen(const char*, const char*, char*)): Do not
3700 pass null pointers to memcpy.
3701 (ctype<char>::narrow(const char*, const char*, char, char*)):
3703 (ctype<char>::do_widen(const char*, const char*, char*)):
3705 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3708 * doc/xml/manual/spine.xml: Update copyright years.
3709 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3710 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3711 for C++17 filesystem library.
3712 * doc/html/*: Regenerate.
3714 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3715 * config.h.in: Regenerate.
3716 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3717 alphabetically and add missing entries for copy_symlink,
3718 hard_link_count, rename, and resize_file.
3719 * configure: Regenerate.
3720 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3721 used unconditionally.
3722 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3723 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3724 supports truncating to zero length.
3725 * testsuite/27_io/filesystem/operations/all.cc: New test.
3726 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3728 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3731 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3732 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3733 * config.h.in: Regenerate.
3734 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3735 remaining std::filesystem types and functions.
3736 * configure: Regenerate.
3737 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3738 * src/c++17/Makefile.in: Regenerate.
3739 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3740 here, and change name of included file.
3741 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3742 here, and change name of included file.
3743 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3744 path to dir-common.h.
3745 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3746 path to ops-common.h. Disable -Wunused-parameter warnings.
3747 (internal_file_clock): Define unconditionally.
3748 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3750 (do_copy_file, do_space): Move definitions to ops.common.h.
3751 (copy, file_size, hard_link_count, last_write_time, space): Only
3752 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3754 (last_write_time, read_symlink): Remove unused attributes from
3756 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3757 * src/filesystem/Makefile.in: Regenerate.
3758 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3759 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3760 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3761 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3762 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3763 dummy types and functions instead of using #error.
3764 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3765 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3767 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3768 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3769 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3770 to account for new namespace.
3771 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3772 -lstdc++fs from dg-options.
3773 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3774 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3775 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3776 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3777 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3779 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3780 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3782 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3783 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3784 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3785 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3786 * testsuite/27_io/filesystem/operations/create_directories.cc:
3788 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3789 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3790 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3791 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3792 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3793 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3794 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3795 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3796 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3797 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3798 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3799 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3800 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3801 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3802 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3803 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3804 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3805 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3807 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3811 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3812 typeinfo and vtables less greedy.
3813 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3814 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3815 * src/c++17/Makefile.in: Regenerate.
3816 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3817 here, and change name of included file.
3818 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3819 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3821 * src/filesystem/Makefile.in: Regenerate.
3822 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3823 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3824 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3825 from dg-options and remove dg-require-filesystem-ts.
3826 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3827 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3828 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3829 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3830 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3831 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3832 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3833 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3834 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3835 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3836 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3837 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3838 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3839 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3840 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3841 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3842 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3843 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3844 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3845 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3846 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3848 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3849 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3850 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3851 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3852 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3853 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3854 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3855 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3856 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3857 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3858 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3859 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3861 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3863 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3865 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3867 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3868 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3869 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3870 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3871 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3872 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3873 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3874 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3875 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3876 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3878 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3879 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3880 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3881 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3882 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3885 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3886 Check is_trivially_copyable instead of is_scalar.
3887 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3888 contained value can throw and its type is trivially copyable then
3889 construct into a temporary variant and move from it, to provide the
3890 strong exception safety guarantee.
3891 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3893 * testsuite/20_util/variant/87431.cc: New test.
3894 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3895 conversion causes valueless state.
3898 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3899 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3900 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3901 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3902 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3904 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3906 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3907 (file_time_type): Redefine in terms of __file_clock.
3908 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3910 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3912 (internal_file_lock): New helper type for accessing __file_clock.
3913 (do_copy_file): Use internal_file_lock to convert system time to
3915 (last_write_time(const path&, error_code&)): Likewise.
3916 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3918 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3920 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3921 for const member functions of std::basic_string.
3922 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3924 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3925 Make non-standard constructor private.
3926 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3928 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3929 explicit instantiations for C++17 as well as earlier dialects.
3930 * src/c++17/Makefile.am: Add new source files.
3931 * src/c++17/Makefile.in: Regenerate.
3932 * src/c++17/cow-string-inst.cc: New file defining explicit
3933 instantiations for basic_string member functions added in C++17.
3934 * src/c++17/string-inst.cc: Likewise.
3936 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3937 copy/move constructors for old std::basic_string.
3938 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3939 (basic_string::reference, basic_string::const_reference): Define
3940 as plain references for C++11 and later.
3941 (basic_string::basic_string()): Put constructor body outside
3942 preprocessor conditional groups.
3943 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3944 instead of copying it.
3945 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3947 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3949 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3950 cases for old basic_string.
3951 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3952 allocator-extended constructors unconditionally. Add extra members to
3953 allocator type when using old string ABI.
3954 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3956 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3958 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3959 -fno-inline added to test flags.
3961 * testsuite/21_strings/basic_string/requirements/
3962 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3964 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3965 assertion failures with old std::string ABI.
3967 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3969 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3970 functions that will only erase elements at the end.
3971 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3972 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3973 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3975 (path::_List::pop_back()): Define.
3976 (path::_List::_M_erase_from(const_iterator)): Define.
3977 (path::operator/=(const path&)): Use pop_back to remove last component
3978 and _M_erase_from to remove multiple components.
3979 (path::_M_append(basic_string_view<value_type>)): Likewise.
3980 (path::operator+=(const path&)): Likewise.
3981 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3982 (path::remove_filename()): Likewise.
3983 (path::lexically_normal()): Use _List::_Impl iterators instead of
3984 path::iterator. Use pop_back to remove components from the end. Clear
3985 trailing filename, instead of using erase(const_iterator) to remove
3986 a non-final component.
3987 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3989 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3991 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3992 incorrect treatment of empty filename after trailing slash.
3993 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3995 * testsuite/21_strings/basic_string/modifiers/assign/char/
3996 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3998 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3999 move_assign_optim.cc: Likewise.
4001 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4002 Jakub Jelinek <jakub@redhat.com>
4005 * include/experimental/memory: Replace UTF-8 quote characters.
4006 * include/std/future: Replace UTF-8 "em dash" characters.
4008 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4011 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4012 * include/debug/forward_list: Likewise.
4013 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4015 * include/experimental/chrono: Likewise.
4016 * include/experimental/functional: Likewise.
4017 * include/experimental/ratio: Likewise.
4018 * include/experimental/system_error: Likewise.
4019 * include/experimental/tuple: Likewise.
4020 * include/experimental/type_traits: Likewise.
4021 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4022 * include/parallel/multiseq_selection.h: Likewise.
4025 * config/abi/pre/gnu.ver: Add missing exports.
4026 * testsuite/22_locale/collate_byname/88681.cc: New test.
4027 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4028 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4030 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4032 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4033 initializer_list<value_type> and from input iterator ranges.
4034 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4036 * testsuite/experimental/string_view/element_access/char/empty.cc:
4037 Fix year range in copyright header.
4039 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4041 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4042 Fix year range in copyright header.
4044 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4046 Update copyright years.
4048 Copyright (C) 2019 Free Software Foundation, Inc.
4050 Copying and distribution of this file, with or without modification,
4051 are permitted in any medium without royalty provided the copyright
4052 notice and this notice are preserved.