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