]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
compiler: improve write barrier generation
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
756e59b0 12019-06-07 Jonathan Wakely <jwakely@redhat.com>
2
92964728 3 * testsuite/24_iterators/container_access.cc: Move dg-options before
4 dg-do directive so the target check uses the -std option.
5
756e59b0 6 PR libstdc++/90770
7 * configure: Regenerate.
8 * src/Makefile.am (stamp-debug): Also test for missing makefile.
9 * src/Makefile.in: Regenerate.
10
42c1dacd 112019-06-06 Jonathan Wakely <jwakely@redhat.com>
12
9eb6db53 13 * include/std/array: Do not include <stdexcept>.
14 * include/std/optional: Include <exception> and
15 <bits/exception_defines.h> instead of <stdexcept>.
16 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
17 for std::isalnum.
18 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
19 std::allocator.
20 * testsuite/23_containers/map/erasure.cc: Include <string>.
21 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
22
2bc51486 23 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
24 dg-prune-output for different C++98 diagnostic.
25 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
26 Likewise.
27 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
28 Likewise.
29 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
30 Likewise.
31 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
32 Likewise.
33 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
34 Likewise.
35 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
36 Likewise.
37 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
38 Likewise.
39 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
40 Likewise.
41 * testsuite/23_containers/vector/requirements/dr438/
42 constructor_1_neg.cc: Likewise.
43 * testsuite/23_containers/vector/requirements/dr438/
44 constructor_2_neg.cc: Likewise.
45 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
46 Likewise.
47 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
48
191c4715 49 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
50 Do not test allocator rebinding extension for C++2a.
51 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
52 dg-do directive for C++17 and C++2a.
53
19516e33 54 * testsuite/23_containers/deque/requirements/explicit_instantiation/
55 1_c++0x.cc: Remove redundant test.
56 * testsuite/23_containers/deque/requirements/explicit_instantiation/
57 2.cc: Use target selector instead of preprocessor condition.
58 * testsuite/23_containers/deque/requirements/explicit_instantiation/
59 3.cc: Do not run test for C++2a.
60 * testsuite/23_containers/forward_list/requirements/
61 explicit_instantiation/3.cc: Likewise.
62 * testsuite/23_containers/forward_list/requirements/
63 explicit_instantiation/5.cc: Do not test allocator rebinding extension
64 for C++2a.
65 * testsuite/23_containers/list/requirements/explicit_instantiation/
66 1_c++0x.cc: Remove redundant test.
67 * testsuite/23_containers/list/requirements/explicit_instantiation/
68 2.cc: Use target selector instead of preprocessor condition.
69 * testsuite/23_containers/list/requirements/explicit_instantiation/
70 3.cc: Do not run test for C++2a.
71 * testsuite/23_containers/list/requirements/explicit_instantiation/
72 5.cc: Do not test allocator rebinding extension for C++2a.
73 * testsuite/23_containers/map/requirements/explicit_instantiation/
74 1_c++0x.cc: Remove redundant test.
75 * testsuite/23_containers/map/requirements/explicit_instantiation/
76 2.cc: Adjust comment.
77 * testsuite/23_containers/map/requirements/explicit_instantiation/
78 3.cc: Do not run test for C++2a.
79 * testsuite/23_containers/map/requirements/explicit_instantiation/
80 5.cc: Do not test allocator rebinding extension for C++2a.
81 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
82 1_c++0x.cc: Remove redundant test.
83 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
84 3.cc: Do not run test for C++2a.
85 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
86 5.cc: Do not test allocator rebinding extension for C++2a.
87 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
88 3.cc: Do not run test for C++2a.
89 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
90 5.cc: Do not test allocator rebinding extension for C++2a.
91 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
92 Do not run test for C++2a.
93 * testsuite/23_containers/set/requirements/explicit_instantiation/
94 1_c++0x.cc: Remove redundant test.
95 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
96 Do not test allocator rebinding extension for C++2a.
97 * testsuite/23_containers/unordered_map/requirements/
98 explicit_instantiation/3.cc: Likewise.
99 * testsuite/23_containers/unordered_map/requirements/
100 explicit_instantiation/5.cc: Do not test allocator rebinding extension
101 for C++2a.
102 * testsuite/23_containers/unordered_multimap/requirements/
103 explicit_instantiation/3.cc: Do not run test for C++2a.
104 * testsuite/23_containers/unordered_multimap/requirements/
105 explicit_instantiation/5.cc: Do not test allocator rebinding extension
106 for C++2a.
107 * testsuite/23_containers/unordered_multiset/requirements/
108 explicit_instantiation/3.cc: Do not run test for C++2a.
109 * testsuite/23_containers/unordered_multiset/requirements/
110 explicit_instantiation/5.cc: Do not test allocator rebinding extension
111 for C++2a.
112 * testsuite/23_containers/unordered_set/requirements/
113 explicit_instantiation/3.cc: Do not run test for C++2a.
114 * testsuite/23_containers/unordered_set/requirements/
115 explicit_instantiation/5.cc: Do not test allocator rebinding extension
116 for C++2a.
117 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
118 2.cc: Remove redundant test.
119 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
120 3.cc: Do not run test for C++2a.
121 * testsuite/23_containers/vector/requirements/explicit_instantiation/
122 3.cc: Likewise.
123
6ffe4cf3 124 * include/std/type_traits (is_empty, is_polymorphic, is_final)
125 (is_abstract, is_aggregate): Remove static_assert.
126 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
127 from builtin only.
128 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
129 missing -std=gnu++17 option.
130 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
131 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
132 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
133 from builtin only.
134
186ade93 135 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
136 * testsuite/18_support/set_unexpected.cc: Likewise.
137 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
138 void.
139 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
140 function to be valid in C++11.
141 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
142 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
143 include Library Fundamentals or Networking headers in C++11 mode.
144 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
145
42c1dacd 146 * include/std/tuple (_TC): Replace with _TupleConstraints.
147 (_TupleConstraints): New helper for SFINAE constraints, with more
148 expressive member functions to reduce duplication when used.
149 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
150 (tuple::_TCC): Replace dummy type parameter with bool non-type
151 parameter that can be used to check the pack size.
152 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
153 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
154 checking constraints in constructors.
155 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
156 New SFINAE helpers.
157 (tuple::tuple): Use new helpers to reduce repitition in constraints.
158 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
159 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
160 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
161 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
162 constraints in constructors.
163 (tuple::__is_alloc_arg()): New SFINAE helpers.
164 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
165 constraints.
166 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
167 * testsuite/20_util/tuple/cons/90700.cc: New test.
168 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
169 to meet new constraint on allocator-extended default constructor.
170
d0226ba4 1712019-06-03 Jonathan Wakely <jwakely@redhat.com>
172
173 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
174 * include/bits/stl_multimap.h (multimap): Likewise.
175
046bb3cb 1762019-06-03 François Dumont <fdumont@gcc.gnu.org>
177
178 Rename variables and cleanup comments.
179 * include/bits/hashtable_policy.h
180 * include/bits/hashtable.h
181
5c70715f 1822019-06-03 Jonathan Wakely <jwakely@redhat.com>
183
2b018df4 184 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
185 Fix bgcolor for P0340R3.
186 * doc/html/*: Regenerate.
187
fbf62452 188 PR libstdc++/90686
189 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
190 <experimental/memory_resource>.
191 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
192 P0339R6, P0340R3, P1164R1 and P1357R1.
193 * doc/html/*: Regenerate.
194
5c70715f 195 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
196 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
197 allocator::value_type assertion for C++2a.
198 * include/bits/hashtable.h: Likewise.
199 * include/bits/stl_deque.h: Likewise.
200 * include/bits/stl_list.h: Likewise.
201 * include/bits/stl_map.h: Likewise.
202 * include/bits/stl_multimap.h: Likewise.
203 * include/bits/stl_multiset.h: Likewise.
204 * include/bits/stl_set.h: Likewise.
205 * include/bits/stl_vector.h: Likewise.
206 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
207 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
208 * testsuite/23_containers/list/48101-3_neg.cc: New test.
209 * testsuite/23_containers/map/48101-3_neg.cc: New test.
210 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
211 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
212 * testsuite/23_containers/set/48101-3_neg.cc: New test.
213 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
214 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
215 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
216 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
217 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
218
3e2001db 2192019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
220
221 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
222
065a9dd4 2232019-05-31 Jonathan Wakely <jwakely@redhat.com>
224
225 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
226 constructors.
227 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
228 function.
229 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
230
1ff189c5 2312019-05-31 Jonathan Wakely <jwakely@redhat.com>
232
698373bc 233 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
234
b74a9c1a 235 PR libstdc++/90682
236 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
237 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
238 * libsupc++/eh_term_handler.h: New header defining
239 _GLIBCXX_DEFAULT_TERM_HANDLER.
240 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
241 (set_terminate): Restore default handler when argument is null.
242 (set_unexpected): Likewise.
243 * testsuite/18_support/set_terminate.cc: New test.
244 * testsuite/18_support/set_unexpected.cc: New test.
245
1ff189c5 246 * include/backward/hashtable.h (size_t, ptrdiff_t)
247 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
248 (distance, vector, pair, __iterator_category): Remove
249 using-declarations that add these names to namespace __gnu_cxx.
250 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
251 * include/ext/debug_allocator.h (size_t): Likewise.
252 * include/ext/functional (size_t, unary_function, binary_function)
253 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
254 Likewise.
255 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
256 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
257 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
258 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
259 * include/ext/numeric (iota): Fix outdated comment.
260 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
261 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
262 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
263 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
264 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
265 Likewise.
266 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
267 (allocator, __true_type, __false_type): Likewise.
268
c12402f6 2692019-05-31 Antony Polukhin <antoshkka@gmail.com>
270
271 PR libstdc++/71579
272 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
273 New helpers for checking preconditions in traits.
274 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
275 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
276 (is_destructible, is_nothrow_destructible, is_constructible)
277 (is_default_constructible, is_copy_constructible)
278 (is_move_constructible, is_nothrow_default_constructible)
279 (is_nothrow_constructible, is_nothrow_copy_constructible)
280 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
281 (is_nothrow_assignable, is_nothrow_copy_assignable)
282 (is_nothrow_move_assignable, is_trivially_constructible)
283 (is_trivially_copy_constructible, is_trivially_move_constructible)
284 is_trivially_assignable, is_trivially_copy_assignable)
285 (is_trivially_move_assignable, is_trivially_destructible)
286 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
287 (is_invocable_r, is_nothrow_invocable)
288 (has_unique_object_representations, is_aggregate): Add static_asserts
289 to make sure that type traits are not misused with incomplete types.
290 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
291 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
292 base characteristics without assertions that can be reused in other
293 traits.
294 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
295 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
296 test.
297 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
298 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
299 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
300 * testsuite/20_util/is_class/value.cc: Check incomplete type.
301 * testsuite/20_util/is_function/value.cc: Likewise.
302 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
303 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
304 test.
305 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
306 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
307 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
308 * testsuite/20_util/is_union/value.cc: Likewise.
309 * testsuite/20_util/is_void/value.cc: Likewise.
310 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
311
84121f8a 3122019-05-31 Jonathan Wakely <jwakely@redhat.com>
313
314 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
315 Add new private member function.
316 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
317 (random_device::_M_init_pretr1(const string&)): Call new private
318 member with string data.
319 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
320 Define.
321 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
322 test using COW strings.
323 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
324 a value from the device.
325 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
326 Fix typo in token string.
327
01cad9ee 3282019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
329
330 LWG2788 basic_string spurious use of a default constructible allocator
331 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
332 (basic_string::_M_replace_dispatch): Construct temporary string with
333 the current allocator.
334 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
335 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
336
aa4108cd 3372019-05-30 Jonathan Wakely <jwakely@redhat.com>
338
d1e7b14b 339 * doc/xml/manual/diagnostics.xml: Update list of headers that define
340 exception classes.
341 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
342 section about new/delete overloads. Improve section on verbose
343 terminate handler.
344 * doc/html/*: Regenerate.
345
2a9eab7c 346 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
347 P0811R3. Change status of P1353R0.
348 * doc/html/*: Regenerate.
349
aa4108cd 350 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
351 documentation of implementation-defined types for [thread.req.native].
352 * doc/xml/manual/status_cxx2017.xml: Update documentation of
353 implementation-defined strings for [variant.bad.access]. Fix typo in
354 documentation of implementation-defined support for [fs.conform.9945].
355 * doc/html/*: Regenerate.
356
91df033f 3572019-05-29 Jonathan Wakely <jwakely@redhat.com>
358
745ff931 359 PR libstdc++/85494
360 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
361 that fails on mingw-w64.
362
34bfd0d6 363 PR libstdc++/88881
364 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
365 (status(const path&, error_code&)): Use parent_path() to remove
366 trailing slash.
367 (symlink_status(const path&, error_code&)): Duplicate workaround for
368 bug in _wstat for paths with trailing slash.
369 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
370 with trailing slash.
371 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
372 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
373
5e115b34 374 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
375 once instead of building it iteratively.
376
913f5ef9 377 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
378
91df033f 379 PR libstdc++/85494 use rdseed and rand_s in std::random_device
380 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
381 the assembler supports rdseed.
382 * config.h.in: Regenerate.
383 * configure: Regenerate.
384 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
385 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
386 * doc/html/*: Regenerate.
387 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
388 * include/bits/random.h (random_device::random_device()): Always call
389 _M_init rather than _M_init_pretr1.
390 (random_device::random_device(const string&)): Likewise.
391 (random_device::operator()()): Always call _M_getval().
392 (random_device::_M_file): Replace first member of union with an
393 anonymous struct, with _M_file as its first member.
394 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
395 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
396 (USE_MT19937): Define if none of the above are defined.
397 (USE_POSIX_FILE_IO): Define.
398 (_M_strtoul): Remove.
399 [USE_RDSEED] (__x86_rdseed): Define new function.
400 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
401 (random_device::_M_init(const string&)): Initialize new union members.
402 Add support for "rdseed" and "rand_s" tokens. Decide what the
403 "default" token does according to which USE_* macros are defined.
404 [USE_POSIX_FILE_IO]: Store a file descriptor.
405 [USE_MT19937]: Forward to _M_init_pretr1 instead.
406 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
407 code from _M_strtoul.
408 [!USE_MT19937]: Call _M_init, transforming the old default token or
409 numeric tokens to "default".
410 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
411 (random_device::_M_getval()): Use new union members to obtain a
412 random number from the stored function pointer or file descriptor.
413 [USE_MT19937]: Obtain a value from the mt19937 engine.
414 (random_device::_M_getval_pretr1()): Call _M_getval().
415 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
416 instead of fileno.
417 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
418 * testsuite/26_numerics/random/random_device/85494.cc: New test.
419
88c39923 4202019-05-28 Jonathan Wakely <jwakely@redhat.com>
421
28d9dbe9 422 PR libstdc++/90634
423 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
424 _M_split_cmpts() for a path with multiple components.
425 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
426 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
427 components and reserve space in vector. Return early when there is
428 only one component.
429 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
430 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
431
88c39923 432 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
433 form of std::equals for C++11 compatibility.
434
ba475497 4352019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
436
437 * doc/xml/manual/appendix_contributing.xml: Update pointer to
438 C++ standard at ansi.org.
439
6c35f2e2 4402019-05-24 Jonathan Wakely <jwakely@redhat.com>
441
62ff07d4 442 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
443 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
444 to "run".
445
6c35f2e2 446 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
447 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
448
e0a966c0 4492019-05-23 Jonathan Wakely <jwakely@redhat.com>
450
2b16b231 451 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
452 tests to ...
453 * testsuite/20_util/function_objects/invoke/3.cc: New test.
454 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
455 "compile" test to "run".
456
a00d36cd 457 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
458 * doc/html/*: Regenerate.
459 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
460 rvalue aliasing constructor.
461 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
462 (reinterpret_pointer_cast): Add overloads taking rvalues.
463 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
464 Add rvalue aliasing constructor.
465 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
466 "run" and check return values as well as types.
467 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
468 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
469 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
470 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
471 values.
472
e0a966c0 473 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
474 * doc/xml/manual/intro.xml: Likewise.
475 * include/std/future (__create_task_state): Add default arguments
476 to make providing an allocator optional.
477 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
478 instead of delegating to another constructor.
479 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
480 define allocator-extended constructors for C++17 and later.
481 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
482 C++11 and C++14.
483 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
484 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
485 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
486
8e2a1096 4872019-05-23 Hans-Peter Nilsson <hp@axis.com>
488
489 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
490 Don't run the libstdc++/83237 part on simulator targets.
491
1db1e5cc 4922019-05-23 Jonathan Wakely <jwakely@redhat.com>
493
01e2f379 494 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
495 P0040R3.
496 * doc/html/*: Regenerate.
497
683f9728 498 * include/experimental/any (__any_caster): Use RTTI if comparing
499 addresses fails, to support non-unique addresses in shared libraries.
500 * include/std/any (__any_caster): Likewise.
501
1db1e5cc 502 PR libstdc++/90220
503 * include/experimental/any (__any_caster): Constrain to only be
504 callable for object types. Use remove_cv_t instead of decay_t.
505 If the type decays or isn't copy constructible, compare the manager
506 function to a dummy specialization.
507 (__any_caster): Add overload constrained for non-object types.
508 (any::_Manager_internal<_Op>): Add dummy specialization.
509 * testsuite/experimental/any/misc/any_cast.cc: Test function types
510 and array types.
511
0fd64d4b 5122019-05-22 Jonathan Wakely <jwakely@redhat.com>
513
f92c002f 514 PR libstdc++/90557
515 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
516 reversed arguments to uninitialized_copy_n.
517 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
518 is unchanged by copy assignment.
519 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
520 compare path components.
521
0fd64d4b 522 PR libstdc++/77691
523 * include/experimental/memory_resource: Add system header pragma and
524 do not define anything unless compiled as C++14 or later.
525 (__resource_adaptor_common::__guaranteed_alignment): Remove.
526 (__resource_adaptor_imp::do_allocate): If the requested alignment
527 is a fundamental alignment then either allocate directly from _M_alloc
528 or call the new _M_allocate function.
529 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
530 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
531 of the allocator rebound to a POD type with the specified alignment.
532 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
533 * testsuite/experimental/memory_resource/new_delete_resource.cc:
534 Adjust expected allocation sizes.
535 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
536 xfail for Solaris x86.
537
71835cce 5382019-05-21 Thomas Rodgers <trodgers@redhat.com>
539
540 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
541 * include/pstl/execution_defs.h (__enable_if_execution_policy):
542 Use std::__remove_cvref_t when building with GCC.
543
28ceb89c 5442019-05-21 Jonathan Wakely <jwakely@redhat.com>
545
f6baa5a2 546 PR libstdc++/90252
547 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
548 Use "additional_flags" to pass -ltbb to v3_target_compile command.
549 Use check_v3_target_prop_cached to cache the result of the test.
550
28ceb89c 551 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
552
4573584f 5532019-05-20 Thomas Rodgers <trodgers@redhat.com>
554
555 PR libstdc++/90252
556 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
557 Changed v3_target_compile check from preprocess to executable.
558 Added "-ltbb" to v3_target_compile flags.
559
c40bd82f 5602019-05-20 Thomas Rodgers <trodgers@redhat.com>
561
562 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
563 Add check for Thread Building Blocks 2018 or later.
564
4b6650e5 5652019-05-20 Jonathan Wakely <jwakely@redhat.com>
566
567 * testsuite/experimental/names.cc: Only include Networking TS headers
568 on targets with the necessary Gthreads support.
569
31d01c8b 5702019-05-20 Marek Polacek <polacek@redhat.com>
571
572 CWG 2094 - volatile scalars are trivially copyable.
573 PR c++/85679
574 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
575 result for volatile int.
576
48328bff 5772019-05-20 Jonathan Wakely <jwakely@redhat.com>
578
120050c3 579 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
580 * testsuite/experimental/names.cc: Include <experimental/filesystem>
581 conditionally.
582
48328bff 583 PR c++/90532 Ensure __is_constructible(T[]) is false
584 * include/std/type_traits (__do_is_default_constructible_impl)
585 (__is_default_constructible_atom, __is_default_constructible_safe):
586 Remove.
587 (is_default_constructible): Use is_constructible.
588 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
589 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
590 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
591 * testsuite/20_util/is_trivially_default_constructible/value.cc:
592 Likewise.
593
d07edb65 5942019-05-20 Pádraig Brady <pbrady@fb.com>
595
596 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
597 to the deallocator with -fsized-deallocation.
598
ca32b3df 5992019-05-20 Jonathan Wakely <jwakely@redhat.com>
600
601 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
602 test by passing correct alignment to deallocate function.
603
83454be6 6042019-05-18 Jonathan Wakely <jwakely@redhat.com>
605
606 PR libstdc++/90520
607 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
608 Raise exception if unique_ptr tuple member has unknown structure.
609 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
610 Adjust worker to support new __uniq_ptr_data base class. Do not
611 assume field called _M_head_impl is the first tuple element.
612
18788b25 6132019-05-17 François Dumont <fdumont@gcc.gnu.org>
614
615 * include/bits/stl_deque.h
616 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
617 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
618 (_Deque_base::_Deque_impl_data): New.
619 (_Deque_base::_Deque_impl): Inherit latter.
620 (_Deque_base::_Deque_impl::_M_swap_data): Move...
621 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
622 (_Deque_base::_Deque_impl()): Add noexcept qualification.
623 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
624 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
625 (deque<>::deque()): Default.
626 (deque<>::deque(deque&&)): Default.
627 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
628 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
629 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
630 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
631 _M_range_initialize.
632 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
633 (deque<>::resize(size_type, const value_type&)): Share a single
634 implementation.
635 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
636 _M_range_insert_aux.
637 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
638 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
639 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
640 * testsuite/23_containers/deque/allocator/default_init.cc: New.
641
f02e0f08 6422019-05-17 Jonathan Wakely <jwakely@redhat.com>
643
9bf46b60 644 PR libstdc++/90246
645 * include/std/variant (holds_alternative, get, get_if): Improve
646 static assertion messages.
647 (bad_variant_access::bad_variant_access()): Change default message.
648 (__throw_bad_variant_access(bool)): New overload.
649 (get): Use new overload.
650 (visit, visit<R>): Improve exception message.
651
ac93735b 652 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
653 targets. Add more cases from P0608R3.
654 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
655
8d58624a 656 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
657 * include/experimental/type_traits (is_detected_exact)
658 (is_detected_exact_v): Likewise.
659 * include/pstl/execution_defs.h (is_execution_policy)
660 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
661 * include/pstl/execution_impl.h (__policy_traits): Likewise.
662 * testsuite/17_intro/names.cc: Check for more non-reserved names.
663 * testsuite/experimental/names.cc: New test.
664
5d3695d0 665 PR libstdc++/85965
666 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
667 assertions from the destructor.
668 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
669 Move static_assert for hash function to here.
670 (_Hash_table_base::_M_equals): Move static_assert for equality
671 predicate to here.
672 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
673 Remove.
674 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
675 the value directly instead of calling _S_value.
676 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
677 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
678 _S_key(_Const_Link_type).
679 * testsuite/23_containers/set/85965.cc: Check construction,
680 destruction, assignment and size() do not trigger the assertions.
681 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
682 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
683 expected errors.
684 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
685 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
686 * testsuite/23_containers/set/48101_neg.cc: Likewise.
687 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
688 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
689 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
690 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
691
2e431291 692 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
693 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
694 in C++11.
695
f02e0f08 696 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
697 P1165R1 entries.
698 * doc/html/*: Regenerate.
699 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
700 of decay_t (P0777R1).
701
0cde8d2e 7022019-05-17 François Dumont <fdumont@gcc.gnu.org>
703
704 Move from state of allocators (LWG2593)
705 * include/bits/stl_deque.h
706 (_Deque_base(_Deque_base&&, false_type)): Remove.
707 (_Deque_base(_Deque_base&&, true_type)): Remove.
708 (_Deque_base(_Deque_base&&)): Adapt.
709 (_Deque_base::_M_move_impl()): Remove.
710 * testsuite/util/testsuite_allocator.h
711 (propagating_allocator(propagating_allocator&&)): Preserve move from
712 state.
713 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
714 Adapt.
715 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
716 Adapt.
717 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
718 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
719 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
720 Adapt.
721 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
722 Adapt.
723 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
724 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
725 (test02): Adapt.
726 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
727 (test02): Adapt.
728 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
729 (test02): Adapt.
730 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
731 (test02): Adapt.
732 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
733 Adapt.
734 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
735 Adapt.
736 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
737 (test02): Adapt.
738 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
739 (test02): Adapt.
740
68605c77 7412019-05-16 Jonathan Wakely <jwakely@redhat.com>
742
4a0707ea 743 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
744 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
745
a8a0d164 746 * include/std/variant (__overload_set): Remove.
747 (_Arr): New helper.
748 (_Build_FUN): New class template to define a single FUN overload,
749 with specializations to prevent unwanted conversions, as per P0608R3.
750 (_Build_FUNs): New class template to build an overload set of FUN.
751 (_FUN_type): New alias template to perform overload resolution.
752 (__accepted_type): Use integer_constant base for failure case. Use
753 _FUN_type for successful case.
754 (variant::__accepted_index): Use _Tp instead of _Tp&&.
755 (variant::variant(_Tp&&)): Likewise.
756 (variant::operator=(_Tp&&)): Likewise.
757
facad3f4 758 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
759 Replace raw visitation with a runtime check for the valueless state
760 and a non-raw visitor.
761 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
762 (variant::index()): Remove branch.
763 (variant::swap(variant&)): Use valueless_by_exception() instead of
764 comparing the index to variant_npos, and add likelihood attribute.
765
47376ba0 766 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
767 (_Hashtable_base::_Equal_hash_code): Define new class template.
768 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
769 _Equal_helper.
770
81262974 771 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
772 Replace with _M_get non-static member function.
773 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
774 member function.
775 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
776 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
777
68605c77 778 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
779 _S_get accessors for members in EBO helpers.
780 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
781 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
782 overloads.
783 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
784 helpers.
785 (_Hashtable_base::_M_eq()): Remove non-const overload.
786
970ec9ab 7872019-05-15 Jonathan Wakely <jwakely@redhat.com>
788
789 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
790
54f34abb 7912019-05-14 Jonathan Wakely <jwakely@redhat.com>
792
793 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
794 Fix return value.
795
0fd03648 7962019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
797
798 * config/os/solaris/solaris2.10: Move to ...
799 * config/os/solaris: ... this.
800 * configure.host (os_include_dir): Adapt.
801 (abi_baseline_pair): Remove Solaris 10 handling.
802 * config/abi/post/i386-solaris2.10: Remove.
803 * config/abi/post/sparc-solaris2.10: Remove.
804 * config/abi/post/i386-solaris2.11: Rename to ...
805 * config/abi/post/i386-solaris: ... this.
806 * config/abi/post/sparc-solaris2.11: Rename to ...
807 * config/abi/post/sparc-solaris: ... this.
808
809 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
810 workaround.
811
812 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
813 xfail.
814
f03f26fa 8152019-05-14 Jonathan Wakely <jwakely@redhat.com>
816
817 * include/std/variant (__visit_with_index): Remove typedef.
818 (__deduce_visit_result): New tag type.
819 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
820 visitation of possibly-valueless variants, forwarding to __do_visit
821 with the relevant tag type.
822 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
823 and make lambda return void.
824 (__variant_construct): Likewise.
825 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
826 __raw_idx_visit and make lambda return void.
827 (_Multi_array::__untag_result): Add metafunction to check the function
828 pointer type for a tag type that dictates the kind of visitation.
829 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
830 Use decltype(auto) instead of tagged function pointer type.
831 (__gen_vtable_impl): Remove bool non-type parameter and unused
832 _Variant_tuple parameter.
833 (__gen_vtable_impl::__visit_invoke_impl): Remove.
834 (__gen_vtable_impl::__do_visit_invoke): Remove.
835 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
836 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
837 for the visit<R> case, rather than dispatching to separate functions.
838 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
839 lambda return void.
840 (variant::swap): Likewise.
841 (__do_visit): Replace two non-type template parameters with a single
842 type parameter, so that the caller must specify the visitor's return
843 type (or one of the tag types).
844 (visit): Deduce a return type from the visitor and use the
845 __deduce_visit_result tag to enforce that all overloads return the
846 same type.
847 (visit<R>): Call __do_visit<R> with explicit result type.
848 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
849 lambda return void.
850
b8dcd41e 8512019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
852
853 nonesuch is insufficiently useless (lwg2996)
854 * include/std/type_traits (struct __nonesuch): Added private base
855 class to make __nonesuch not an aggregate and removed deleted default
856 constructor.
857 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
858 (operator=(const pair&)): Use __nonesuch instead of
859 __nonesuch_no_braces.
860 (operator=(pair&&)): Likewise
861 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
862 of __nonesuch_no_braces.
863 (operator=(tuple&&)): Likewise
864 * include/experimental/type_traits (struct nonesuch): Added private
865 base class to make nonesuch not an aggregate and removed deleted
866 default constructor.
867 * testsuite/20_util/nonesuch/nonesuch.cc: New.
868 * testsuite/experimental/type_traits/nonesuch.cc: New.
869
e0bcd31d 8702019-05-14 Jonathan Wakely <jwakely@redhat.com>
871
3ff2b640 872 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
873 (_Function_handler): Remove partial specializations for void return
874 types and pointers to member.
875 (_Function_handler::_M_manager): Adapt to removal of
876 _Simple_type_wrapper.
877 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
878 * include/std/functional (_Bind_result::__enable_if_void)
879 (_Bind_result::__disable_if_void): Remove sfinae helpers.
880 (_Bind_result::__call): Use __invoke_r and remove overloads for void
881 return types.
882 * include/std/future (__future_base::_Task_state::_M_run)
883 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
884 change return type of lambda expressions.
885
a858e2a4 886 * include/bits/invoke.h (__invoke_r): Define new function implementing
887 the INVOKE<R> pseudo-function.
888 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
889 * testsuite/20_util/function_objects/invoke/2.cc: New test.
890
2cfc6a76 891 * include/std/type_traits (__is_nt_convertible_helper): Define it
892 unconditionally, not only for C++20.
893 (__is_nothrow_convertible): Define internal trait for use in C++11.
894 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
895 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
896 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
897 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
898 that has nothrow explicit conversion but potentially-throwing implicit
899 conversion.
900 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
901 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
902 function to only consider implicit conversions.
903 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
904
e0d65374 905 * include/std/iterator: Include <iosfwd> instead of <istream> and
906 <ostream>.
907
4a182e12 908 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
909 Remove unused, non-standard function.
910
d4a9b293 911 * include/bits/regex.h (match_results::max_size()): Adjust return
912 value to account for prefix/suffix/unmatched subs.
913 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
914 reset the contained sub matches.
915 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
916 function to set result state following a failed match.
917 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
918 sub_match states after _M_resize. Use _M_establish_failed_match.
919
e0bcd31d 920 PR libstdc++/69724
921 * include/std/thread (thread::_State_impl, thread::_S_make_state):
922 Replace single _Callable parameter with variadic _Args pack, to
923 forward them directly to the tuple of decayed copies.
924 * testsuite/30_threads/thread/cons/69724.cc: New test.
925
872d7a1f 9262019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
927
928 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
929 * include/bits/basic_string.h: (operator=(const basic_string&):
930 Move allocator decision to assign.
931 (assign(const basic_string&)): Move allocator decision here.
932 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
933 Add tests.
934 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
935 Add tests.
936
67dff8a4 9372019-05-14 Jonathan Wakely <jwakely@redhat.com>
938
155856f9 939 * testsuite/util/testsuite_allocator.h (memory_resource)
940 (default_resource_mgr): Fix indentation.
941
94e98eda 942 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
943 Use operator-> to access raw pointer member.
944 * testsuite/23_containers/vector/59829.cc: Likewise.
945 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
946 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
947 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
948 for tests.
949 (PointerBase, PointerBase_void): Derive from NullablePointer and use
950 its constructors and equality operators. Change converting
951 constructors to use operator-> to access private member of the other
952 pointer type.
953 (PointerBase_void::operator->()): Add, for access to private member.
954 (operator-(PointerBase, PointerBase)): Change to hidden friend.
955 (operator==(PointerBase, PointerBase)): Remove.
956 (operator!=(PointerBase, PointerBase)): Remove.
957
8ac285f1 958 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
959 not assume field called _M_head_impl is the first tuple element.
960 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
961 implementation more accurate.
962 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
963 empty pointer type and non-empty deleter.
964
67dff8a4 965 LWG 2899 - Make is_move_constructible correct for unique_ptr
966 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
967 move assignment operator.
968 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
969 (__uniq_ptr_data): New class template with conditionally deleted
970 special members.
971 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
972 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
973 constructor and move assignment operator as defaulted.
974 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
975 __uniq_ptr_impl::release().
976 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
977 to __uniq_ptr_impl::reset(pointer).
978 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
979 Check for new __uniq_ptr_data type.
980 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
981
6818ab51 9822019-05-13 Jonathan Wakely <jwakely@redhat.com>
983
fecfaafd 984 PR libstdc++/90454.cc path construction from void*
985 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
986 pointers to void are rejected as well as void.
987 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
988 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
989 pointers to void.
990 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
991
6818ab51 992 * doc/xml/manual/policy_data_structures.xml: Comment out stray
993 <remark> elements. Fix formatting of bibliography references.
994
8967657e 9952019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
996
997 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
998
8dd55415 9992019-05-13 Jonathan Wakely <jwakely@redhat.com>
ca8ead92 1000
b6cabd65 1001 Remove Profile Mode, deprecated since 7.1.0
1002 * doc/Makefile.am: Remove XML file for profile mode docs.
1003 * doc/Makefile.in: Regenerate.
1004 * doc/xml/authors.xml: Remove authors of profile mode docs.
1005 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1006 mode.
1007 * doc/xml/manual/debug.xml: Likewise.
1008 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1009 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1010 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1011 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1012 directive.
1013 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1014 macro.
1015 * doc/html/*: Regenerate.
1016 * include/Makefile.am: Remove profile mode headers.
1017 * include/Makefile.in: Regenerate.
1018 * include/bits/c++config (std::__profile): Remove namespace.
1019 [_GLIBCXX_PROFILE]: Remove checks for macro.
1020 * include/profile/array: Remove.
1021 * include/profile/base.h: Remove.
1022 * include/profile/bitset: Remove.
1023 * include/profile/deque: Remove.
1024 * include/profile/forward_list: Remove.
1025 * include/profile/impl/profiler.h: Remove.
1026 * include/profile/impl/profiler_algos.h: Remove.
1027 * include/profile/impl/profiler_container_size.h: Remove.
1028 * include/profile/impl/profiler_hash_func.h: Remove.
1029 * include/profile/impl/profiler_hashtable_size.h: Remove.
1030 * include/profile/impl/profiler_list_to_slist.h: Remove.
1031 * include/profile/impl/profiler_list_to_vector.h: Remove.
1032 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1033 * include/profile/impl/profiler_node.h: Remove.
1034 * include/profile/impl/profiler_state.h: Remove.
1035 * include/profile/impl/profiler_trace.h: Remove.
1036 * include/profile/impl/profiler_vector_size.h: Remove.
1037 * include/profile/impl/profiler_vector_to_list.h: Remove.
1038 * include/profile/iterator_tracker.h: Remove.
1039 * include/profile/list: Remove.
1040 * include/profile/map: Remove.
1041 * include/profile/map.h: Remove.
1042 * include/profile/multimap.h: Remove.
1043 * include/profile/multiset.h: Remove.
1044 * include/profile/ordered_base.h: Remove.
1045 * include/profile/set: Remove.
1046 * include/profile/set.h: Remove.
1047 * include/profile/unordered_base.h: Remove.
1048 * include/profile/unordered_map: Remove.
1049 * include/profile/unordered_set: Remove.
1050 * include/profile/vector: Remove.
1051 * scripts/run_doxygen: Do not process profile mode headers.
1052 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1053 profile mode type.
1054 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1055 Remove dg-skip-if for profile mode.
1056 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1057 preprocessor check for profile mode.
1058 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1059 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1060 for profile mode.
1061 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1062 Likewise.
1063 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1064 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1065 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1066 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1067 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1068 Likewise.
1069 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1070 Likewise.
1071 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1072 Likewise.
1073 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1074 Likewise.
1075 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1076 preprocessor check for profile mode.
1077 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1078 Likewise.
1079 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1080 Remove dg-skip-if for profile mode.
1081 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1082 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1083 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1084 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1085 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1086 * testsuite/Makefile.am: Remove profile_flags variable and
1087 * testsuite/Makefile.am: Remove profile_flags variable and
1088 check-profile target.
1089 * testsuite/Makefile.in: Regenerate.
1090 * testsuite/ext/profile/all.cc: Remove.
1091 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1092 * testsuite/ext/profile/profiler_algos.cc: Remove.
1093 * testsuite/ext/profile/replace_new.cc: Remove.
1094 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1095 preprocessor check for profile mode.
1096 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1097 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1098 (check_v3_target_normal_mode): Do not check for profile mode macro.
1099 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1100 profile mode.
1101 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1102 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1103 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1104 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1105 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1106 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1107 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1108 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1109 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1110 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1111
ca8ead92 1112 Remove array_allocator extension, deprecated since 4.9.0
1113 * doc/xml/manual/allocator.xml: Remove documentation for
1114 array_allocator.
1115 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1116 * doc/xml/manual/using.xml: Remove header from documentation.
1117 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1118 * include/Makefile.in: Regenerate.
1119 * include/ext/array_allocator.h: Remove.
1120 * include/precompiled/extc++.h: Do not include removed header.
1121 * testsuite/ext/array_allocator/1.cc: Remove.
1122 * testsuite/ext/array_allocator/2.cc: Remove.
1123 * testsuite/ext/array_allocator/26875.cc: Remove.
1124 * testsuite/ext/array_allocator/3.cc: Remove.
1125 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1126 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1127 * testsuite/ext/array_allocator/check_new.cc: Remove.
1128 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1129 * testsuite/ext/headers.cc: Do not include removed header.
1130
64b2700c 11312019-05-11 François Dumont <fdumont@gcc.gnu.org>
1132
1133 * include/bits/stl_bvector.h
1134 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1135 Make hidden friend.
1136 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1137 Likewise.
1138 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1139 Likewise.
1140 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1141 Likewise.
1142 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1143 Likewise.
1144 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1145 Likewise.
1146 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1147 Likewise.
1148 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1149 copy elision.
1150 (_Bit_iterator::operator-(difference_type)): Likewise.
1151 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1152 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1153 NRVO copy elision.
1154 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1155 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1156
de3f1d9a 11572019-05-10 Jonathan Wakely <jwakely@redhat.com>
1158
eb1be9e7 1159 PR libstdc++/81266
1160 * testsuite/util/thread/all.h: Do not use remove_pointer for
1161 std::thread::native_handle_type.
1162
5c6334a5 1163 PR libstdc++/90397
1164 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1165 (_Variant_storage<true, Types...>::_M_reset()))
1166 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1167 (__get_storage): Likewise.
1168 (variant): Add noexcept to friend declarations for __get and
1169 __get_storage.
1170
3e5c91bd 1171 PR libstdc++/90388
1172 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1173 Use _Require for constraints.
1174 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1175 per the standard.
1176 (__uniq_ptr_hash): New base class with conditionally-disabled call
1177 operator.
1178 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1179 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1180 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1181
de3f1d9a 1182 * include/bits/shared_ptr.h: Improve docs.
1183 * include/bits/shared_ptr_base.h: Likewise.
1184 * include/bits/stl_uninitialized.h: Likewise.
1185 * include/bits/unique_ptr.h: Likewise.
1186 * libsupc++/new: Likewise.
1187
d084c5ba 11882019-05-09 François Dumont <fdumont@gcc.gnu.org>
1189
1190 * include/bits/stl_deque.h
1191 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1192 Make hidden friend.
1193 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1194 Likewise.
1195 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1196 Likewise.
1197 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1198 Likewise.
1199 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1200 Likewise.
1201 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1202 Likewise.
1203 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1204 copy elision.
1205 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1206
0f61cb49 12072019-05-08 François Dumont <fdumont@gcc.gnu.org>
1208
1209 PR libstdc++/90277
1210 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1211 (test01): Reserve for number of insertions to avoid rehash during test.
1212 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1213 (test01): Likewise.
1214 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1215 (test01): Likewise.
1216 (test02): Likewise.
1217 (test03): Likewise.
1218
c800ee48 12192019-05-08 Jonathan Wakely <jwakely@redhat.com>
1220
1221 * include/experimental/bits/fs_path.h: Improve docs.
1222 * include/experimental/bits/net.h: Fix wrong header name in comment.
1223 Do not document implementation details.
1224 * include/experimental/netfwd: Fix doxygen grouping.
1225
b103d23d 12262019-05-07 Jonathan Wakely <jwakely@redhat.com>
1227
aa371af3 1228 * include/bits/stl_pair.h: Improve docs.
1229 * include/std/tuple: Likewise.
1230
dceea60f 1231 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1232 inline namespace.
1233 * include/std/chrono: Improve docs.
1234 * include/std/ratio: Do not document implementation details.
1235 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1236 line numbers.
1237 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1238
a9ae69b5 1239 PR libstdc++/89102
1240 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1241 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1242 (__duration_common_type): New helper.
1243 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1244 __duration_common_type.
1245 (__timepoint_common_type_wrapper): Replace with ...
1246 (__timepoint_common_type): New helper.
1247 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1248 Use __time_point_common_type.
1249 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1250 (__common_type_impl): If either argument is transformed by decay,
1251 use the common_type of the decayed types.
1252 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1253 decayed, use __do_common_type_impl to get the common_type.
1254 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1255 (__do_member_type_wrapper, __member_type_wrapper)
1256 (__expanded_common_type_wrapper): Remove.
1257 (__common_type_pack, __common_type_fold): New helpers.
1258 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1259 __member_type_wrapper and __expanded_common_type_wrapper.
1260 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1261 Test zero-length template argument list.
1262 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1263 Test single argument cases and argument types that should decay.
1264 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1265 Adjust expected error.
1266 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1267 dg-error lineno.
1268 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1269 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1270 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1271
b103d23d 1272 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1273
69be6ea5 12742019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1275
1276 Make allocator propagation more consistent for
1277 operator+(basic_string) (P1165R1)
1278 * include/bits/basic_string.h
1279 (operator+(basic_string&&, basic_string&&): Changed resulting
1280 allocator to always be the one from the first parameter.
1281 * include/bits/basic_string.tcc
1282 (operator+(const _CharT*, const basic_string&)): Changed
1283 resulting allocator to be SOCCC on the second parameter's allocator.
1284 (operator+(_CharT, const basic_string&)): Likewise.
1285 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1286 New.
1287 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1288 New.
1289
845d0fd6 12902019-05-07 Jonathan Wakely <jwakely@redhat.com>
1291
29499715 1292 * include/bits/regex.h: Improve docs.
1293 * include/bits/regex.tcc: Do not document implementation details.
1294
845d0fd6 1295 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1296
3eec8b67 12972019-05-06 François Dumont <fdumont@gcc.gnu.org>
1298
1299 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1300 Add type printer for container types in std::__debug namespace.
1301 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1302 (gdb-tests): Use distinct parameters for the type of test and use of
1303 regex.
1304 (gdb-test): Check for regex test even if 'whatis' test.
1305 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1306 mode.
1307 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1308 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1309 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1310 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1311 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1312 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1313 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1314
80175534 13152019-05-04 Jonathan Wakely <jwakely@redhat.com>
1316
2d527eb0 1317 * include/std/system_error (error_category): Fix comment.
1318
84eda927 1319 PR libstdc++/90299
1320 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1321 argument is an empty path.
1322 (absolute(const path&, error_code&)): Use invalid_argument as error
1323 code instead of no_such_file_or_directory.
1324 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1325 of non-existent paths and empty paths with both overloads of absolute.
1326
98a3d630 1327 * include/std/system_error (error_category, error_code)
1328 (error_condition): Improve docs.
1329 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1330 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1331 to class documentation. Suppress documentation for implementation
1332 details.
1333 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1334 Suppress documentation for implementation details.
1335
80175534 1336 * include/std/system_error (error_code): Remove friend declaration
1337 for hash<error_code>.
1338 (hash<error_code>::operator()): Use public member functions to access
1339 value and category.
1340 (hash<error_condition>::operator()): Use address of category, not
1341 its object representation.
1342 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1343 Use public member functions to access value and category.
1344 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1345
476bdccf 13462019-05-04 François Dumont <fdumont@gcc.gnu.org>
1347
1348 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1349 * include/bits/hashtable_policy.h
1350 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1351 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1352 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1353 smaller than input value rather than always greater. Preserve
1354 _M_next_resize if called with 0 input. Use __builtin_floorl.
1355 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1356 elements + number of insertions is greater than _M_next_resize. Start
1357 with 11 buckets if not told otherwise. Use __builtin_floorl.
1358 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1359 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1360 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1361 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1362 told otherwise. Use __builtin_floorl.
1363 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1364 to also validate _Power2_rehash_policy.
1365 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1366 Adapt.
1367
2051f7c0 13682019-05-03 Jonathan Wakely <jwakely@redhat.com>
1369
85015e21 1370 PR libstdc++/61761
1371 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1372 std::copysign.
1373
2051f7c0 1374 PR libstdc++/52119
1375 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1376 overflow warning with -Wpedantic -Wsystem-headers.
1377
c47265a8 13782019-05-02 Jonathan Wakely <jwakely@redhat.com>
1379
9766cefe 1380 PR libstdc++/90314
1381 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1382 * include/bits/move.h (swap): Remove extra parentheses.
1383
6bd15da3 1384 * include/experimental/bits/lfts_config.h: Improve doc markup.
1385 * include/experimental/optional: Improve docs.
1386 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1387 (__constexpr_addressof): Remove.
1388 (optional::operator->()): Use std::__addressof().
1389 * include/std/optional (optional::operator->()): Adjust whitespace.
1390 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1391 that operator-> is still constexpr with overloaded operator&. Change
1392 to compile-only test.
1393 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1394 compile-only test.
1395
f4673ac1 1396 * include/bits/shared_ptr.h: Improve docs.
1397 * include/bits/shared_ptr_atomic.h: Likewise.
1398 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1399
c88f1c9d 1400 * include/bits/basic_string.h: Fix iterator/index confusion in
1401 Doxygen comments.
1402 * include/bits/range_access.h: Fix Doxygen warnings.
1403 * include/bits/refwrap.h: Do not document implementation details.
1404 (ref, cref): Group docs with reference_wrapper.
1405 * include/std/fstream: Fix Doxygen markup.
1406 * libsupc++/initializer_list (begin, end): Group docs with
1407 initializer_list.
1408
0276ef36 1409 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1410
5ba27b7d 1411 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1412 * include/std/mutex: Likewise.
1413 * include/std/shared_mutex: Likewise.
1414
c2046340 1415 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1416 * include/bits/fs_fwd.h: Likewise.
1417 * include/bits/fs_ops.h: Likewise.
1418 * include/bits/fs_path.h: Likewise.
1419 * include/std/filesystem: Likewise.
1420
f73340aa 1421 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1422 * include/experimental/buffer: Likewise.
1423 * include/experimental/executor: Likewise.
1424 * include/experimental/internet: Likewise.
1425 * include/experimental/io_context: Likewise.
1426 * include/experimental/net: Likewise.
1427 * include/experimental/netfwd: Likewise.
1428 * include/experimental/socket: Likewise.
1429 * include/experimental/timer: Likewise.
1430
b87d52bd 1431 * doc/doxygen/doxygroups.cc: Move description of experimental group
1432 here.
1433 * include/experimental/algorithm: Add to libfund-ts doc group.
1434 * include/experimental/any: Likewise. Do not document implementation
1435 details.
1436 * include/experimental/array: Add to libfund-ts doc group.
1437 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1438 for Library Fundamentals.
1439 * include/experimental/chrono: Add to libfund-ts doc group.
1440 * include/experimental/deque: Likewise.
1441 * include/experimental/forward_list: Likewise.
1442 * include/experimental/functional: Likewise.
1443 * include/experimental/iterator: Likewise.
1444 * include/experimental/list: Likewise.
1445 * include/experimental/map: Likewise.
1446 * include/experimental/memory: Likewise.
1447 * include/experimental/memory_resource: Likewise. Improve docs.
1448 details.
1449 * include/experimental/numeric: Add to libfund-ts doc group.
1450 * include/experimental/optional: Likewise.
1451 * include/experimental/propagate_const: Likewise.
1452 * include/experimental/random: Likewise.
1453 * include/experimental/ratio: Likewise.
1454 * include/experimental/regex: Likewise.
1455 * include/experimental/set: Likewise.
1456 * include/experimental/source_location: Likewise.
1457 * include/experimental/string: Likewise.
1458 * include/experimental/string_view: Likewise.
1459 * include/experimental/system_error: Likewise.
1460 * include/experimental/tuple: Likewise.
1461 * include/experimental/type_traits: Likewise.
1462 * include/experimental/unordered_map: Likewise.
1463 * include/experimental/unordered_set: Likewise.
1464 * include/experimental/utility: Likewise.
1465 * include/experimental/vector: Likewise.
1466 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1467 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1468 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1469 Likewise.
1470 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1471 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1472 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1473 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1474 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1475
07894d48 1476 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1477 * include/experimental/bits/fs_fwd.h: Improve docs.
1478 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1479 * include/experimental/bits/fs_path.h: Likewise.
1480 (path, filesystem_error, u8path): Improve docs.
1481 * include/experimental/filesystem: Link to docs for TS.
1482
cd877474 1483 * config/allocator/new_allocator_base.h (__allocator_base): Add
1484 workaround for Doxygen bug #6945.
1485 * include/std/memory: Improve docs. Define group for pointer safety.
1486 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1487 conditional to suppress documentation for implementation details.
1488
72e8cf41 1489 * include/bits/specfun.h: Improve docs.
1490 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1491 and namespaces.
1492
633c66f0 1493 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1494 (std::experimental): Add docs.
1495 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1496 namespace to nothing when generating docs.
1497 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1498 * include/std/chrono (std::chrono): Likewise.
1499 * include/std/functional (std::placeholders): Likewise.
1500 * include/std/thread (std::this_thread): Likewise.
1501
17035a16 1502 * include/parallel/settings.h: Fix Doxygen markup.
1503
6de90d17 1504 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1505 anything unless PB_DS_CLASS_C_DEC is defined.
1506 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1507 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1508 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1509 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1510 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1511 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1512 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1513 Likewise.
1514 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1515 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1516 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1517 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1518 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1519 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1520 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1521 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1522 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1523 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1524 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1525 Likewise.
1526 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1527 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1528 Likewise.
1529 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1530 Likewise.
1531
c47265a8 1532 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1533 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1534 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1535 Doxygen expands.
1536
269f393a 15372019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1538
1539 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1540 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1541 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1542 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1543 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1544 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1545 Likewise.
1546 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1547 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1548 Likewise.
1549
c64aa5a2 15502019-05-01 Jonathan Wakely <jwakely@redhat.com>
1551
1552 PR libstdc++/61761
1553 * include/std/complex (__complex_proj): Return parameter unchanged.
1554 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1555 floating-point types to take std::complex arguments.
1556 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1557 floating-point types.
1558 * testsuite/26_numerics/complex/proj.cc: New test.
1559
9d5de90f 15602019-04-30 Jakub Jelinek <jakub@redhat.com>
1561
1562 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1563 to _Lock_policyE[012].
1564 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1565
612b2ae7 15662019-04-30 Jonathan Wakely <jwakely@redhat.com>
1567
1568 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1569 macros accidentally left in.
1570 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1571 unnecessary -lstdc++fs option. Fix test for mingw.
1572 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1573 Fix test for mingw.
1574
55843567 15752019-04-30 Jakub Jelinek <jakub@redhat.com>
1576
1577 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1578
c5aaf0af 15792019-04-29 Jonathan Wakely <jwakely@redhat.com>
1580
d9375e49 1581 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1582
744a3010 1583 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1584 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1585
e3600f25 1586 PR libstdc++/71312
1587 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1588
4b7f4f12 1589 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1590 attribute.
1591
94ed6c0a 1592 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1593 class template and partial specialization.
1594
c5aaf0af 1595 PR libstdc++/87982
1596 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1597 an integral type.
1598 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1599 functions to convert a value to an integral type.
1600 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1601 (fill_n): Convert _Size parameter to an integral type.
1602 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1603 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1604 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1605 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1606 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1607 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1608
ac8f540e 16092019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
a4360611 1610
1611 Adding noexcept-specification on tuple constructors (LWG 2899)
1612 * libstdc++-v3/include/std/tuple:
1613 (tuple()): Add noexcept-specification.
1614 (tuple(const _Elements&...)): Likewise
1615 (tuple(_UElements&&...)): Likewise
1616 (tuple(const tuple<_UElements...>&)): Likewise
1617 (tuple(tuple<_UElements...>&&)): Likewise
1618 (tuple(const _T1&, const _T2&)): Likewise
1619 (tuple(_U1&&, _U2&&)): Likewise
1620 (tuple(const tuple<_U1, _U2>&): Likewise
1621 (tuple(tuple<_U1, _U2>&&): Likewise
1622 (tuple(const pair<_U1, _U2>&): Likewise
1623 (tuple(pair<_U1, _U2>&&): Likewise
1624 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1625
b9fe1c54 16262019-04-27 Marc Glisse <marc.glisse@inria.fr>
1627
1628 PR libstdc++/87106
1629 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1630 arguments with __restrict.
1631
a596cded 16322019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1633
1634 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1635
051e444d 16362019-04-26 Jonathan Wakely <jwakely@redhat.com>
1637
3c259ff8 1638 * include/experimental/bits/fs_path.h
1639 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1640 avoid redundant call to _S_convert_loc with non-const pointers.
1641
2f95fa8e 1642 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1643 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1644 * testsuite/21_strings/basic_string/hash/hash.cc
1645 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1646 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1647 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1648
46933618 1649 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1650 wstring::_M_replace_dispatch with more specific patterns.
1651 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1652 Create const std::string to avoid redundant call to _S_convert_loc
1653 with non-const pointers.
1654 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1655 avoid unnecessary basic_string::assign instantiations.
1656
051e444d 1657 * include/std/memory (__uses_alloc_args): Add string-literal to
1658 static_assert, to match the one in __uses_alloc.
1659 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1660 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1661 for recursive uses-allocator construction of nested pairs.
1662 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1663 comment.
1664
db1349a6 16652019-04-26 Jakub Jelinek <jakub@redhat.com>
1666
dd693c4a 1667 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1668 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1669 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1670 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1671
db1349a6 1672 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1673 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1674 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1675 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1676 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1677 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1678 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1679
f0a82465 16802019-04-25 Jonathan Wakely <jwakely@redhat.com>
1681
1682 PR libstdc++/90239
1683 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1684 * include/std/scoped_allocator [__cplusplus > 201703L]
1685 (scoped_allocator_adaptor::construct): Define in terms of
1686 uses_allocator_construction_args, as per P0591R4.
1687 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1688 * testsuite/util/testsuite_allocator.h: Remove name of unused
1689 parameter.
1690
fd1863e1 16912019-04-24 Jonathan Wakely <jwakely@redhat.com>
1692
9ed11778 1693 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1694 * doc/html/*: Regenerate.
1695
39b59bb9 1696 * include/bits/fs_path.h (operator<, operator<=, operator>)
1697 (operator>=, operator==, operator!=): Make hidden friends, as per
1698 LWG 3065.
1699 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1700 string type in test.
1701 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1702
dd3b7006 1703 * include/std/any (any::any(ValueType&&)): Use __and_v.
1704 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1705 Likewise.
1706
14710c9d 1707 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1708 as per P0777R1.
1709 * include/std/type_traits (__result_of_memfun): Use remove_reference
1710 instead of __remove_cvref_t and remove redundant is_same check.
1711 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1712
809f1d63 1713 * include/experimental/string_view (basic_string_view::pointer)
1714 (basic_string_view::reference): Fix to refer to non-const value_type.
1715 * include/bits/basic_string.h (basic_string): Use __sv_check and
1716 __sv_limit instead of basic_string_view::_M_check and
1717 basic_string_view::_M_limit.
1718 * include/std/string_view (__sv_check, __sv_limit): New
1719 helper functions to replace basic_string_view::_M_check and
1720 basic_string_view::_M_limit.
1721 (basic_string_view): Add static assertions to enforce ill-formed
1722 requirement for traits_type::char_type from P1148R0, and to enforce
1723 required properties of char-like types.
1724 (basic_string_view::pointer, basic_string_view::reference): Fix to
1725 refer to non-const value_type.
1726 (basic_string_view::operator[], basic_string_view::at)
1727 (basic_string_view::front, basic_string_view::back)
1728 (basic_string_view::data): Use const_reference and const_pointer
1729 typedefs for return types.
1730 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1731 (hash<wstring_view>): Fix argument_type typedef.
1732 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1733 char/1.cc: Fix expected return type of basic_string_view::data().
1734 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1735 wchar_t/1.cc: Likewise.
1736 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1737 char/1.cc: Likewise.
1738 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1739 wchar_t/1.cc: Likewise.
1740 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1741 New test.
1742 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1743 Check reference and pointer typedefs.
1744 * testsuite/experimental/string_view/requirements/typedefs.cc:
1745 Likewise.
1746 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1747 Fix expected return type of basic_string_view::data().
1748 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1749 1.cc: Likewise.
1750 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1751 Likewise.
1752 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1753 1.cc: Likewise.
1754
37020b0a 1755 PR libstdc++/90220
1756 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1757 Avoid a runtime check for types that can never be stored in std::any.
1758 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1759 array types.
1760
b8e73341 1761 PR libstdc++/90220 (partial)
1762 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1763 not attempt ill-formed static_cast to pointers to non-object types.
1764 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1765 function types.
1766
1c9c8e0d 1767 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1768 prevent -Wcatch-value warning.
1769
fd1863e1 1770 * include/std/variant (__variant_construct): Use template parameter
1771 type instead of equivalent decltype-specifier.
1772 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1773 Replace forward with move.
1774 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1775 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1776 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1777 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1778 index after construction succeeds.
1779 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1780 if-constexpr checks that are always true. Use __remove_cvref_t instead
1781 of remove_reference so that is_nothrow_move_constructible check
1782 doesn't use a const rvalue parameter. In the potentially-throwing case
1783 construct a temporary and move assign it, as per LWG 2904.
1784 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1785 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1786 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1787 construct a temporary and move assign from it, as per LWG 2904.
1788 * testsuite/20_util/variant/exception_safety.cc: Check that
1789 assignment operators have strong exception safety guarantee.
1790
55bb4515 17912019-04-23 Thomas Rodgers <trodgers@redhat.com>
1792
1793 Document PSTL linker flags
1794
7f6a1a9c 1795 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
55bb4515 1796
b48cc8c5 17972019-04-23 Jonathan Wakely <jwakely@redhat.com>
1798
a4265b66 1799 * include/std/variant (__detail::__variant::_Traits): Make
1800 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1801 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1802 P0602R4.
1803 (__detail::__variant::_Copy_assign_alias): Only depend on
1804 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1805 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1806 move assignment operators.
1807
28cc38ec 1808 PR libstdc++/90165
1809 * include/std/variant (variant::__not_self): New helper for the
1810 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1811 (variant::__to_type_impl): Remove.
1812 (variant::__to_type): Add default argument to check pack size, instead
1813 of using __to_type_impl.
1814 (variant::__accepted_type): Add default argument using __not_self.
1815 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1816 for variant(T&&) constructor constraint.
1817 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1818 Extract __accepted_type into a named template parameter for reuse in
1819 other constraints and in the exception specification.
1820 (variant::variant(in_place_type_t<T>, Args&&...))
1821 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1822 (variant::variant(in_place_index_t<T>, Args&&...))
1823 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1824 (variant::operator=T&&)): Remove redundant && from trait arguments.
1825 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1826 isn't used for in_place_type or in_place_index arguments.
1827
b48cc8c5 1828 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1829 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1830 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1831
9ac9ee83 18322019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1833 Bernd Edlinger <bernd.edlinger@hotmail.de>
1834 Jakub Jelinek <jakub@redhat.com>
1835
1836 PR target/89093
1837 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1838 general-regs-only target attribute for ARM.
1839
e11f5aed 18402019-04-23 Jonathan Wakely <jwakely@redhat.com>
1841
b9d8292f 1842 PR libstdc++/87431
1843 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1844 specialization also depend on is_nothrow_move_constructible.
1845 * include/std/variant (__detail::__variant::__never_valueless()):
1846 Only true if the variant would have a move assignment operator.
1847 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1848 Check __never_valueless<T...>().
1849 (variant::emplace): Only perform non-throwing move assignments
1850 for never-valueless alternatives if the variant has a move assignment
1851 operator.
1852 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1853 types can be emplaced into non-assignable variants.
1854 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1855 don't get copied when emplaced into non-assignable variants.
1856
e11f5aed 1857 * include/std/variant (__detail::__variant::__ref_cast): Remove
1858 unused function.
1859 (__detail::__variant::_Uninitialized::_M_get)
1860 (__detail::__variant::__get)
1861 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1862
46fbb8aa 18632019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1864
1865 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1866 to Darwin10.
1867 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1868 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1869 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1870 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1871
dff3f73c 18722019-04-20 Thomas Rodgers <trodgers@redhat.com>
1873
1874 Delegate PSTL configuration to pstl/pstl_config.h
1875
1876 * include/bits/c++config: Remove explicit PSTL configuration
1877 macros and use definitions from <pstl/pstl_config.h>.
1878
3dbad48e 18792019-04-20 Thomas Rodgers <trodgers@redhat.com>
1880
1881 Cleanup algorithm implementations
1882 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
ed42fdb5 1883 execution policy.
3dbad48e 1884 (mismatch): Forward execution policy.
1885 (equal): Qualify call to std::equal().
1886 (partial_sort): Forward execution policy.
1887 (inplace_merge): Forward execution policy.
1888
5d637ddd 18892019-04-19 Thomas Rodgers <trodgers@redhat.com>
1890
1891 Improve implementation of parallel equal()
1892 * include/pstl/algorithm_impl.h
1893 (__internal::__brick_equal): use "4 iterator" version of
1894 std::equal().
1895 (__internal::__brick_equal): use simd for random access
1896 iterators on unsequenced execution policies.
1897 (__internal::__pattern_equal): add "4 iterator" version
1898 (__internal::__pattern_equal): dispatch to simd __brick_equal
1899 for vector-only execution policies.
1900 (__internal::__pattern_equal): dispatch to __parallel_or for
1901 parallel execution policies.
1902 * include/pstl/glue_algorithm_impl.h
1903 (std::equal): dispatch to "4 iterator" version of
1904 __internal::__pattern_equal().
1905
88dbeb04 19062019-04-17 Jonathan Wakely <jwakely@redhat.com>
1907
a0295ab5 1908 PR libstdc++/90105
1909 * include/bits/forward_list.h (operator==): Do not use operator!= to
1910 compare elements.
1911 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1912 earlier in the list, so that sort is stable.
1913 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1914 * testsuite/23_containers/forward_list/comparable.cc: Test with
1915 types that meet the minimum EqualityComparable and LessThanComparable
1916 requirements. Remove irrelevant comment.
1917
37a7dbf9 1918 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1919 Do not depend on whether all alternative types are move constructible.
1920 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1921 from the operand when deciding whether to perform the assignment.
1922 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1923 with deleted move constructor and deleted move assignment operator.
1924 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1925 behaviour of variants with DeletedMoves as an alternative.
1926 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1927 (move_ctor, move_assign): Check that moving a variant with a
1928 DeletedMoves alternative falls back to copying instead of moving.
1929
e9a490a4 1930 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1931 from static_assert declarations.
1932
c4495ab1 1933 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1934 actually match its name.
1935 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1936 (test_swap()): Fix result for MoveCtorOnly and check
1937 MoveCtorAndSwapOnly.
1938
88dbeb04 1939 * include/std/optional (optional::value_or(U&&) &&): Add missing
1940 constexpr specifier.
1941 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1942 for disengaged optionals and rvalue optionals.
1943 * testsuite/20_util/optional/observers/4.cc: Likewise.
1944
11deac81 19452019-04-12 Thomas Rodgers <trodgers@redhat.com>
1946
1947 * include/pstl/algorithm_impl.h: Uglify identfiers.
1948 * include/pstl/numeric_impl.h: Uglify identfiers.
1949 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1950
34d8d757 19512019-04-11 Thomas Rodgers <trodgers@redhat.com>
1952
1953 * include/bits/c++config:
1954 Add definition for __PSTL_ASSERT.
1955 Add definition for __PSTL_ASSERT_MSG.
1956 * include/pstl/algorithm_impl.h: Replace use of assert().
1957 * include/pstl/numeric_impl.h: Replace use of assert().
1958 * include/pstl/parallel_backend_tbb.h:
1959 Replace use of assert().
1960 Replace use of __TBB_ASSERT().
34d8d757 1961 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1962
629a2d18 19632019-04-11 Jonathan Wakely <jwakely@redhat.com>
1964
1965 PR libstdc++/90046
1966 * src/c++17/memory_resource.cc
1967 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1968 needed to allow placing a _Chunk at the end of the buffer.
1969 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1970
b047c9ae 19712019-04-10 Jonathan Wakely <jwakely@redhat.com>
1972
6a98b075 1973 * doc/xml/faq.xml: Add information about emergency EH pool.
1974 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1975 Move outdated information on mt_allocator to a separate section.
1976 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1977 doesn't affect the default allocator.
1978
706bf2a5 1979 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1980 typo.
1981
b047c9ae 1982 PR libstdc++/89851
1983 * testsuite/20_util/variant/89851.cc: New test.
1984
faa382bd 19852019-04-09 Jonathan Wakely <jwakely@redhat.com>
1986
492debfa 1987 * include/std/variant: Adjust whitespace. Add comments.
1988 (_Multi_array): Leave primary template undefined.
1989 (_Multi_array<_Tp>): Define partial specialization for base case of
1990 recursion.
1991 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1992 which is always a reference.
1993 (__gen_vtable::_S_apply()): Remove function, inline body into
1994 default member initializer.
1995 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1996
47cf9c4c 1997 * include/std/variant (__variant_idx_cookie): Add member type.
1998 (__visitor_result_type): Remove.
1999 (__do_visit): Use invoke_result instead of __visitor_result_type.
2000 * testsuite/20_util/variant/visit.cc: New test.
2001
faa382bd 2002 PR libstdc++/90008
2003 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2004 unused capture.
2005 * testsuite/20_util/variant/90008.cc: New test.
2006
e4da4897 20072019-04-09 Thomas Rodgers <trodgers@redhat.com>
2008
2009 * include/pstl/algorithm_impl.h: Add namespace qualification.
2010 * include/pstl/execution_defs.h: Add namespace qualification.
2011 * include/pstl/execution_impl.h: Add namespace qualification.
2012 * include/pstl/numeric_impl.h: Add namespace qualification.
2013 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2014 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2015 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2016
ff7d433d 20172019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2018
2019 Fix visit<R> for variant.
2020 * include/std/variant (__do_visit): Add a template parameter
2021 for enforcing same return types for visit.
2022 (__gen_vtable_impl): Likewise.
2023 (_S_apply_single_alt): Adjust.
2024 (__visit_invoke_impl): New. Handle casting to void.
2025 (__do_visit_invoke): New. Enforces same return types.
2026 (__do_visit_invoke_r): New. Converts return types.
2027 (__visit_invoke): Adjust.
2028 (__gen_vtable): Add a template parameter for enforcing
2029 same return types for visit.
2030 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2031 different return types.
2032 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2033 visitors with different return types don't accidentally
2034 compile with regular visitation.
2035
d0f56531 20362019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2037
2038 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2039 dg-require-filesystem-ts.
2040
781cb64d 20412019-04-05 Jonathan Wakely <jwakely@redhat.com>
2042
bfbd20f7 2043 * doc/xml/manual/status_cxx2020.xml: Update status.
2044 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2045 * testsuite/20_util/variant/visit_r.cc: New test.
2046
83bd31bf 2047 * include/bits/fs_dir.h (directory_iterator::operator*)
2048 (directory_iterator::operator->): Add noexcept.
2049 (operator==, operator!=): Replace namespace-scope equality operators
2050 for directory iterators with hidden friends.
2051
0067a809 2052 PR libstdc++/89986
2053 * config/abi/pre/gnu.ver: Add missing exports.
2054 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2055 increment member.
2056
7d0ae205 2057 * config/abi/pre/gnu.ver: Export new symbols.
2058 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2059 (recursive_directory_iterator::recursion_pending())
2060 (recursive_directory_iterator::disable_recursion_pending()): Remove
2061 inline definitions. Make noexcept.
2062 (recursive_directory_iterator::depth())
2063 (recursive_directory_iterator::operator*())
2064 (recursive_directory_iterator::operator->()): Make noexcept.
2065 (recursive_directory_iterator::_M_options)
2066 (recursive_directory_iterator::_M_pending): Remove data members.
2067 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2068 (recursive_directory_iterator::recursive_directory_iterator): Remove
2069 ctor-initializer. Use new constructor for _Dir_stack.
2070 (recursive_directory_iterator::options())
2071 (recursive_directory_iterator::recursion_pending())
2072 (recursive_directory_iterator::disable_recursion_pending()): Add
2073 non-inline definitions.
2074 (recursive_directory_iterator::depth()): Make noexcept.
2075 (recursive_directory_iterator::increment(error_code&))
2076 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2077 location of options and recursion_pending members.
2078 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2079 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2080 user-declared move constructor and assignment operator, to make the
2081 type move-only.
2082
5a6e0b73 2083 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2084 d_type == DT_UNKNOWN immediately.
2085 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2086 handling here.
2087 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2088
aa9c570e 2089 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2090 assignment.
2091 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2092 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2093 assignment.
2094
781cb64d 2095 PR libstdc++/87431 (again)
2096 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2097 Define partial specialization for basic_string.
2098 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2099 shared_ptr and weak_ptr.
2100 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2101 function.
2102 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2103 vector.
2104 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2105 unique_ptr.
2106 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2107 vector.
2108 * include/std/any (_Never_valueless_alt): Define explicit
2109 specialization for any.
2110 * include/std/variant (_Never_valueless_alt): Define primary template.
2111 (__never_valueless): Use _Never_valueless_alt instead of
2112 is_trivially_copyable.
2113 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2114 initializations to avoid try-catch overhead. Add special case for
2115 scalars produced by potentially-throwing conversions. Use
2116 _Never_valueless_alt instead of is_trivially_copyable for the
2117 remaining strong exception-safety cases.
2118 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2119 * testsuite/20_util/variant/87431.cc: Run both test functions.
2120 * testsuite/20_util/variant/exception_safety.cc: New test.
2121 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2122 so the variant becomes valueless.
2123
62fd39e8 21242019-04-03 Jonathan Wakely <jwakely@redhat.com>
2125
e1d699b8 2126 PR libstdc++/85184
2127 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2128 Remove assertions.
72be2bb7 2129 (variant::emplace<_Tp>): Return result of emplace<N> directly.
e1d699b8 2130
62fd39e8 2131 * include/std/string (__hash_string_base): New class template defining
2132 operator() for hashing strings.
2133 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2134 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2135 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2136 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2137
4f3e024d 21382019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2139
2140 Use single-visitation in variant assignment and swap and relops.
2141 Also use indices instead of types when checking whether
2142 variants hold the same thing.
2143 * include/std/variant (__do_visit): Add a template parameter
2144 for index visitation, invoke with indices if index visitation
2145 is used.
2146 (__variant_idx_cookie): New.
2147 (__visit_with_index): Likewise.
2148 (_Copy_assign_base::operator=): Do single-visitation with
2149 an index visitor.
2150 (_Move_assign_base::operator=): Likewise.
2151 (_Extra_visit_slot_needed): Adjust.
2152 (__visit_invoke): Call with indices if it's an index visitor.
2153 (relops): Do single-visitation with an index visitor.
2154 (swap): Likewise.
2155 (__visitor_result_type): New.
2156
106979b7 21572019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2158
2159 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2160
225ca87b 21612019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2162
2163 Don't revisit a variant we are already visiting.
2164 * include/std/variant (__variant_construct_single): New.
2165 (__variant_construct): Use it.
2166 (_M_destructive_move): Likewise.
2167 (_M_destructive_copy): Likewise.
2168 (_Copy_assign_base::operator=): Adjust.
2169 (_Move_assign_base::operator=): Likewise.
2170 (swap): Likewise.
2171
7237dce7 21722019-03-26 Jonathan Wakely <jwakely@redhat.com>
2173
2174 PR libstdc++/85965
2175 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2176 destructor so they are not evaluated until the _Key type is complete.
2177 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2178 * testsuite/23_containers/set/85965.cc: New test.
2179 * testsuite/23_containers/unordered_set/85965.cc: New test.
2180 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2181 with regexp matching the corresponding _Rb_tree specialization.
2182 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2183 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2184 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2185 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2186 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2187 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2188 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2189
4c0ef551 21902019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2191
2192 PR libstdc++/89825
2193 Fix based on a suggestion by Antony Polukhin.
2194 * include/std/variant (__never_valueless): New.
2195 (_M_valid): Use it.
2196 (_Extra_visit_slot_needed): New.
2197 (_Multi_array): Use it.
2198 (_S_apply_all_alts): Likewise.
2199
28b460dd 22002019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2201
2202 PR libstdc++/89824
2203 Fix based on a suggestion by Antony Polukhin.
2204 * include/std/variant (__gen_vtable): Don't reserve an
2205 additional table slot, _Multi_array already does that.
2206
4d235dc5 22072019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2208
2209 PR libstdc++/89816
2210 Fix based on a suggestion by Antony Polukhin.
2211 * include/std/variant (__variant_construct): Capture a pointer
2212 to the storage and visit just one variant.
2213
d0595c7e 22142019-03-22 Jonathan Wakely <jwakely@redhat.com>
2215
5c34f7ca 2216 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2217 Doxygen-generated pages with unstable URL.
2218 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2219 * doc/xml/manual/extensions.xml: Likewise.
2220 * doc/xml/manual/parallel_mode.xml: Likewise.
2221 * doc/xml/manual/support.xml: Likewise.
2222
d0595c7e 2223 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2224 avoid -Wconversion warnings.
2225
7e155e54 22262019-03-21 Thomas Rodgers <trodgers@redhat.com>
2227
2228 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2229 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2230 (allstamped): Add stamp-pstl.
2231 (install-headers): Add ptsl_builddir.
2232 * include/Makefile.in: Regenerate.
2233 * include/bits/c++config: Add pstl configuration.
2234 * include/pstl/LICENSE.txt: New file.
2235 * include/pstl/algorithm_fwd.h: New file.
2236 * include/pstl/algorithm_impl.h: New file.
2237 * include/pstl/execution_defs.h: New file.
2238 * include/pstl/execution_impl.h: New file.
2239 * include/pstl/glue_algorithm_defs.h: New file.
2240 * include/pstl/glue_algorithm_impl.h: New file.
2241 * include/pstl/glue_execution_defs.h: New file.
2242 * include/pstl/glue_memory_defs.h: New file.
2243 * include/pstl/glue_memory_impl.h: New file.
2244 * include/pstl/glue_numeric_defs.h: New file.
2245 * include/pstl/glue_numeric_impl.h: New file.
2246 * include/pstl/memory_impl.h: New file.
2247 * include/pstl/numeric_fwd.h: New file.
2248 * include/pstl/numeric_impl.h: New file.
2249 * include/pstl/parallel_backend.h: New file.
2250 * include/pstl/parallel_backend_tbb.h: New file.
2251 * include/pstl/parallel_backend_utils.h: New file.
2252 * include/pstl/parallel_impl.h: New file.
2253 * include/pstl/pstl_config.h: New file.
2254 * include/pstl/unseq_backend_simd.h: New file.
2255 * include/pstl/utils.h: New file.
2256 * include/std/algorithm: Include parallel algorithm implementations.
2257 * include/std/execution: New file.
2258 * include/std/memory: Include parallel algorithm implementations.
2259 * include/std/numeric: Include parallel algorithm implementations.
2260 * include/std/version: Add parallel algorithms feature test macro.
2261 * testsuite/util/pstl/pstl_test_config.h: New file.
2262 * testsuite/util/pstl/test_utils.h: New file.
2263 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2264 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2265 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2266 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2267 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2268 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2269 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2270 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2271 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2272 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2273 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2274 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2275 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2276 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2277 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2278 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2279 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2280 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2281 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2282 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2283 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2284 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2285 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2286 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2287 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2288 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2289 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2290 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2291 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2292 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2293 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2294 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2295 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2296 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2297 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2298 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2299 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2300 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2301 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2302 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2303 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2304 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2305 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2306 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2307 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2308 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2309 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2310 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2311 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2312 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2313 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2314 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2315 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2316 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2317 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2318 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2319 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2320 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2321 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2322 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2323 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2324 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2325 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2326 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2327 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2328 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2329 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2330 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2331 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2332 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2333 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2334 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2335 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2336 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2337 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2338 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2339 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2340 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2341 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2342 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2343 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2344 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2345 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2346 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2347 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2348 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2349 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2350 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2351 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2352 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2353 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2354 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2355 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2356 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2357 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2358 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2359 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2360 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2361 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2362 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2363 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2364 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2365 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2366 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2367 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2368 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2369
480b3b75 23702019-03-21 Jonathan Wakely <jwakely@redhat.com>
2371
0a4390ac 2372 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2373 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2374 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2375 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2376 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2377 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2378 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2379 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2380 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2381 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2382 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2383 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2384 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2385 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2386 when the special functions IS is enabled, not for C++17.
2387 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2388 Replace with ...
2389 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2390 without checks for special functions in C++17.
2391 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2392 New test.
2393
480b3b75 2394 PR libstdc++/88066
2395 * include/backward/hash_map: Use <> for includes not "".
2396 * include/backward/hash_set: Likewise.
2397 * include/backward/strstream: Likewise.
2398 * include/tr1/bessel_function.tcc: Likewise.
2399 * include/tr1/exp_integral.tcc: Likewise.
2400 * include/tr1/legendre_function.tcc: Likewise.
2401 * include/tr1/modified_bessel_func.tcc: Likewise.
2402 * include/tr1/riemann_zeta.tcc: Likewise.
2403
ed360d55 24042019-03-19 Jonathan Wakely <jwakely@redhat.com>
2405
2406 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2407 of extension allocators.
2408 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2409 Document new headers in 7.2, 8.1 and 9.1 releases.
2410 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2411 * doc/html/*: Regenerate.
2412
8f9d7eb1 24132019-03-12 John David Anglin <dave.anglin@bell.net>
2414
2415 PR libstdc++/89461
2416 * testsuite/lib/libstdc++.exp: Locate libatomic.
2417 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2418 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2419 libatomic options.
2420 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2421 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2422 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2423 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2424
0bd005b6 24252019-03-11 Jonathan Wakely <jwakely@redhat.com>
2426
5995ba3a 2427 PR libstdc++/89460
2428 * configure.ac: Check for sockatmark.
2429 * crossconfig.m4: Check for sockatmark.
2430 * config.h.in: Regenerate.
2431 * configure: Regenerate.
2432 * include/experimental/internet (address_v4::_S_hton): Rename
2433 overloaded functions to _S_hton_16 and _S_ntoh_16.
2434 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2435 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2436 * include/experimental/socket (basic_socket::at_mark): Check
2437 _GLIBCXX_HAVE_SOCKATMARK.
2438
5aa8571a 2439 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2440 const variables instead of macros.
2441
0bd005b6 2442 PR libstdc++/89629
2443 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2444 Use correct type for len_aligned.
2445 * testsuite/20_util/hash/89629.cc: New test.
2446
bc204227 24472019-03-11 Jakub Jelinek <jakub@redhat.com>
2448
2449 PR libstdc++/89641
2450 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2451 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2452 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2453 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2454 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2455 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2456 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2457 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2458 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2459 memory_order_seq_cst to int.
2460
fc557c2b 24612019-03-08 Jonathan Wakely <jwakely@redhat.com>
2462
59b5e890 2463 * doc/xml/manual/using.xml: Use link element instead of xref.
2464 * doc/html/*: Regenerate.
2465
fc557c2b 2466 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2467
66c6ff9e 24682019-03-08 François Dumont <fdumont@gcc.gnu.org>
2469
448338d0 2470 PR libstdc++/89477
2471 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2472 parameters in deduction guides.
2473 * include/debug/multimap.h (multimap): Likewise.
2474 * include/debug/set.h (multimap): Likewise.
2475 * include/debug/multiset.h (multimap): Likewise.
2476 * include/debug/unordered_map (unordered_map): Likewise.
2477 (unordered_multimap): Likewise.
2478 * include/debug/unordered_set (unordered_set): Likewise.
2479 (unordered_multiset): Likewise.
2480
66c6ff9e 2481 PR libstdc++/89608
2482 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2483 Invalidate all iterators in case of rehash.
2484 (unordered_multimap<>::_M_check_rehashed): Likewise.
2485 * include/debug/unordered_set
2486 (unordered_set<>::_M_check_rehashed): Likewise.
2487 (unordered_multiset<>::_M_check_rehashed): Likewise.
2488 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2489
32e92dc2 24902019-03-07 Andreas Schwab <schwab@suse.de>
2491
2492 * config/abi/post/riscv64-linux-gnu: New directory.
2493 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2494
61dcf2e1 24952019-03-07 Jonathan Wakely <jwakely@redhat.com>
2496
682ee94e 2497 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2498 compile test to run. Fix typo.
2499
f24442bd 2500 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2501 * doc/html/*: Regenerate.
2502
61dcf2e1 2503 P0356R5 Simplified partial function application
2504 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2505 helpers for bind_front.
2506 (bind_front, __cpp_lib_bind_front): Define.
2507 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2508
b4af2395 25092019-03-06 Jonathan Wakely <jwakely@redhat.com>
2510
2511 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2512 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2513 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2514 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2515
f1857b8b 25162019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2517
2518 PR libstdc++/86655 - std::assoc_legendre should not constrain
2519 the value of m (or x).
2520 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2521 __sph_legendre): If degree > order Don't throw, return 0.
2522 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2523 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2524 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2525 * testsuite/tr1/5_numerical_facilities/special_functions/
2526 02_assoc_legendre/pr86655.cc: New test.
2527 * testsuite/tr1/5_numerical_facilities/special_functions/
2528 22_sph_legendre/pr86655.cc: New test.
2529
49c83dca 25302019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2531
2532 Rewrite variant.
2533 Also PR libstdc++/85517
2534 * include/std/variant (__do_visit): New.
2535 (__variant_cast): Likewise.
2536 (__variant_cookie): Likewise.
2537 (__erased_*): Remove.
2538 (_Variant_storage::_S_vtable): Likewise.
2539 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2540 (_Variant_storage::__M_reset): Adjust.
2541 (__variant_construct): New.
2542 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2543 __variant_construct.
2544 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2545 (_Move_ctor_base::__M_destructive_copy): New.
2546 (_Move_ctor_base::__M_destructive_move): Adjust to use
2547 __variant_construct.
2548 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2549 (_Copy_assign_alias): Adjust to check both copy assignment
2550 and copy construction for triviality.
2551 (_Move_assign_base::operator=): Adjust to use __do_visit.
2552 (_Multi_array): Add support for visitors that accept and return
2553 a __variant_cookie.
2554 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2555 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2556 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2557 a __variant_cookie temporary for a variant that is valueless and..
2558 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2559 (__gen_vtable::_Array_type): Conditionally make space for
2560 the __variant_cookie visitor case.
2561 (__variant_construct_by_index): New.
2562 (get_if): Adjust to use std::addressof.
2563 (relops): Adjust to use __do_visit.
2564 (variant): Add __variant_cast and __variant_construct_by_index
2565 as friends.
2566 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2567 instead of self-destruction.
2568 (variant::swap): Adjust to use __do_visit.
2569 (visit): Reimplement in terms of __do_visit.
2570 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2571 * testsuite/20_util/variant/compile.cc: Adjust.
2572 * testsuite/20_util/variant/run.cc: Likewise.
2573
13825fb2 25742019-03-06 Jonathan Wakely <jwakely@redhat.com>
2575
2613fa6b 2576 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2577 constant.
2578 * testsuite/experimental/feat-char8_t.cc: Likewise.
2579
a17f06b3 2580 * include/std/type_traits [C++20] (is_bounded_array)
2581 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2582 Define.
2583 * testsuite/20_util/is_bounded_array/requirements/
2584 explicit_instantiation.cc: New test.
2585 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2586 test.
2587 * testsuite/20_util/is_bounded_array/value.cc: New test.
2588 * testsuite/20_util/is_unbounded_array/requirements/
2589 explicit_instantiation.cc: New test.
2590 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2591 * test.
2592 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2593
13825fb2 2594 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2595 Add constexpr.
2596 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2597
2e73e63a 25982019-03-05 Jonathan Wakely <jwakely@redhat.com>
2599
2600 * include/c_compatibility/math.h [C++20] (lerp): Add using
2601 declaration.
2602 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2603 (__lerp): Define function template to implement lerp.
2604 (lerp(float, float, float), lerp(double, double, double))
2605 (lerp(long double, long double, long double)): Define for C++20.
2606 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2607 (midpoint(T, T), midpoint(T*, T*)): Define.
2608 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2609 * testsuite/26_numerics/lerp.cc: New test.
2610 * testsuite/26_numerics/midpoint/floating.cc: New test.
2611 * testsuite/26_numerics/midpoint/integral.cc: New test.
2612 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2613
08d3ce5b 26142019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2615
2616 PR libstdc++/88996 Implement P0439R0
2617 Make std::memory_order a scoped enumeration.
2618 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2619 add variables for the old enumerators. Adjust calls.
2620 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2621 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2622
ad29ad75 26232019-03-04 Jonathan Wakely <jwakely@redhat.com>
2624
4233f2a8 2625 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2626 directive.
2627
ad29ad75 2628 * include/std/memory_resource (polymorphic_allocator): Add default
2629 template argument for C++20.
2630 (polymorphic_allocator::allocate_bytes)
2631 (polymorphic_allocator::deallocate_bytes)
2632 (polymorphic_allocator::allocate_object)
2633 (polymorphic_allocator::deallocate_object)
2634 (polymorphic_allocator::new_object)
2635 (polymorphic_allocator::delete_object): New member functions for
2636 C++20.
2637 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2638 test.
2639
d4c27c4a 26402019-03-03 Jonathan Wakely <jwakely@redhat.com>
2641
2642 PR libstdc++/89562
2643 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2644 mode for mingw.
2645
6a9c77f1 26462019-03-01 Jonathan Wakely <jwakely@redhat.com>
2647
5b313df9 2648 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2649 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2650
6a9c77f1 2651 * include/std/memory (uses_allocator_construction_args): New set of
2652 overloaded functions.
2653 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2654 New functions.
2655 * include/std/memory_resource (polymorphic_allocator::construct)
2656 [__cplusplus > 201703l]: Replace all overloads with a single function
2657 using uses_allocator_construction_args.
2658 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2659 test.
2660 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2661
53ea0887 26622019-02-27 Jonathan Wakely <jwakely@redhat.com>
2663
2664 PR libstdc++/89466
2665 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2666 stylesheet directories before check for xsltproc. Try to use
2667 xmlcatalog to find local stylesheet directory before trying hardcoded
2668 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2669 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2670 use xsltproc if xmlcatalog fails to find a local stylesheet.
2671 * configure.ac: Check for xmlcatalog.
2672 * Makefile.in: Regenerate.
2673 * configure: Likewise.
2674 * doc/Makefile.in: Likewise.
2675 * include/Makefile.in: Likewise.
2676 * libsupc++/Makefile.in: Likewise.
2677 * po/Makefile.in: Likewise.
2678 * python/Makefile.in: Likewise.
2679 * src/Makefile.in: Likewise.
2680 * src/c++11/Makefile.in: Likewise.
2681 * src/c++17/Makefile.in: Likewise.
2682 * src/c++98/Makefile.in: Likewise.
2683 * src/filesystem/Makefile.in: Likewise.
2684 * testsuite/Makefile.in: Likewise.
2685
72ebb7e8 26862019-02-26 Jonathan Wakely <jwakely@redhat.com>
2687
a7f2f1b1 2688 PR libstdc++/89477
2689 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2690 container deduction guides.
2691 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2692 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2693 parameters in deduction guides.
2694 * include/bits/stl_multimap.h (multimap): Likewise.
2695 * include/bits/stl_multiset.h (multiset): Likewise.
2696 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2697 * include/bits/stl_set.h (set): Likewise.
2698 * include/bits/stl_stack.h (stack): Likewise.
2699 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2700 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2701 constrain parameters in deduction guides.
2702 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2703 Likewise.
2704 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2705 deduction cases.
2706 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2707 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2708 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2709 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2710 Likewise.
2711 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2712 Likewise.
2713 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2714
72ebb7e8 2715 PR libstdc++/89416
2716 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2717 to class template and partial specialization using void_t.
2718 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2719
c9f61a64 27202019-02-24 Jonathan Wakely <jwakely@redhat.com>
2721
2722 PR libstdc++/89416
2723 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2724 copy and move members public.
2725
61e2d6f7 27262019-02-23 Jonathan Wakely <jwakely@redhat.com>
2727
87798f3f 2728 * include/std/type_traits (__underlying_type_impl): New helper to
2729 make underlying_type SFINAE-friendly.
2730 (underlying_type): Derive from __underlying_type_impl.
2731 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2732 test.
2733
61e2d6f7 2734 PR libstdc++/89446
2735 * include/bits/char_traits.h (__constant_char_array): Check index is
2736 in range before dereferencing.
2737 (char_traits<char>::compare, char_traits<char>::find)
2738 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2739 immediately if n is zero.
2740 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2741 Remove workarounds for PR 67026.
2742 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2743 New test.
2744 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2745 New test.
2746
90a443b3 27472019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2748
2749 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2750 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2751
98485ce3 27522019-02-22 Jakub Jelinek <jakub@redhat.com>
2753
2754 PR libstdc++/89402
2755 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2756 type to std::size_t and argument to type to long double.
2757
26b4fc38 27582019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2759
2760 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2761 * config/abi/post/sparc64-linux-gnu: New directory.
2762 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2763 * config/abi/post/sparc64-linux-gnu/32: New directory.
2764 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2765
4f847a8e 27662019-02-21 Jonathan Wakely <jwakely@redhat.com>
2767
2768 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2769 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2770 test.
2771
aad651b3 27722019-02-22 Tom Honermann <tom@honermann.net>
2773
2774 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2775 printers for u8string and u8string_view.
2776
c783b3cc 27772019-02-22 Tom Honermann <tom@honermann.net>
2778
2779 * testsuite/18_support/byte/ops.cc: Validate
2780 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2781 std::to_integer<char32_t>.
2782 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2783 std::numeric_limits<char8_t>.
2784 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2785 std::numeric_limits<char8_t>::lowest().
2786 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2787 std::numeric_limits<char8_t>::max_digits10.
2788 * testsuite/18_support/type_info/fundamental.cc: Validate
2789 typeinfo for char8_t.
2790 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2791 std::from_chars with char8_t.
2792 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2793 Validate explicit instantiation of std::hash<char8_t>.
2794 * testsuite/20_util/is_integral/value.cc: Validate
2795 std::is_integral<char8_t>.
2796 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2797 Validate std::make_signed<char8_t>.
2798 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2799 Validate u8string construction from char8_t sources.
2800 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2801 std::pmr::u8string.
2802 * testsuite/21_strings/basic_string_view/operations/compare/
2803 char/70483.cc: Validate substr operations on u8string_view.
2804 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2805 the u8string_view typedef is defined.
2806 * testsuite/21_strings/char_traits/requirements/
2807 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2808 member functions.
2809 * testsuite/21_strings/char_traits/requirements/
2810 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2811 constexpr member functions.
2812 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2813 that the u8string typedef is defined.
2814 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2815 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2816 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2817 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2818 numbers.
2819 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2820 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2821 Likewise.
2822 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2823 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2824 Validate std::atomic<char8_t>::is_always_lock_free
2825 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2826 Update line numbers.
2827 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2828 Likewise.
2829 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2830 Likewise.
2831 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2832 Validate std::experimental::pmr::u8string.
2833 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2834 u8string_view typedef is defined.
2835 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2836 char32_t to the typelists.
2837
ef96a935 28382019-02-22 Tom Honermann <tom@honermann.net>
2839
2840 * include/ext/typelist.h: Constrain a partial specialization of
2841 typelist::detail::append_ to only match chain<T1,T2>.
2842
d373b606 28432019-02-21 Jonathan Wakely <jwakely@redhat.com>
2844
2845 PR libstdc++/89416
2846 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2847 class template with class. Replace move and copy member types with
2848 member alias templates, so they are only instantiated when needed.
2849 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2850 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2851 test for C++11/14/17 as well.
2852 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2853 test.
2854
25395ee8 28552019-02-20 Jakub Jelinek <jakub@redhat.com>
2856
2857 PR libstdc++/89402
2858 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2859 _GLIBCXX_PURE to the alias declaration.
2860
affcb65b 28612019-02-19 Jonathan Wakely <jwakely@redhat.com>
2862
2863 * testsuite/21_strings/basic_string/literals/types.cc
2864 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2865 * testsuite/21_strings/basic_string/literals/values.cc
2866 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2867 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2868 potentially having different type.
2869 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2870 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2871 to char.
2872 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2873 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2874 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2875 string literals only using basic character set.
2876 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2877 u8 literals to char.
2878 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2879 Test ATOMIC_CHAR8_T_LOCK_FREE.
2880 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2881 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2882 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2883 * testsuite/experimental/string_view/literals/types.cc
2884 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2885 literal.
2886 * testsuite/experimental/string_view/literals/values.cc
2887 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2888
4acc5060 28892019-02-19 Tom Honermann <tom@honermann.net>
2890
2891 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2892 from char16_32_t.cc; validates numeric_limits<char8_t>.
2893 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2894 test cloned from types.cc; validates operator""s for char8_t
2895 returns u8string.
2896 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2897 test cloned from values.cc; validates construction and comparison
2898 of u8string values.
2899 * testsuite/21_strings/basic_string/requirements/
2900 /explicit_instantiation/char8_t/1.cc: New test cloned from
2901 char16_t/1.cc; validates explicit instantiation of
2902 basic_string<char8_t>.
2903 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2904 New test cloned from types.cc; validates operator""sv for char8_t
2905 returns u8string_view.
2906 * testsuite/21_strings/basic_string_view/literals/
2907 values-char8_t.cc: New test cloned from values.cc; validates
2908 construction and comparison of u8string_view values.
2909 * testsuite/21_strings/basic_string_view/requirements/
2910 explicit_instantiation/char8_t/1.cc: New test cloned from
2911 char16_t/1.cc; validates explicit instantiation of
2912 basic_string_view<char8_t>.
2913 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2914 New test cloned from char16_t/65049.cc; validates that
2915 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2916 * testsuite/21_strings/char_traits/requirements/char8_t/
2917 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2918 that char_traits<char8_t> member typedefs are present and correct.
2919 * testsuite/21_strings/char_traits/requirements/
2920 explicit_instantiation/char8_t/1.cc: New test cloned from
2921 char16_t/1.cc; validates explicit instantiation of
2922 char_traits<char8_t>.
2923 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2924 from char16_t.cc: validates
2925 codecvt<char16_t, char8_t, mbstate_t>.
2926 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2927 from char32_t.cc: validates
2928 codecvt<char32_t, char8_t, mbstate_t>.
2929 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2930 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2931 codecvt<char32_t, char8_t, std::mbstate_t>.
2932 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2933 test cloned from string.cc; validates filesystem::path construction
2934 from char8_t input.
2935 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2936 the __cpp_lib_char8_t feature test macro is defined with the
2937 correct value.
2938 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2939 New test cloned from string.cc; validates filesystem::path
2940 construction from char8_t input.
2941 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2942 test cloned from types.cc; validates operator""sv for char8_t
2943 returns u8string_view.
2944 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2945 New test cloned from values.cc; validates construction and
2946 comparison of u8string_view values.
2947 * testsuite/experimental/string_view/requirements/
2948 explicit_instantiation/char8_t/1.cc: New test cloned from
2949 char16_t/1.cc; validates explicit instantiation of
2950 basic_string_view<char8_t>.
2951 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2952 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2953 enabled.
2954
25694c85 29552019-02-19 Tom Honermann <tom@honermann.net>
2956
2957 P0482R5 char8_t: Standard library support
2958 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2959 typeinfo symbols for char8_t.
2960 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2961 (GLIBCXX_3.4.26): Add symbols for specializations of
2962 numeric_limits and codecvt that involve char8_t.
2963 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2964 * include/bits/atomic_base.h: Add atomic_char8_t.
2965 * include/bits/basic_string.h: Add std::hash<u8string> and
2966 operator""s(const char8_t*, size_t).
2967 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2968 __cpp_lib_char8_t.
2969 * include/bits/char_traits.h: Add char_traits<char8_t>.
2970 * include/bits/codecvt.h: Add
2971 codecvt<char16_t, char8_t, mbstate_t>,
2972 codecvt<char32_t, char8_t, mbstate_t>,
2973 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2974 codecvt_byname<char32_t, char8_t, mbstate_t>.
2975 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2976 recognize char8_t as an integral type.
2977 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2978 char8_t.
2979 (path::u8string): Return std::u8string when char8_t support is
2980 enabled.
2981 (path::generic_u8string): Likewise.
2982 (path::_S_convert): Handle conversion from char8_t input.
2983 (path::_S_str_convert): Likewise.
2984 * include/bits/functional_hash.h: Add hash<char8_t>.
2985 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2986 char8_t.
2987 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2988 for new char8_t specializations.
2989 * include/bits/localefwd.h: Add missing declarations of
2990 codecvt<char16_t, char, mbstate_t> and
2991 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2992 codecvt<char16_t, char8_t, mbstate_t> and
2993 codecvt<char32_t, char8_t, mbstate_t>.
2994 * include/bits/postypes.h: Add u8streampos
2995 * include/bits/stringfwd.h: Add declarations of
2996 char_traits<char8_t> and u8string.
2997 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2998 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2999 Recognize char8_t.
3000 (path::u8string): Return std::u8string when char8_t support is
3001 enabled.
3002 (path::generic_u8string): Likewise.
3003 (path::_S_convert): Handle conversion from char8_t input.
3004 (path::_S_str_convert): Likewise.
3005 * include/experimental/string: Add u8string.
3006 * include/experimental/string_view: Add u8string_view,
3007 hash<experimental::u8string_view>, and
3008 operator""sv(const char8_t*, size_t).
3009 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3010 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3011 as a character type.
3012 * include/std/limits: Add numeric_limits<char8_t>.
3013 * include/std/string_view: Add u8string_view,
3014 hash<experimental::u8string_view>, and
3015 operator""sv(const char8_t*, size_t).
3016 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3017 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3018 * libsupc++/atomic_lockfree_defines.h: Define
3019 ATOMIC_CHAR8_T_LOCK_FREE.
3020 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3021 codecvt.cc and limits.cc so that char8_t specializations of
3022 numeric_limits and codecvt and emitted.
3023 * src/c++11/Makefile.in: Likewise.
3024 * src/c++11/codecvt.cc: Define members of
3025 codecvt<char16_t, char8_t, mbstate_t>,
3026 codecvt<char32_t, char8_t, mbstate_t>,
3027 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3028 codecvt_byname<char32_t, char8_t, mbstate_t>.
3029 * src/c++11/limits.cc: Define members of
3030 numeric_limits<char8_t>.
3031 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3032 locale_init.cc and localename.cc.
3033 * src/c++98/Makefile.in: Likewise.
3034 * src/c++98/locale_init.cc: Add initialization for the
3035 codecvt<char16_t, char8_t, mbstate_t> and
3036 codecvt<char32_t, char8_t, mbstate_t> facets.
3037 * src/c++98/localename.cc: Likewise.
3038 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3039
140615bb 30402019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3041
3042 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3043 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3044 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3045
c677a9d7 30462019-02-14 Jonathan Wakely <jwakely@redhat.com>
3047
1bbfe9f8 3048 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3049 * doc/html/*: Regenerate.
3050
b24f00b1 3051 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3052 * doc/html/*: Regenerate.
3053
a3d1baa9 3054 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3055 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3056 allocator type in is_constructible checks.
3057 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3058 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3059 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3060 problematic type from LWG 2586 discussion.
3061 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3062 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3063
99d130bf 3064 * configure.ac: Check for C11 timespec_get function.
3065 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3066 (openbsd): Likewise
3067 * config.h.in: Regenerate.
3068 * configure: Regenerate.
3069 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3070 std for C++17 and up.
3071
48772ec3 3072 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3073 * include/bits/stl_queue.h
3074 (priority_queue(const Compare&, const Container&, const Alloc&))
3075 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3076 make_heap.
3077 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3078
ee32dd64 3079 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3080 * include/bits/stl_queue.h (queue, priority_queue): Add static
3081 assertions to enforce LWG 2566 requirement on value_type.
3082 * include/bits/stl_stack.h (stack): Likewise.
3083
9724de38 3084 PR middle-end/89303
3085 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3086
c677a9d7 3087 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3088 * include/bits/std_abs.h: Add comment about LWG 2735.
3089 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3090
4194f872 30912019-02-13 Jonathan Wakely <jwakely@redhat.com>
3092
3093 PR libstdc++/89345
3094 * include/std/version [__cpp_impl_destroying_delete]
3095 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3096 * libsupc++/new [__cpp_impl_destroying_delete]
3097 (__cpp_lib_destroying_delete): Likewise.
3098 (destroying_delete_t, destroying_delete): Likewise, but define even
3099 when __cpp_impl_destroying_delete is not defined.
3100 * testsuite/18_support/destroying_delete.cc: New test.
3101
aaacaee2 31022019-02-11 Jonathan Wakely <jwakely@redhat.com>
3103
3104 PR libstdc++/89023
3105 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3106 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3107 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3108 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3109
5256b0dd 31102019-02-09 Jonathan Wakely <jwakely@redhat.com>
3111
3112 PR libstdc++/71044
3113 * include/bits/fs_path.h (path::has_root_name)
3114 (path::has_root_directory, path::has_root_path)
3115 (path::has_relative_path, path::has_parent_path)
3116 (path::has_filename, path::has_stem, path::has_extension)
3117 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3118 noexcept.
3119 * src/c++17/fs_path.cc (path::has_root_name)
3120 (path::has_root_directory, path::has_root_path)
3121 (path::has_relative_path, path::has_parent_path)
3122 (path::has_filename, path::_M_find_extension): Add noexcept.
3123
e32f625e 31242019-02-06 Jonathan Wakely <jwakely@redhat.com>
3125
3126 PR libstdc++/89102 (partial)
3127 * include/std/type_traits (common_type<>): Define.
3128 (common_type<T>): Derive from common_type<T, T>.
3129 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3130 Test zero-length template argument list.
3131 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3132 Test additional single argument cases.
3133 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3134 Adjust expected error.
3135
b03489db 31362019-02-05 Jonathan Wakely <jwakely@redhat.com>
3137
e89e4fec 3138 PR libstdc++/89128
3139 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3140 guides.
3141 * include/bits/stl_stack.h (stack): Likewise.
3142 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3143 * testsuite/23_containers/queue/deduction.cc: New test.
3144 * testsuite/23_containers/stack/deduction.cc: New test.
3145
b640dd11 3146 PR libstdc++/89194
3147 * include/std/type_traits (__is_convertible_helper)
3148 (__is_convertible_helper<_From, _To, false>): Revert changes to
3149 support is_nothrow_convertible.
3150 (__is_nt_convertible_helper): New helper.
3151 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3152
74c88c5f 3153 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3154 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3155
eca5e8d4 3156 PR libstdc++/89130
3157 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3158 __is_alloc_insertable_impl. Replace single type member with two
3159 members, one for each of copy and move insertable.
3160 (__is_move_insertable): New trait for internal use.
3161 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3162 (vector::_S_nothrow_relocate(true_type)): New functions to
3163 conditionally check if __relocate_a can throw.
3164 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3165 on __is_move_insertable.
3166 (vector::_S_do_relocate): New overloaded functions to conditionally
3167 call __relocate_a.
3168 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3169 based on _S_use_relocate.
3170 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3171 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3172 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3173
b03489db 3174 PR libstdc++/89090
3175 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3176 parameter unnamed. Add message to static assertion.
3177 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3178 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3179 in C++11 code.
3180
71625a15 31812019-02-05 Marc Glisse <marc.glisse@inria.fr>
3182
3183 PR libstdc++/87106
3184 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3185 Rename...
3186 (__is_bitwise_relocatable): ... to this.
3187 (__relocate_a_1): Adapt.
3188 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3189 (__is_bitwise_relocatable): ... to this.
3190
e7b22e58 31912019-01-30 Jonathan Wakely <jwakely@redhat.com>
3192
3193 PR libstdc++/89117
3194 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3195 final component as well as from _M_pathname. Append the dot using
3196 operator+= instead of only to _M_pathname.
3197 (path::_M_find_extension): Reformat slightly.
3198 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3199 Add more test cases.
3200
dae923a7 32012019-01-30 Ulrich Drepper <drepper@redhat.com>
3202
3203 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3204
710397ad 32052019-01-29 Jonathan Wakely <jwakely@redhat.com>
3206
5efc4356 3207 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3208 constexpr specifiers from arg and proj.
3209
5f15e718 3210 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3211 __shared_ptr instantiations used by gcc4-compatible ABI.
3212
307e86fc 3213 * include/experimental/forward_list (experimental::erase): Qualify
3214 call to erase_if.
3215 * include/experimental/list (experimental::erase): Likewise.
3216 * include/std/forward_list (std::erase): Likewise.
3217 * include/std/list (std::erase): Likewise.
3218
38129d1a 3219 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3220 C++2a.
3221 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3222 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3223 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3224 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3225 * testsuite/ext/array_allocator/26875.cc: Likewise.
3226 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3227 * testsuite/util/replacement_memory_operators.h: Likewise.
3228 * testsuite/util/testsuite_allocator.h: Likewise.
3229
710397ad 3230 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3231 normal mode vector, even for debug mode.
3232 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3233 Define alias template for normal mode vector.
3234
70f71249 32352019-01-28 Jonathan Wakely <jwakely@redhat.com>
3236
3237 PR libstdc++/68737
3238 * config/locale/generic/c_locale.h (__convert_from_v)
3239 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3240 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3241 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3242 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3243
f1074115 32442019-01-24 Jonathan Wakely <jwakely@redhat.com>
3245
4bc4fd90 3246 PR libstdc++/88840
3247 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3248 data member with static member function _S_use_relocate().
3249 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3250 (vector::_M_default_append): Use _S_use_relocate() instead of
3251 __use_relocate.
3252
f1074115 3253 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3254 sign of results.
3255
1c4657a3 32562019-01-22 Jonathan Wakely <jwakely@redhat.com>
3257
3258 PR libstdc++/88740
3259 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3260 write to stderr instead of using printf.
3261
dafe8c59 32622019-01-21 Jakub Jelinek <jakub@redhat.com>
3263
3264 PR libstdc++/86590
3265 * include/bits/char_traits.h (__constant_string_p,
3266 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3267 available.
3268
eaf966f3 32692019-01-20 Ulrich Drepper <drepper@redhat.com>
3270
3271 Implement C++20 P0600r1.
3272 * include/backward/hash_map: Add nodiscard attribute to empty.
3273 * include/backward/hash_set: Likewise.
3274 * backward/hashtable.h: Likewise.
3275 * include/bits/basic_string.h: Likewise.
3276 * include/bits/forward_list.h: Likewise.
3277 * include/bits/hashtable.h: Likewise.
3278 * include/bits/regex.h: Likewise.
3279 * include/bits/stl_deque.h: Likewise.
3280 * include/bits/stl_list.h: Likewise.
3281 * include/bits/stl_map.h: Likewise.
3282 * include/bits/stl_multimap.h: Likewise.
3283 * include/bits/stl_multiset.h: Likewise.
3284 * include/bits/stl_queue.h: Likewise.
3285 * include/bits/stl_set.h: Likewise.
3286 * include/bits/stl_stack.h: Likewise.
3287 * include/bits/stl_tree.h: Likewise.
3288 * include/bits/stl_vector.h: Likewise.
3289 * include/bits/unordered_map.h: Likewise.
3290 * include/bits/unordered_set.h: Likewise.
3291 * include/debug/array: Likewise.
3292 * include/experimental/any: Likewise.
3293 * include/experimental/bits/fs_path.h: Likewise.
3294 * include/experimental/internet: Likewise.
3295 * include/experimental/string_view: Likewise.
3296 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3297 Likewise.
3298 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3299 Likewise.
3300 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3301 Likewise.
3302 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3303 Likewise.
3304 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3305 Likewise.
3306 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3307 Likewise.
3308 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3309 Likewise.
3310 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3311 Likewise.
3312 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3313 info_fn_imps.hpp: Likewise.
3314 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3315 left_child_next_sibling_heap_.hpp: Likewise.
3316 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3317 Likewise.
3318 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3319 Likewise.
3320 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3321 Likewise.
3322 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3323 Likewise.
3324 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3325 Likewise.
3326 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3327 Likewise.
3328 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3329 Likewise.
3330 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3331 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3332 * include/ext/rope: Likewise.
3333 * include/ext/slist: Likewise.
3334 * include/ext/vstring.h: Likewise.
3335 * include/profile/array: Likewise.
3336 * include/std/array: Likewise.
3337 * include/tr1/array: Likewise.
3338 * include/tr1/hashtable.h: Likewise.
3339 * include/tr1/regex: Likewise.
3340 * include/tr2/dynamic_bitset: Likewise.
3341 * include/bits/alloc_traits.h: Add nodiscard attribute to
3342 allocate.
3343 * include/experimental/memory_resource: Likewise.
3344 * include/ext/alloc_traits.h: Likewise.
3345 * include/ext/array_allocator.h: Likewise.
3346 * include/ext/bitmap_allocator.h: Likewise.
3347 * include/ext/debug_allocator.h: Likewise.
3348 * include/ext/extptr_allocator.h: Likewise.
3349 * include/ext/mt_allocator.h: Likewise.
3350 * include/ext/new_allocator.h: Likewise.
3351 * include/ext/pool_allocator.h: Likewise.
3352 * include/ext/throw_allocator.h: Likewise.
3353 * include/std/scoped_allocator: Likewise.
3354 * libsupc++/eh_alloc.cc: Likewise.
3355 * include/std/future: Add nodiscard attribute to async.
3356 * libsupc++/new: Add nodiscard attribute to new.
3357
3c1c2a8c 33582019-01-18 Jonathan Wakely <jwakely@redhat.com>
3359
3360 PR libstdc++/87514
3361 PR libstdc++/87520
3362 PR libstdc++/88782
3363 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3364 * include/bits/shared_ptr.h
3365 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3366 (allocate_shared): Change to use new tag type.
3367 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3368 Declare new member function.
3369 (_Sp_alloc_shared_tag): Define new type.
3370 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3371 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3372 _Sp_make_shared_tag::_S_eq to check type_info.
3373 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3374 Constrain to prevent being called with _Sp_alloc_shared_tag.
3375 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3376 Replace constructor with ...
3377 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3378 reference parameter so address of the new object can be returned to
3379 the caller. Obtain the allocator from the tag type.
3380 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3381 constructor with ...
3382 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3383 to the __shared_count constructor.
3384 (__allocate_shared): Change to use new tag type.
3385 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3386
21a962b2 33872019-01-17 Jonathan Wakely <jwakely@redhat.com>
3388
464ac146 3389 * src/c++17/fs_ops.cc
3390 (equivalent(const path&, const path&, error_code&))
3391 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3392 compare files instead of relying on incomplete info returned by stat.
3393
2987a93d 3394 PR libstdc++/88884
3395 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3396 if the path is already absolute.
3397 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3398 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3399
21a962b2 3400 PR libstdc++/88881
3401 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3402 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3403 of filesystem::exists.
3404 (create_directories(const path&, error_code&)): Add assertions.
3405 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3406 Add workaround for bug in _wstat for paths with trailing slash.
3407 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3408 for expected behaviour on mingw.
3409 * testsuite/experimental/filesystem/operations/create_directories.cc:
3410 Likewise.
3411 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3412 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3413 not test permissions on mingw targets.
3414
93478c9f 34152019-01-16 Jonathan Wakely <jwakely@redhat.com>
3416
3417 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3418 constructors and open members taking wide strings. Fix patterns for
3419 filesystem::path members to match wstring_view parameters. Add
3420 exports for shared_ptr members used by directory iterators.
3421 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3422 error code parameter if the file doesn't exist.
3423 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3424 Likewise.
3425 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3426 values for mingw targets, where "/" is not an absolute path. Do not
3427 test symlinks on mingw targets.
3428 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3429 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3430 on mingw targets.
3431 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3432 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3433 that each component of the path is created.
3434 * testsuite/experimental/filesystem/operations/create_directories.cc:
3435 Likewise.
3436 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3437 permissions on mingw targets.
3438 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3439 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3440 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3441 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3442 mingw targets.
3443 * testsuite/experimental/filesystem/operations/permissions.cc:
3444 Likewise.
3445 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3446 symlinks or permissions on mingw targets.
3447 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3448 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3449 symlinks on mingw targets.
3450 * testsuite/experimental/filesystem/operations/remove_all.cc:
3451 Likewise.
3452 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3453 permissions on mingw targets.
3454 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3455 test symlinks on mingw targets.
3456 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3457 for mingw targets.
3458
af93b844 34592019-02-14 Ulrich Drepper <drepper@redhat.com>
3460
3461 PR libstdc++/88738
3462 Warn about unused comparisons of shared_ptr/unique_ptr
3463 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3464 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3465 <, <=, >, >= for shared_ptr.
3466 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3467
8793c0de 34682019-01-15 Jonathan Wakely <jwakely@redhat.com>
3469
afa61572 3470 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3471 as 201611L, because P0497R0 changes are supported.
3472 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3473
feb89906 3474 * include/bits/erase_if.h [__cplusplus > 201703L]
3475 (__cpp_lib_erase_if): Only define for C++2a.
3476 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3477 (__cpp_lib_null_iterators): Define.
3478 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3479 (__cpp_lib_null_iterators): Define.
3480 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3481
d253bcb1 3482 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3483 status.
3484 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3485 Define.
3486 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3487 changes are supported.
3488 * include/std/optional (__cpp_lib_optional): Likewise.
3489 * include/std/variant (__cpp_lib_variant): Likewise.
3490 * include/std/version [!__STRICT_ANSI__]
3491 (__cpp_lib_uncaught_exceptions): Define as long integer.
3492 [__cplusplus >= 201703L] (__cpp_lib_any)
3493 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3494 (__cpp_lib_variant): Define for C++17.
3495 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3496 as long integer.
3497 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3498 integer.
3499
8793c0de 3500 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3501
a8cd4b2b 35022019-01-12 Jonathan Wakely <jwakely@redhat.com>
3503
3504 PR libstdc++/88811
3505 PR libstdc++/83306
3506 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3507 before second path.
3508 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3509 test.
3510
a5b1332c 35112019-01-11 Jonathan Wakely <jwakely@redhat.com>
3512
656ac8b7 3513 * doc/xml/manual/intro.xml: Include new section.
3514 * doc/xml/manual/status_cxx2017.xml: Document more
3515 implementation-defined properties of the library.
3516 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3517 * doc/html/*: Regenerate.
3518
f5480b8c 3519 * include/bits/refwrap.h [__cplusplus > 201703L]
3520 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3521 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3522 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3523 for C++2a.
3524 (reference_wrapper::operator()): Add static assertion.
3525 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3526
36496c4d 3527 * include/std/chrono (duration_values::zero(), duration_values::min())
3528 (duration_values::max()): Add noexcept.
3529 (duration::zero(), duration::min(), duration::max()): Likewise.
3530 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3531 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3532 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3533
a5b1332c 3534 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3535
d9de68bc 35362019-01-11 Jakub Jelinek <jakub@redhat.com>
3537
3538 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3539 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3540
beb370cb 35412019-01-11 Jonathan Wakely <jwakely@redhat.com>
3542
1d628fd4 3543 PR libstdc++/88802
3544 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3545 specialization for C++17 (P0513R0, LWG 2817).
3546 * testsuite/20_util/hash/nullptr.cc: New test.
3547
a18b3766 3548 PR libstdc++/88125
3549 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3550 pattern for std::basic_stringbuf::str().
3551
beb370cb 3552 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3553 basic_ostream::operator<< patterns.
3554
cbbb35ec 35552019-01-10 Jonathan Wakely <jwakely@redhat.com>
3556
1715824b 3557 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3558 test failures on targets with 32-bit time_t.
3559
f5529091 3560 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3561 * include/std/deque: Likewise.
3562 * include/std/forward_list: Likewise.
3563 * include/std/list: Likewise.
3564 * include/std/string: Likewise.
3565 * include/std/vector: Likewise.
3566 * include/std/version: Likewise.
3567 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3568 * testsuite/23_containers/deque/erasure.cc: Likewise.
3569 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3570 * testsuite/23_containers/list/erasure.cc: Likewise.
3571 * testsuite/23_containers/map/erasure.cc: Likewise.
3572 * testsuite/23_containers/set/erasure.cc: Likewise.
3573 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3574 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3575 * testsuite/23_containers/vector/erasure.cc: Likewise.
3576
cbbb35ec 3577 * include/experimental/internet [AI_NUMERICSERV]
3578 (resolver_base::numeric_service): Define conditionally.
3579 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3580 conditionally.
3581 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3582 Likewise.
3583
ac9a8436 35842019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3585 Jonathan Wakely <jwakely@redhat.com>
3586
3587 Implement LWG 2221
3588 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3589 (GLIBCXX_3.4.26): Add new exports.
3590 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3591 correct list of sources.
3592 * include/Makefile.in: Regenerate.
3593 * include/std/ostream (operator<<(nullptr_t)): New member function.
3594 * src/c++17/ostream-inst.cc: New file.
3595 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3596 test.
3597
5f027941 35982019-01-10 Jonathan Wakely <jwakely@redhat.com>
3599
3600 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3601 of the source file containing the caller.
3602 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3603 directories created by test.
3604 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3605 Likewise.
3606 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3607 Likewise.
3608 * testsuite/experimental/filesystem/iterators/
3609 recursive_directory_iterator.cc: Likewise.
3610
3273d2e6 36112019-01-10 Jakub Jelinek <jakub@redhat.com>
3612
3613 PR tree-optimization/88775
3614 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3615 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3616 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3617 instead of __builtin_constant_p if available. Don't bother with
3618 the pointer comparison in C++11 and earlier.
3619
f4d3c071 36202019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3621
3622 PR other/16615
3623
3624 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3625 with "cannot".
3626
8eba10af 36272019-01-09 Jonathan Wakely <jwakely@redhat.com>
3628
6a6ade9f 3629 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3630 for filesystem::path. Give variables more distinctive names.
3631
41cda271 3632 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3633 member function to perform non-trivial assignment.
3634 (_Optional_payload_base::_M_move_assign): Likewise.
3635 (_Optional_payload<T, true, false, true>::operator=)
3636 (_Optional_payload<T, true, true, false>::operator=)
3637 (_Optional_payload<T, true, false, false>::operator=): Call
3638 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3639
8eba10af 3640 PR libstdc++/88204
3641 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3642 test std::complex<long double> if long double format is IBM128.
3643 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3644 Likewise.
3645
64a50f48 36462019-01-08 Jonathan Wakely <jwakely@redhat.com>
3647
73f3ad16 3648 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3649 for old std::unique_ptr layout.
3650 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3651 to become valueless. Add filesystem::path tests.
3652
58e897da 3653 PR libstdc++/87855
3654 * include/std/optional (_Optional_payload_base): New class template
3655 for common code hoisted from _Optional_payload specializations. Use
3656 a template for the union, to allow a partial specialization for
3657 types with non-trivial destructors. Add constructors for in-place
3658 initialization to the union.
3659 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3660 to perform non-trivial copy construction, instead of relying on
3661 non-standard copy elision in a delegating constructor.
3662 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3663 non-trivial move construction.
3664 (_Optional_payload): Derive from _Optional_payload_base and use it
3665 for everything except the non-trivial assignment operators, which are
3666 defined as needed.
3667 (_Optional_payload<false, C, M>): Derive from the specialization
3668 _Optional_payload<true, false, false> and add a destructor.
3669 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3670 Forward to corresponding members of _Optional_payload.
3671 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3672 Hoist common members from _Optional_base.
3673 (_Optional_base): Make all members and base class public.
3674 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3675 _Optional_base_impl.
3676 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3677 support for new std::optional layout.
3678 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3679
64a50f48 3680 PR libstdc++/88066
3681 * include/bits/locale_conv.h: Use <> for includes not "".
3682 * include/ext/random: Likewise.
3683 * include/ext/vstring.h: Likewise.
3684
95b40931 36852019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3686
3687 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3688 (GLIBCXX_3.4.21): Likewise.
3689
fa00ec77 36902019-01-08 Jonathan Wakely <jwakely@redhat.com>
3691
3692 PR libstdc++/88749
3693 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3694 to match the one that controls whether utimbuf and utime are declared.
3695
3f304b2d 36962019-01-07 Jonathan Wakely <jwakely@redhat.com>
3697
fc6ac813 3698 PR libstdc++/87787
3699 * include/bits/char_traits.h (char_traits::move): Do not pass null
3700 pointers to memmove.
3701 * include/bits/locale_facets.h
3702 (ctype<char>::widen(const char*, const char*, char*)): Do not
3703 pass null pointers to memcpy.
3704 (ctype<char>::narrow(const char*, const char*, char, char*)):
3705 Likewise.
3706 (ctype<char>::do_widen(const char*, const char*, char*)):
3707 Likewise.
3708 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3709 Likewise.
3710
bbc66c45 3711 * doc/xml/manual/spine.xml: Update copyright years.
3712 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3713 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3714 for C++17 filesystem library.
3715 * doc/html/*: Regenerate.
3716
3f304b2d 3717 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3718 * config.h.in: Regenerate.
3719 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3720 alphabetically and add missing entries for copy_symlink,
3721 hard_link_count, rename, and resize_file.
3722 * configure: Regenerate.
3723 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3724 used unconditionally.
3725 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3726 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3727 supports truncating to zero length.
3728 * testsuite/27_io/filesystem/operations/all.cc: New test.
3729 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3730
0ebb0980 37312019-01-06 Jonathan Wakely <jwakely@redhat.com>
3732
3935f409 3733 PR libstdc++/86756
3734 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3735 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3736 * config.h.in: Regenerate.
3737 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3738 remaining std::filesystem types and functions.
3739 * configure: Regenerate.
3740 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3741 * src/c++17/Makefile.in: Regenerate.
3742 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3743 here, and change name of included file.
3744 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3745 here, and change name of included file.
3746 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3747 path to dir-common.h.
3748 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3749 path to ops-common.h. Disable -Wunused-parameter warnings.
3750 (internal_file_clock): Define unconditionally.
3751 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3752 define.
3753 (do_copy_file, do_space): Move definitions to ops.common.h.
3754 (copy, file_size, hard_link_count, last_write_time, space): Only
3755 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3756 report an error.
3757 (last_write_time, read_symlink): Remove unused attributes from
3758 parameters.
3759 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3760 * src/filesystem/Makefile.in: Regenerate.
3761 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3762 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3763 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3764 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3765 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3766 dummy types and functions instead of using #error.
3767 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3768 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3769 in terms of stat.
3770 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3771 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3772 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3773 to account for new namespace.
3774 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3775 -lstdc++fs from dg-options.
3776 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3777 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3778 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3779 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3780 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3781 Likewise.
3782 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3783 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3784 Likewise.
3785 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3786 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3787 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3788 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3789 * testsuite/27_io/filesystem/operations/create_directories.cc:
3790 Likewise.
3791 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3792 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3793 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3794 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3795 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3796 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3797 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3798 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3799 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3800 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3801 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3802 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3803 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3804 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3805 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3806 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3807 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3808 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3809 Likewise.
3810 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3811
3812
c6e37a9f 3813 PR libstdc++/86756
3814 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3815 typeinfo and vtables less greedy.
3816 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3817 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3818 * src/c++17/Makefile.in: Regenerate.
3819 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3820 here, and change name of included file.
3821 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3822 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3823 from sources.
3824 * src/filesystem/Makefile.in: Regenerate.
3825 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3826 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3827 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3828 from dg-options and remove dg-require-filesystem-ts.
3829 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3830 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3831 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3832 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3833 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3834 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3835 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3836 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3837 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3838 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3839 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3840 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3841 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3842 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3843 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3844 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3845 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3846 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3847 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3848 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3849 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3850 Likewise.
3851 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3852 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3853 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3854 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3855 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3856 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3857 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3858 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3859 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3860 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3861 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3862 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3863 Likewise.
3864 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3865 Likewise.
3866 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3867 Likewise.
3868 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3869 Likewise.
3870 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3871 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3872 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3873 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3874 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3875 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3876 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3877 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3878 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3879 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3880 Likewise.
3881 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3882 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3883 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3884 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3885 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3886
8815ac91 3887 PR libstdc++/87431
3888 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3889 Check is_trivially_copyable instead of is_scalar.
3890 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3891 contained value can throw and its type is trivially copyable then
3892 construct into a temporary variant and move from it, to provide the
3893 strong exception safety guarantee.
3894 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3895 Likewise.
3896 * testsuite/20_util/variant/87431.cc: New test.
3897 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3898 conversion causes valueless state.
3899
0ebb0980 3900 PR libstdc++/88607
3901 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3902 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3903 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3904 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3905 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3906
adc6beee 39072019-01-05 Jonathan Wakely <jwakely@redhat.com>
3908
3909 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3910 (file_time_type): Redefine in terms of __file_clock.
3911 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3912 overflow.
3913 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3914 internal linkage.
3915 (internal_file_lock): New helper type for accessing __file_clock.
3916 (do_copy_file): Use internal_file_lock to convert system time to
3917 file_time_type.
3918 (last_write_time(const path&, error_code&)): Likewise.
3919 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3920
6b4a77f2 39212019-01-04 Jonathan Wakely <jwakely@redhat.com>
3922
98185b9f 3923 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3924 for const member functions of std::basic_string.
3925 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3926 in C++17.
3927 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3928 Make non-standard constructor private.
3929 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3930 Likewise.
3931 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3932 explicit instantiations for C++17 as well as earlier dialects.
3933 * src/c++17/Makefile.am: Add new source files.
3934 * src/c++17/Makefile.in: Regenerate.
3935 * src/c++17/cow-string-inst.cc: New file defining explicit
3936 instantiations for basic_string member functions added in C++17.
3937 * src/c++17/string-inst.cc: Likewise.
3938
859e6fed 3939 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3940 copy/move constructors for old std::basic_string.
3941 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3942 (basic_string::reference, basic_string::const_reference): Define
3943 as plain references for C++11 and later.
3944 (basic_string::basic_string()): Put constructor body outside
3945 preprocessor conditional groups.
3946 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3947 instead of copying it.
3948 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3949 Define.
3950 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3951 Define.
3952 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3953 cases for old basic_string.
3954 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3955 allocator-extended constructors unconditionally. Add extra members to
3956 allocator type when using old string ABI.
3957 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3958 for old string ABI.
3959 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3960
e13f6a7f 3961 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3962 -fno-inline added to test flags.
3963
a18fccd0 3964 * testsuite/21_strings/basic_string/requirements/
3965 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3966
7f77ca07 3967 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3968 assertion failures with old std::string ABI.
3969
9346fb0e 3970 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3971 with ...
3972 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3973 functions that will only erase elements at the end.
3974 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3975 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3976 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3977 of erase(p, end()).
3978 (path::_List::pop_back()): Define.
3979 (path::_List::_M_erase_from(const_iterator)): Define.
3980 (path::operator/=(const path&)): Use pop_back to remove last component
3981 and _M_erase_from to remove multiple components.
3982 (path::_M_append(basic_string_view<value_type>)): Likewise.
3983 (path::operator+=(const path&)): Likewise.
3984 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3985 (path::remove_filename()): Likewise.
3986 (path::lexically_normal()): Use _List::_Impl iterators instead of
3987 path::iterator. Use pop_back to remove components from the end. Clear
3988 trailing filename, instead of using erase(const_iterator) to remove
3989 a non-final component.
3990 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3991 additional cases.
3992 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3993
24230cab 3994 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3995 incorrect treatment of empty filename after trailing slash.
3996 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3997
6b4a77f2 3998 * testsuite/21_strings/basic_string/modifiers/assign/char/
3999 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4000 to test flags.
4001 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4002 move_assign_optim.cc: Likewise.
4003
02df5941 40042019-01-03 Jonathan Wakely <jwakely@redhat.com>
4005 Jakub Jelinek <jakub@redhat.com>
4006
4007 PR libstdc++/88607
4008 * include/experimental/memory: Replace UTF-8 quote characters.
4009 * include/std/future: Replace UTF-8 "em dash" characters.
4010
f8ad40d8 40112019-01-03 Jonathan Wakely <jwakely@redhat.com>
4012
9013258b 4013 PR libstdc++/88607
4014 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4015 * include/debug/forward_list: Likewise.
4016 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4017 character.
4018 * include/experimental/chrono: Likewise.
4019 * include/experimental/functional: Likewise.
4020 * include/experimental/ratio: Likewise.
4021 * include/experimental/system_error: Likewise.
4022 * include/experimental/tuple: Likewise.
4023 * include/experimental/type_traits: Likewise.
4024 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4025 * include/parallel/multiseq_selection.h: Likewise.
4026
f8ad40d8 4027 PR libstdc++/88681
4028 * config/abi/pre/gnu.ver: Add missing exports.
4029 * testsuite/22_locale/collate_byname/88681.cc: New test.
4030 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4031 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4032
138292f4 40332019-01-02 Jonathan Wakely <jwakely@redhat.com>
4034
553d41a8 4035 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4036 initializer_list<value_type> and from input iterator ranges.
4037 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4038
138292f4 4039 * testsuite/experimental/string_view/element_access/char/empty.cc:
4040 Fix year range in copyright header.
4041
963c0125 40422019-01-02 Joel Brobecker <brobecker@adacore.com>
4043
4044 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4045 Fix year range in copyright header.
4046
fbd26352 40472019-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 4048
4049 Update copyright years.
fb96fbb3 4050\f
fbd26352 4051Copyright (C) 2019 Free Software Foundation, Inc.
fb96fbb3 4052
4053Copying and distribution of this file, with or without modification,
4054are permitted in any medium without royalty provided the copyright
4055notice and this notice are preserved.