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