Minor simplifications for std::to_chars implementation
[gcc.git] / libstdc++-v3 / ChangeLog
1 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
2
3 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
4 (__detail::__to_chars_8_len): Remove.
5 (__detail::__to_chars_8): Inline length calculation here.
6 (__detail::__from_chars_binary): Use numeric_limits instead of
7 CHAR_BIT.
8
9 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10
11 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
12 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
13 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
14 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
15 Likewise.
16
17 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
18
19 * testsuite_files/util/testsuite_performance.h
20 (resource_counter::start): Ignore unused malloc(0) result.
21
22 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
23
24 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
25 Model Object Technologies): Adjust name and link.
26
27 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
28
29 * include/std/charconv (__detail::__to_chars_8)
30 __detail::__to_chars_16): Replace array of precomputed digits with
31 arithmetic operations to avoid CPU cache misses. Remove zero
32 termination from array of digits to allow symbol merge with generic
33 implementation of __detail::__to_chars. Replace final offsets with
34 constants. Use __detail::__to_chars_len_2 instead of a generic
35 __detail::__to_chars_len.
36 (__detail::__to_chars): Remove zero termination from array of digits.
37 (__detail::__to_chars_2): Leading digit is always '1'.
38
39 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
40
41 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
42
43 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
44
45 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
46
47 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
48
49 PR libstdc++/89164
50 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
51 to template parameters.
52 * include/bits/stl_uninitialized.h (uninitialized_copy)
53 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
54 diagnose invalid uses.
55 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
56 Adjust expected error.
57 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
58 New test.
59 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
60 89164.cc: New test.
61 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
62 New test.
63 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
64 89164.cc: New test.
65 * testsuite/23_containers/vector/cons/89164.cc: New test.
66 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
67
68 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
69
70 PR libstdc++/91067
71 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
72 * configure: Regenerate.
73 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
74 missing symbols.
75 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
76 constructors.
77 * testsuite/util/testsuite_abi.cc: Add new symbol version.
78
79 2019-08-29 Jakub Jelinek <jakub@redhat.com>
80
81 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
82 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
83
84 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
85
86 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
87 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
88 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
89 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
90 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
91 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
92 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
93
94 2019-08-23 Joseph Myers <joseph@codesourcery.com>
95
96 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
97 (std::filesystem::__gnu_posix::lstat): Add return type.
98
99 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
100
101 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
102
103 * include/std/numeric (reduce): Fix Doxygen markup.
104
105 PR libstdc++/91371
106 * include/std/type_traits (is_function): Simplify definition. Remove
107 partial specializations for function types.
108 (__is_referenceable): Simplify definition.
109 * testsuite/20_util/bind/91371.cc: New test.
110 * testsuite/20_util/is_function/91371.cc: New test.
111 * testsuite/20_util/is_function/value.cc: Check more pointer types.
112 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
113 * testsuite/20_util/is_object/91371.cc: New test.
114
115 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
116
117 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
118
119 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
120
121 PR libstdc++/91456
122 * include/bits/std_function.h (__check_func_return_type): Remove.
123 (function::_Callable): Use std::__is_invocable_impl instead of
124 __check_func_return_type.
125 * include/std/type_traits (__is_invocable_impl): Add another defaulted
126 template parameter. Define a separate partial specialization for
127 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
128 with a check that models delayed temporary materialization.
129 * testsuite/20_util/function/91456.cc: New test.
130 * testsuite/20_util/is_invocable/91456.cc: New test.
131
132 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
133
134 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
135
136 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
137
138 Implement C++20 p0879 - Constexpr for swap and swap related functions.
139 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
140 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
141 New macro.
142 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
143 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
144 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
145 * include/bits/move.h (swap): Add constexpr.
146 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
147 (__gcd, __rotate, rotate, __partition, __heap_select)
148 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
149 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
150 (__introselect, __chunk_insertion_sort, next_permutation)
151 (prev_permutation, partition, partial_sort, nth_element, sort)
152 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
153 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
154 (swap_ranges): Add constexpr.
155 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
156 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
157 Add constexpr.
158 * include/std/type_traits (swap): Add constexpr.
159 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
160 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
161 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
162 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
163 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
164 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
165 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
166 * testsuite/25_algorithms/partition/constexpr.cc: New test.
167 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
168 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
169 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
170 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
171 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
172 * testsuite/25_algorithms/sort/constexpr.cc: New test.
173 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
174 * testsuite/25_algorithms/swap/constexpr.cc: New test.
175 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
176
177 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
178
179 PR libstdc++/90361
180 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
181
182 * include/std/tuple (__unpack_std_tuple): New variable template and
183 partial specializations.
184 (apply, make_from_tuple): Add noexcept-specifier.
185 * testsuite/20_util/tuple/apply/2.cc: New test.
186 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
187
188 2019-08-09 Corentin Gay <gay@adacore.com>
189
190 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
191 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
192 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
193 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
194 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
195 Add call to `VERIFY`.
196
197 2019-08-09 Alexandre Oliva <oliva@adacore.com>
198
199 * include/ext/random
200 (normal_mv_distribution::param_type::param_type): New private
201 ctor taking a decomposed varcov matrix, for use by...
202 (operator>>): ... this, befriended.
203 * include/ext/random.tcc (operator>>): Use it.
204 (normal_mv_distribution::param_type::_M_init_lower): Adjust
205 member function name in exception message.
206
207 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
208
209 P0325R4 to_array from LFTS with updates
210 * include/experimental/array (to_array): Qualify call to __to_array.
211 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
212 * include/std/version (__cpp_lib_to_array): Likewise.
213 * testsuite/23_containers/array/creation/1.cc: New test.
214 * testsuite/23_containers/array/creation/2.cc: New test.
215 * testsuite/23_containers/array/creation/3_neg.cc: New test.
216 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
217 Use zero for dg-error line number.
218
219 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
220
221 P1651R0 bind_front should not unwrap reference_wrapper
222 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
223 * include/std/version (__cpp_lib_bind_front): Update value.
224 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
225 feature test macro.
226 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
227
228 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
229 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
230 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
231 specializations for __float128.
232 * testsuite/26_numerics/numbers/float128.cc: New test.
233
234 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
235
236 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
237 doxygen.nl.
238
239 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
240
241 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
242 in <algorithm> and <utility> Headers.
243 Implement C++20 p1023 - constexpr comparison operators for std::array.
244 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
245 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
246 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
247 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
248 none_of, partition_copy, partition_point, remove, remove_if,
249 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
250 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
251 count_if, equal, find, find_first_of, find_if, for_each, generate,
252 generate_n, lexicographical_compare, merge, mismatch, replace,
253 replace_if, search, search_n, set_difference, set_intersection,
254 set_symmetric_difference, set_union, transform, unique_copy):
255 Mark constexpr.
256 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
257 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
258 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
259 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
260 Use const ref instead of ref arg;
261 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
262 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
263 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
264 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
265 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
266 __iter_comp_iter): Mark constexpr.
267 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
268 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
269 none_of, any_of, find_if_not, is_partitioned, partition_point,
270 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
271 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
272 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
273 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
274 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
275 __equal_range, equal_range, binary_search, __includes, includes,
276 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
277 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
278 is_sorted_until, __is_permutation, is_permutation, for_each, find,
279 find_if, find_first_of, adjacent_find, count, count_if, search,
280 search_n, transform, replace, replace_if, generate, generate_n,
281 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
282 set_intersection, __set_difference, set_difference,
283 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
284 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
285 wrappers around __builtin_memmove and __builtin_memcmp
286 respectively;
287 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
288 copy, move, __copy_move_b, __copy_move_backward_a,
289 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
290 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
291 __lexicographical_compare_impl, __lexicographical_compare,
292 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
293 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
294 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
295 is_heap): Mark constexpr.
296 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
297 is_heap): Mark constexpr.
298 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
299 * include/std/array: Make comparison ops constexpr.
300 * include/std/utility: Make exchange constexpr.
301 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
302 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
303 * testsuite/23_containers/array/tuple_interface/
304 tuple_element_neg.cc: Adjust.
305 * testsuite/20_util/exchange/constexpr.cc: New.
306 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
307 * testsuite/25_algorithms/constexpr_macro.cc: New.
308 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
309 * testsuite/25_algorithms/all_of/constexpr.cc: New.
310 * testsuite/25_algorithms/any_of/constexpr.cc: New.
311 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
312 * testsuite/25_algorithms/copy/constexpr.cc: New.
313 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
314 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
315 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
316 * testsuite/25_algorithms/count/constexpr.cc: New.
317 * testsuite/25_algorithms/count_if/constexpr.cc: New.
318 * testsuite/25_algorithms/equal/constexpr.cc: New.
319 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
320 * testsuite/25_algorithms/fill/constexpr.cc: New.
321 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
322 * testsuite/25_algorithms/find/constexpr.cc: New.
323 * testsuite/25_algorithms/find_end/constexpr.cc: New.
324 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
325 * testsuite/25_algorithms/find_if/constexpr.cc: New.
326 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
327 * testsuite/25_algorithms/for_each/constexpr.cc: New.
328 * testsuite/25_algorithms/generate/constexpr.cc: New.
329 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
330 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
331 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
332 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
333 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
334 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
335 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
336 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
337 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
338 * testsuite/25_algorithms/merge/constexpr.cc: New.
339 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
340 * testsuite/25_algorithms/none_of/constexpr.cc: New.
341 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
342 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
343 * testsuite/25_algorithms/remove/constexpr.cc: New.
344 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
345 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
346 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
347 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
348 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
349 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
350 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
351 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
352 * testsuite/25_algorithms/search/constexpr.cc: New.
353 * testsuite/25_algorithms/search_n/constexpr.cc: New.
354 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
355 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
356 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
357 * testsuite/25_algorithms/set_union/constexpr.cc: New.
358 * testsuite/25_algorithms/transform/constexpr.cc: New.
359 * testsuite/25_algorithms/unique/constexpr.cc: New.
360 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
361 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
362
363 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
364
365 * include/std/memory (make_obj_using_allocator): Qualify call to
366 uses_allocator_construction_args.
367
368 P0631R4 Math Constants
369 * include/Makefile.am: Add new header.
370 * include/Makefile.in: Regenerate.
371 * include/precompiled/stdc++.h: Include new header.
372 * include/std/numbers: New header.
373 * include/std/version (__cpp_lib_math_constants): Define.
374 * testsuite/26_numerics/numbers/1.cc: New test.
375 * testsuite/26_numerics/numbers/2.cc: New test.
376 * testsuite/26_numerics/numbers/3.cc: New test.
377 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
378
379 * include/std/bit: Add Doxygen comments.
380
381 PR libstdc++/91308
382 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
383 constraints on deleter that should only apply to the constructor.
384 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
385 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
386 constraints on deleter here.
387 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
388
389 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
390
391 PR libstdc++/51333
392 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
393 constructor inline.
394 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
395 constructor.
396 * testsuite/18_support/51333.cc: New test.
397
398 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
399
400 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
401 to the Doxygen manual. Avoid a "here" link on the way.
402 Fix another broken link to Doxygen docblocks.
403
404 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
405
406 * include/std/bit (__cpp_lib_endian): Define.
407 * include/std/version (__cpp_lib_endian): Define.
408 * testsuite/26_numerics/endian/2.cc: New.
409 * testsuite/26_numerics/endian/3.cc: New.
410 * testsuite/26_numerics/endian/4.cc: New.
411
412 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
413
414 * testsuite/util/testsuite_iterators.h
415 (bidirectional_iterator_wrapper): Fix type comment.
416 (random_access_iterator_wrapper): Likewise.
417
418 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
419
420 * include/std/bit (endian): Move definition here as per P1612R1.
421 * include/std/type_traits (endian): Remove definition from here.
422 * testsuite/20_util/endian/1.cc: Rename to ...
423 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
424
425 2019-07-25 Martin Liska <mliska@suse.cz>
426 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
427
428 PR c++/23383
429 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
430 -fno-allocation-dce.
431 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
432 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
433 * testsuite/ext/new_allocator/check_new.cc: Likewise.
434
435 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
436
437 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
438 * testsuite/26_numerics/bit/bit.count/*: Here.
439
440 * include/std/bit (__rotl, __rotr): Change second parameter from
441 unsigned int to int and handle negative values.
442 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
443 parameter from unsigned int to int. Add nodiscard attribute.
444 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
445 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
446 shifts.
447 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
448 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
449 shifts.
450
451 * include/std/bit (__ceil2): Make unrepresentable results undefined,
452 as per P1355R2. Add debug assertion. Perform one left shift, not two,
453 so that out of range values cause undefined behaviour. Ensure that
454 shift will still be undefined if left operand is promoted.
455 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
456 unrepresentable values with checks that they are not core constant
457 expressions.
458 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
459
460 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
461
462 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
463 sized deallocation size computation.
464
465 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
466
467 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
468
469 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
470
471 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
472 (~_Temporary_buffer()): Use latter.
473 (_Temporary_buffer(_FIterator, size_type)): Likewise.
474
475 2019-07-17 Andreas Schwab <schwab@suse.de>
476
477 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
478
479 2019-07-16 Jason Merrill <jason@redhat.com>
480
481 * include/std/memory (uses_allocator_construction_args): Add parens
482 around constraint.
483
484 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
485
486 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
487
488 * include/experimental/string_view (__detail::__idt): Remove.
489 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
490 Use __type_identity_t instead of __detail::__idt;
491 * include/std/string_view (__detail::__idt): Remove.
492 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
493 Use __type_identity_t instead of __detail::__idt;
494 * include/std/type_traits (__type_identity_t): New alias template.
495
496 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
497 and floating point atomics.
498
499 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
500
501 * doc/xml/manual/configure.xml: Improve documentation of
502 --enable-libstdcxx-time option.
503
504 * include/bits/atomic_base.h (__atomic_impl): New namespace for
505 wrappers around atomic built-ins.
506 (__atomic_float, __atomic_ref): New class templates for use as base
507 classes.
508 * include/std/atomic (atomic<float>, atomic<double>)
509 (atomic<long double>): New explicit specializations.
510 (atomic_ref): New class template.
511 (__cpp_lib_atomic_ref): Define.
512 * include/std/version (__cpp_lib_atomic_ref): Define.
513 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
514 * testsuite/29_atomics/atomic_float/1.cc: New test.
515 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
516 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
517 * testsuite/29_atomics/atomic_ref/float.cc: New test.
518 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
519 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
520 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
521 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
522
523 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
524
525 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
526 throw() with _GLIBCXX_NOTHROW.
527 (__atomic_add_dispatch): Return after performing atomic increment.
528
529 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
530
531 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
532 (__exchange_and_add): Replace static specifier with always_inline
533 attribute.
534 (__exchange_and_add_single, __atomic_add_single): Likewise.
535 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
536 combine !__gthread_active_p() and !__GTHREADS branches.
537
538 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
539
540 PR libstdc++/91067
541 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
542 * configure: Regenerate.
543 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
544 missing symbols.
545 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
546 * testsuite/util/testsuite_abi.cc: Add new symbol version.
547
548 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
549
550 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
551 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
552 instead of __is_identifier to detect Clang support.
553
554 2019-07-02 Jim Wilson <jimw@sifive.com>
555
556 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
557 and xmllint.
558 * configure: Regenerate.
559
560 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
561
562 PR libstdc++/91012
563 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
564 for the what_arg parameters.
565 (filesystem_error::filesystem_error): Pass system_error::what() to
566 the _Impl constructor.
567 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
568 filesystem_error::what() contains system_error::what().
569
570 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
571
572 * include/std/charconv (chars_format): Define bitmask type.
573 * testsuite/20_util/to_chars/chars_format.cc: New test.
574
575 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
576 * include/std/bit (_If_is_unsigned_integer_type): Remove.
577 (_If_is_unsigned_integer): Use __is_unsigned_integer.
578 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
579 (countl_one(byte), countr_zero(byte), countr_one(byte))
580 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
581 (log2p1(byte)): Remove.
582 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
583 (__detail::__is_int_to_chars_type): Remove.
584 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
585 and __is_unsigned_integer.
586 * include/std/type_traits (__is_one_of): Move here from <charconv>.
587 (__is_signed_integer, __is_unsigned_integer): New helpers.
588 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
589 std::byte overload.
590 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
591 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
592 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
593 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
594 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
595 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
596 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
597 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
598 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
599 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
600
601 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
602
603 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
604 function.
605
606 2019-06-25 Jakub Jelinek <jakub@redhat.com>
607
608 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
609 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
610 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
611 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
612
613 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
614
615 * include/std/numeric (midpoint(T, T)): Change implementation for
616 floating-point types to avoid incorrect rounding of denormals.
617 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
618 rounding with denormals.
619 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
620 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
621
622 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
623
624 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
625
626 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
627 stage of bootstrap.
628 * configure: Regenerate.
629
630 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
631 Qualify calls to __never_valueless.
632
633 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
634 C++17 working draft.
635
636 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
637 vector<bool> for test.
638 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
639
640 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
641
642 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
643 private.
644 (istream_iterator::_M_read()): Do not check stream state before
645 attempting extraction. Set stream pointer to null when extraction
646 fails (P0738R2).
647 (operator==(const istream_iterator&, const istream_iterator&)): Change
648 to be a hidden friend of istream_iterator.
649 (operator!=(const istream_iterator&, const istream_iterator&)):
650 Likewise.
651 (ostream_iterator::ostream_iterator()): Add default constructor.
652 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
653 addressof.
654 * testsuite/24_iterators/istream_iterator/1.cc: New test.
655 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
656 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
657 constructor taking a string.
658 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
659 New test.
660
661 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
662 Jonathan Wakely <jwakely@redhat.com>
663
664 PR libstdc++/90945
665 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
666 values of type bool for vector<bool> elements.
667 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
668 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
669
670 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
671
672 PR libstdc++/90920 partially revert r263433
673 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
674 (rotate): Remove checks.
675 * testsuite/25_algorithms/rotate/90920.cc: New test.
676
677 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
678 category used in invocable check.
679 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
680 * testsuite/26_numerics/reduce/2.cc: New test.
681
682 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
683
684 * include/bits/algorithmfwd.h: Change title of doc group.
685 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
686 P0024R2.
687 * include/bits/stl_numeric.h: Define doc group and add algos to it.
688 * include/std/numeric (__is_random_access_iter): New internal trait.
689 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
690 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
691 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
692 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
693 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
694 * testsuite/26_numerics/reduce/1.cc: New test.
695 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
696 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
697 * testsuite/26_numerics/transform_reduce/1.cc: New test.
698 * testsuite/util/testsuite_iterators.h (test_container::size()): New
699 member function.
700
701 * include/c_global/cstddef (std::byte): Perform arithmetic operations
702 in unsigned int to avoid promotion (LWG 2950).
703
704 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
705
706 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
707 failure on AIX.
708
709 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
710
711 PR libstdc++/90281 Fix string conversions for filesystem::path
712 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
713 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
714 __str_codecvt_in_all to fail for partial conversions and throw on
715 error.
716 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
717 (path::_Cvt<char8_t>): Add explicit specialization.
718 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
719 overloads.
720 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
721 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
722 instead of codecvt_utf8. Use __str_codecvt_in_all and
723 __str_codecvt_out_all.
724 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
725 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
726 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
727 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
728 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
729 after converting to UTF-8.
730 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
731 __str_codecvt_in_all.
732 (path::string): Fix initialization of string types with different
733 allocators.
734 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
735 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
736 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
737 runtime conditions.
738 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
739 return false for partial conversions.
740 * include/experimental/bits/fs_path.h (u8path):
741 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
742 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
743 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
744 instead of codecvt_utf8. Use __str_codecvt_in_all and
745 __str_codecvt_out_all.
746 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
747 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
748 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
749 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
750 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
751 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
752 __str_codecvt_in_all.
753 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
754 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
755 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
756 __str_codecvt_in_all.
757 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
758 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
759 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
760 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
761 strings and with Unicode characters outside the basic multilingual
762 plane.
763 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
764 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
765 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
766 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
767 * testsuite/experimental/filesystem/path/native/string.cc: Test with
768 empty strings and with Unicode characters outside the basic
769 multilingual plane.
770
771 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
772 Jonathan Wakely <jwakely@redhat.com>
773
774 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
775 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
776 deallocate node if insertion fails.
777 (_Hashtable::_M_insert_multi_node): Likewise.
778 (_Hashtable::_M_reinsert_node): Pass additional key argument.
779 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
780 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
781 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
782 (_Hashtable::extract(const _Key&)): Likewise.
783 (_Hashtable::_M_merge_unique): Pass additional key argument.
784 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
785 _Scoped_node.
786 (_Hashtable::_M_insert): Likewise.
787 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
788 (_Hashtable_alloc): Add comments to functions with misleading names.
789
790 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
791
792 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
793 for std::string.
794 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
795 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
796 header for std::allocator.
797 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
798 using-declaration for std::size_t.
799 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
800 Likewise.
801 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
802 std::istream.
803 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
804 * testsuite/experimental/map/erasure.cc: Include <string> for
805 std::string.
806 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
807
808 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
809
810 * include/experimental/type_traits (experimental::nonesuch): Use
811 pragma to disable -Wctor-dtor-privacy warnings.
812 * include/std/type_traits (__is_convertible_helper<From, To, false>)
813 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
814
815 * include/std/version (__cpp_lib_bind_front): Add missing macro.
816
817 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
818
819 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
820 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
821 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
822 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
823
824 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
825 (variant::emplace): Change static_assert messages from "should be"
826 to "must be".
827 (hash<monostate>::operator()): Remove name of unused parameter.
828
829 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
830 expression.
831
832 * include/Makefile.am: Add new <bits/charconv.h> header.
833 * include/Makefile.in: Regenerate.
834 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
835 (to_string(long), to_string(unsigned long), to_string(long long))
836 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
837 * include/bits/charconv.h: New header.
838 (__detail::__to_chars_len): Move here from <charconv>.
839 (__detail::__to_chars_10_impl): New function extracted from
840 __detail::__to_chars_10.
841 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
842 (__to_chars_unsigned_type): New class template that reuses
843 __make_unsigned_selector_base::__select to pick a type.
844 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
845 (__detail::__to_chars_len): Move to new header.
846 (__detail::__to_chars_10): Add inline specifier. Move code doing the
847 output to __detail::__to_chars_10_impl and call that.
848 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
849 * testsuite/21_strings/basic_string/numeric_conversions/char/
850 to_string.cc: Fix reference in comment. Remove unused variable.
851 * testsuite/21_strings/basic_string/numeric_conversions/char/
852 to_string_int.cc: New test.
853
854 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
855
856 Fix ConstexprIterator requirements tests - No constexpr algorithms!
857 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
858 Replace copy with hand-rolled loop.
859 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
860 Ditto.
861
862 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
863
864 Test for C++20 p0858 - ConstexprIterator requirements.
865 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
866 New test.
867 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
868 New test.
869
870 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
871
872 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
873 project) standards.
874 * include/bits/c++config: Rename all macros of the form __PSTL* to
875 _PSTL*.
876 * include/std/algorithm: Likewise.
877 * include/std/execution: Likewise.
878 * include/std/numeric: Likewise.
879 * include/std/memory: Likewise.
880 * include/pstl/glue_memory_impl.h: Likewise.
881 * include/pstl/numeric_impl.h: Likewise.
882 * include/pstl/glue_memory_defs.h: Likewise.
883 * include/pstl/execution_defs.h: Likewise.
884 * include/pstl/utils.h: Likewise.
885 * include/pstl/algorithm_fwd.h: Likewise.
886 * include/pstl/unseq_backend_simd.h: Likewise.
887 * include/pstl/glue_execution_defs.h: Likewise.
888 * include/pstl/algorithm_impl.h: Likewise.
889 * include/pstl/parallel_impl.h: Likewise.
890 * include/pstl/memory_impl.h: Likewise.
891 * include/pstl/glue_numeric_defs.h: Likewise.
892 * include/pstl/parallel_backend_utils.h: Likewise.
893 * include/pstl/glue_algorithm_defs.h: Likewise.
894 * include/pstl/parallel_backend.h: Likewise.
895 * include/pstl/glue_numeric_impl.h: Likewise.
896 * include/pstl/parallel_backend_tbb.h: Likewise.
897 * include/pstl/numeric_fwd.h: Likewise.
898 * include/pstl/glue_algorithm_impl.h: Likewise.
899 * include/pstl/execution_impl.h: Likewise.
900 * include/pstl/pstl_config.h: Likewise.
901 * testsuite/util/pstl/pstl_test_config.h: Likewise.
902 * testsuite/util/pstl/test_utils.h: Likewise.
903 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
904 Likewise.
905 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
906 Likewise.
907 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
908 Likewise.
909 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
910 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
911 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
912 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
913 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
914 Likewise.
915 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
916 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
917 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
918 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
919 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
920 Likewise.
921 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
922 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
923 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
924 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
925 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
926 Likewise.
927 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
928 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
929 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
930 Likewise.
931 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
932 Likewise.
933 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
934 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
935 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
936 Likewise.
937 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
938 Likewise.
939 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
940 Likewise.
941 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
942 Likewise.
943 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
944 Likewise.
945 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
946 Likewise.
947 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
948 Likewise.
949 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
950 Likewise.
951 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
952 Likewise.
953 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
954 Likewise.
955 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
956 Likewise.
957 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
958
959 Rename header guards to be consistent with upstream project's
960 conventions.
961 * include/pstl/glue_memory_impl.h: Rename all macros of the form
962 _PSTL_(.*)_H to _PSTL_\U\1_H.
963 * include/pstl/numeric_impl.h: Likewise.
964 * include/pstl/glue_memory_defs.h: Likewise.
965 * include/pstl/execution_defs.h: Likewise.
966 * include/pstl/utils.h: Likewise.
967 * include/pstl/algorithm_fwd.h: Likewise.
968 * include/pstl/unseq_backend_simd.h: Likewise.
969 * include/pstl/glue_execution_defs.h: Likewise.
970 * include/pstl/algorithm_impl.h: Likewise.
971 * include/pstl/parallel_impl.h: Likewise.
972 * include/pstl/memory_impl.h: Likewise.
973 * include/pstl/glue_numeric_defs.h: Likewise.
974 * include/pstl/parallel_backend_utils.h: Likewise.
975 * include/pstl/glue_algorithm_defs.h: Likewise.
976 * include/pstl/parallel_backend.h: Likewise.
977 * include/pstl/glue_numeric_impl.h: Likewise.
978 * include/pstl/parallel_backend_tbb.h: Likewise.
979 * include/pstl/numeric_fwd.h: Likewise.
980 * include/pstl/glue_algorithm_impl.h: Likewise.
981 * include/pstl/execution_impl.h: Likewise.
982 * include/pstl/pstl_config.h: Likewise.
983 * testsuite/util/pstl/pstl_test_config.h: Likewise.
984
985 Synchronize libstdc++ parallel algorithms with upstream
986 project.
987 * include/pstl/algorithm_fwd.h: Synchronize with
988 upstream PSTL project.
989 * include/pstl/algorithm_impl.h: Likewise.
990 * include/pstl/execution_defs.h: Likewise.
991 * include/pstl/execution_impl.h: Likewise.
992 * include/pstl/glue_algorithm_impl.h: Likewise.
993 * include/pstl/glue_execution_defs.h: Likewise.
994 * include/pstl/numeric_fwd.h: Likewise.
995 * include/pstl/numeric_impl.h: Likewise.
996 * include/pstl/parallel_backend.h: Likewise.
997 * include/pstl/pstl_config.h: Likewise.
998 * include/pstl/unseq_backend_simd.h: Likewise.
999 * include/pstl/parallel_backend_serial.h: New file.
1000 * include/Makefile.am (pstl_headers): Add
1001 parallel_backend_serial.h.
1002 * include/Makefile.in: Regenerate.
1003
1004 Clean up non-conforming names
1005 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1006 Uglfiy copy_range1 and copy_range2
1007 (__pattern_walk2_n): Rename local n to __n
1008 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1009 Rename parameter _T to _Tp.
1010
1011 Integrate non-TBB serial backend support
1012 * include/bits/c++config: Adjust TBB detection logic to select serial
1013 PSTL backend if no TBB present.
1014 * testsuite/utils/pstl/test_utils.h: Remove check for
1015 _PSTL_USE_PAR_POLICIES
1016
1017 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1018
1019 * testsuite/24_iterators/container_access.cc: Move dg-options before
1020 dg-do directive so the target check uses the -std option.
1021
1022 PR libstdc++/90770
1023 * configure: Regenerate.
1024 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1025 * src/Makefile.in: Regenerate.
1026
1027 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1028
1029 * include/std/array: Do not include <stdexcept>.
1030 * include/std/optional: Include <exception> and
1031 <bits/exception_defines.h> instead of <stdexcept>.
1032 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1033 for std::isalnum.
1034 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1035 std::allocator.
1036 * testsuite/23_containers/map/erasure.cc: Include <string>.
1037 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1038
1039 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1040 dg-prune-output for different C++98 diagnostic.
1041 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1042 Likewise.
1043 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1044 Likewise.
1045 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1046 Likewise.
1047 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1048 Likewise.
1049 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1050 Likewise.
1051 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1052 Likewise.
1053 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1054 Likewise.
1055 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1056 Likewise.
1057 * testsuite/23_containers/vector/requirements/dr438/
1058 constructor_1_neg.cc: Likewise.
1059 * testsuite/23_containers/vector/requirements/dr438/
1060 constructor_2_neg.cc: Likewise.
1061 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1062 Likewise.
1063 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1064
1065 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1066 Do not test allocator rebinding extension for C++2a.
1067 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1068 dg-do directive for C++17 and C++2a.
1069
1070 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1071 1_c++0x.cc: Remove redundant test.
1072 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1073 2.cc: Use target selector instead of preprocessor condition.
1074 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1075 3.cc: Do not run test for C++2a.
1076 * testsuite/23_containers/forward_list/requirements/
1077 explicit_instantiation/3.cc: Likewise.
1078 * testsuite/23_containers/forward_list/requirements/
1079 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1080 for C++2a.
1081 * testsuite/23_containers/list/requirements/explicit_instantiation/
1082 1_c++0x.cc: Remove redundant test.
1083 * testsuite/23_containers/list/requirements/explicit_instantiation/
1084 2.cc: Use target selector instead of preprocessor condition.
1085 * testsuite/23_containers/list/requirements/explicit_instantiation/
1086 3.cc: Do not run test for C++2a.
1087 * testsuite/23_containers/list/requirements/explicit_instantiation/
1088 5.cc: Do not test allocator rebinding extension for C++2a.
1089 * testsuite/23_containers/map/requirements/explicit_instantiation/
1090 1_c++0x.cc: Remove redundant test.
1091 * testsuite/23_containers/map/requirements/explicit_instantiation/
1092 2.cc: Adjust comment.
1093 * testsuite/23_containers/map/requirements/explicit_instantiation/
1094 3.cc: Do not run test for C++2a.
1095 * testsuite/23_containers/map/requirements/explicit_instantiation/
1096 5.cc: Do not test allocator rebinding extension for C++2a.
1097 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1098 1_c++0x.cc: Remove redundant test.
1099 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1100 3.cc: Do not run test for C++2a.
1101 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1102 5.cc: Do not test allocator rebinding extension for C++2a.
1103 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1104 3.cc: Do not run test for C++2a.
1105 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1106 5.cc: Do not test allocator rebinding extension for C++2a.
1107 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1108 Do not run test for C++2a.
1109 * testsuite/23_containers/set/requirements/explicit_instantiation/
1110 1_c++0x.cc: Remove redundant test.
1111 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1112 Do not test allocator rebinding extension for C++2a.
1113 * testsuite/23_containers/unordered_map/requirements/
1114 explicit_instantiation/3.cc: Likewise.
1115 * testsuite/23_containers/unordered_map/requirements/
1116 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1117 for C++2a.
1118 * testsuite/23_containers/unordered_multimap/requirements/
1119 explicit_instantiation/3.cc: Do not run test for C++2a.
1120 * testsuite/23_containers/unordered_multimap/requirements/
1121 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1122 for C++2a.
1123 * testsuite/23_containers/unordered_multiset/requirements/
1124 explicit_instantiation/3.cc: Do not run test for C++2a.
1125 * testsuite/23_containers/unordered_multiset/requirements/
1126 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1127 for C++2a.
1128 * testsuite/23_containers/unordered_set/requirements/
1129 explicit_instantiation/3.cc: Do not run test for C++2a.
1130 * testsuite/23_containers/unordered_set/requirements/
1131 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1132 for C++2a.
1133 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1134 2.cc: Remove redundant test.
1135 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1136 3.cc: Do not run test for C++2a.
1137 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1138 3.cc: Likewise.
1139
1140 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1141 (is_abstract, is_aggregate): Remove static_assert.
1142 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1143 from builtin only.
1144 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1145 missing -std=gnu++17 option.
1146 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1147 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1148 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1149 from builtin only.
1150
1151 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1152 * testsuite/18_support/set_unexpected.cc: Likewise.
1153 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1154 void.
1155 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1156 function to be valid in C++11.
1157 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1158 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1159 include Library Fundamentals or Networking headers in C++11 mode.
1160 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1161
1162 * include/std/tuple (_TC): Replace with _TupleConstraints.
1163 (_TupleConstraints): New helper for SFINAE constraints, with more
1164 expressive member functions to reduce duplication when used.
1165 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1166 (tuple::_TCC): Replace dummy type parameter with bool non-type
1167 parameter that can be used to check the pack size.
1168 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1169 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1170 checking constraints in constructors.
1171 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1172 New SFINAE helpers.
1173 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1174 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1175 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1176 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1177 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1178 constraints in constructors.
1179 (tuple::__is_alloc_arg()): New SFINAE helpers.
1180 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1181 constraints.
1182 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1183 * testsuite/20_util/tuple/cons/90700.cc: New test.
1184 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1185 to meet new constraint on allocator-extended default constructor.
1186
1187 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1188
1189 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1190 * include/bits/stl_multimap.h (multimap): Likewise.
1191
1192 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1193
1194 Rename variables and cleanup comments.
1195 * include/bits/hashtable_policy.h
1196 * include/bits/hashtable.h
1197
1198 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1199
1200 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1201 Fix bgcolor for P0340R3.
1202 * doc/html/*: Regenerate.
1203
1204 PR libstdc++/90686
1205 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1206 <experimental/memory_resource>.
1207 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1208 P0339R6, P0340R3, P1164R1 and P1357R1.
1209 * doc/html/*: Regenerate.
1210
1211 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1212 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1213 allocator::value_type assertion for C++2a.
1214 * include/bits/hashtable.h: Likewise.
1215 * include/bits/stl_deque.h: Likewise.
1216 * include/bits/stl_list.h: Likewise.
1217 * include/bits/stl_map.h: Likewise.
1218 * include/bits/stl_multimap.h: Likewise.
1219 * include/bits/stl_multiset.h: Likewise.
1220 * include/bits/stl_set.h: Likewise.
1221 * include/bits/stl_vector.h: Likewise.
1222 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1223 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1224 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1225 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1226 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1227 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1228 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1229 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1230 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1231 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1232 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1233 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1234
1235 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1236
1237 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1238
1239 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1240
1241 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1242 constructors.
1243 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1244 function.
1245 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1246
1247 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1248
1249 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1250
1251 PR libstdc++/90682
1252 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1253 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1254 * libsupc++/eh_term_handler.h: New header defining
1255 _GLIBCXX_DEFAULT_TERM_HANDLER.
1256 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1257 (set_terminate): Restore default handler when argument is null.
1258 (set_unexpected): Likewise.
1259 * testsuite/18_support/set_terminate.cc: New test.
1260 * testsuite/18_support/set_unexpected.cc: New test.
1261
1262 * include/backward/hashtable.h (size_t, ptrdiff_t)
1263 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1264 (distance, vector, pair, __iterator_category): Remove
1265 using-declarations that add these names to namespace __gnu_cxx.
1266 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1267 * include/ext/debug_allocator.h (size_t): Likewise.
1268 * include/ext/functional (size_t, unary_function, binary_function)
1269 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1270 Likewise.
1271 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1272 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1273 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1274 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1275 * include/ext/numeric (iota): Fix outdated comment.
1276 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1277 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1278 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1279 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1280 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1281 Likewise.
1282 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1283 (allocator, __true_type, __false_type): Likewise.
1284
1285 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1286
1287 PR libstdc++/71579
1288 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1289 New helpers for checking preconditions in traits.
1290 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1291 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1292 (is_destructible, is_nothrow_destructible, is_constructible)
1293 (is_default_constructible, is_copy_constructible)
1294 (is_move_constructible, is_nothrow_default_constructible)
1295 (is_nothrow_constructible, is_nothrow_copy_constructible)
1296 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1297 (is_nothrow_assignable, is_nothrow_copy_assignable)
1298 (is_nothrow_move_assignable, is_trivially_constructible)
1299 (is_trivially_copy_constructible, is_trivially_move_constructible)
1300 is_trivially_assignable, is_trivially_copy_assignable)
1301 (is_trivially_move_assignable, is_trivially_destructible)
1302 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1303 (is_invocable_r, is_nothrow_invocable)
1304 (has_unique_object_representations, is_aggregate): Add static_asserts
1305 to make sure that type traits are not misused with incomplete types.
1306 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1307 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1308 base characteristics without assertions that can be reused in other
1309 traits.
1310 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1311 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1312 test.
1313 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1314 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1315 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1316 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1317 * testsuite/20_util/is_function/value.cc: Likewise.
1318 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1319 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1320 test.
1321 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1322 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1323 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1324 * testsuite/20_util/is_union/value.cc: Likewise.
1325 * testsuite/20_util/is_void/value.cc: Likewise.
1326 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1327
1328 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1329
1330 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1331 Add new private member function.
1332 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1333 (random_device::_M_init_pretr1(const string&)): Call new private
1334 member with string data.
1335 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1336 Define.
1337 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1338 test using COW strings.
1339 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1340 a value from the device.
1341 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1342 Fix typo in token string.
1343
1344 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1345
1346 LWG2788 basic_string spurious use of a default constructible allocator
1347 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1348 (basic_string::_M_replace_dispatch): Construct temporary string with
1349 the current allocator.
1350 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1351 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1352
1353 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1354
1355 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1356 exception classes.
1357 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1358 section about new/delete overloads. Improve section on verbose
1359 terminate handler.
1360 * doc/html/*: Regenerate.
1361
1362 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1363 P0811R3. Change status of P1353R0.
1364 * doc/html/*: Regenerate.
1365
1366 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1367 documentation of implementation-defined types for [thread.req.native].
1368 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1369 implementation-defined strings for [variant.bad.access]. Fix typo in
1370 documentation of implementation-defined support for [fs.conform.9945].
1371 * doc/html/*: Regenerate.
1372
1373 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1374
1375 PR libstdc++/85494
1376 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1377 that fails on mingw-w64.
1378
1379 PR libstdc++/88881
1380 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1381 (status(const path&, error_code&)): Use parent_path() to remove
1382 trailing slash.
1383 (symlink_status(const path&, error_code&)): Duplicate workaround for
1384 bug in _wstat for paths with trailing slash.
1385 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1386 with trailing slash.
1387 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1388 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1389
1390 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1391 once instead of building it iteratively.
1392
1393 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1394
1395 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1396 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1397 the assembler supports rdseed.
1398 * config.h.in: Regenerate.
1399 * configure: Regenerate.
1400 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1401 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1402 * doc/html/*: Regenerate.
1403 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1404 * include/bits/random.h (random_device::random_device()): Always call
1405 _M_init rather than _M_init_pretr1.
1406 (random_device::random_device(const string&)): Likewise.
1407 (random_device::operator()()): Always call _M_getval().
1408 (random_device::_M_file): Replace first member of union with an
1409 anonymous struct, with _M_file as its first member.
1410 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1411 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1412 (USE_MT19937): Define if none of the above are defined.
1413 (USE_POSIX_FILE_IO): Define.
1414 (_M_strtoul): Remove.
1415 [USE_RDSEED] (__x86_rdseed): Define new function.
1416 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1417 (random_device::_M_init(const string&)): Initialize new union members.
1418 Add support for "rdseed" and "rand_s" tokens. Decide what the
1419 "default" token does according to which USE_* macros are defined.
1420 [USE_POSIX_FILE_IO]: Store a file descriptor.
1421 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1422 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1423 code from _M_strtoul.
1424 [!USE_MT19937]: Call _M_init, transforming the old default token or
1425 numeric tokens to "default".
1426 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1427 (random_device::_M_getval()): Use new union members to obtain a
1428 random number from the stored function pointer or file descriptor.
1429 [USE_MT19937]: Obtain a value from the mt19937 engine.
1430 (random_device::_M_getval_pretr1()): Call _M_getval().
1431 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1432 instead of fileno.
1433 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1434 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1435
1436 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1437
1438 PR libstdc++/90634
1439 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1440 _M_split_cmpts() for a path with multiple components.
1441 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1442 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1443 components and reserve space in vector. Return early when there is
1444 only one component.
1445 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1446 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1447
1448 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1449 form of std::equals for C++11 compatibility.
1450
1451 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1452
1453 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1454 C++ standard at ansi.org.
1455
1456 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1457
1458 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1459 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1460 to "run".
1461
1462 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1463 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1464
1465 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1466
1467 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1468 tests to ...
1469 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1470 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1471 "compile" test to "run".
1472
1473 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1474 * doc/html/*: Regenerate.
1475 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1476 rvalue aliasing constructor.
1477 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1478 (reinterpret_pointer_cast): Add overloads taking rvalues.
1479 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1480 Add rvalue aliasing constructor.
1481 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1482 "run" and check return values as well as types.
1483 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1484 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1485 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1486 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1487 values.
1488
1489 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1490 * doc/xml/manual/intro.xml: Likewise.
1491 * include/std/future (__create_task_state): Add default arguments
1492 to make providing an allocator optional.
1493 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1494 instead of delegating to another constructor.
1495 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1496 define allocator-extended constructors for C++17 and later.
1497 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1498 C++11 and C++14.
1499 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1500 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1501 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1502
1503 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1504
1505 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1506 Don't run the libstdc++/83237 part on simulator targets.
1507
1508 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1509
1510 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1511 P0040R3.
1512 * doc/html/*: Regenerate.
1513
1514 * include/experimental/any (__any_caster): Use RTTI if comparing
1515 addresses fails, to support non-unique addresses in shared libraries.
1516 * include/std/any (__any_caster): Likewise.
1517
1518 PR libstdc++/90220
1519 * include/experimental/any (__any_caster): Constrain to only be
1520 callable for object types. Use remove_cv_t instead of decay_t.
1521 If the type decays or isn't copy constructible, compare the manager
1522 function to a dummy specialization.
1523 (__any_caster): Add overload constrained for non-object types.
1524 (any::_Manager_internal<_Op>): Add dummy specialization.
1525 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1526 and array types.
1527
1528 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1529
1530 PR libstdc++/90557
1531 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1532 reversed arguments to uninitialized_copy_n.
1533 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1534 is unchanged by copy assignment.
1535 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1536 compare path components.
1537
1538 PR libstdc++/77691
1539 * include/experimental/memory_resource: Add system header pragma and
1540 do not define anything unless compiled as C++14 or later.
1541 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1542 (__resource_adaptor_imp::do_allocate): If the requested alignment
1543 is a fundamental alignment then either allocate directly from _M_alloc
1544 or call the new _M_allocate function.
1545 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1546 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1547 of the allocator rebound to a POD type with the specified alignment.
1548 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1549 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1550 Adjust expected allocation sizes.
1551 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1552 xfail for Solaris x86.
1553
1554 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1555
1556 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1557 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1558 Use std::__remove_cvref_t when building with GCC.
1559
1560 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1561
1562 PR libstdc++/90252
1563 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1564 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1565 Use check_v3_target_prop_cached to cache the result of the test.
1566
1567 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1568
1569 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1570
1571 PR libstdc++/90252
1572 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1573 Changed v3_target_compile check from preprocess to executable.
1574 Added "-ltbb" to v3_target_compile flags.
1575
1576 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1577
1578 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1579 Add check for Thread Building Blocks 2018 or later.
1580
1581 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1582
1583 * testsuite/experimental/names.cc: Only include Networking TS headers
1584 on targets with the necessary Gthreads support.
1585
1586 2019-05-20 Marek Polacek <polacek@redhat.com>
1587
1588 CWG 2094 - volatile scalars are trivially copyable.
1589 PR c++/85679
1590 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1591 result for volatile int.
1592
1593 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1594
1595 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1596 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1597 conditionally.
1598
1599 PR c++/90532 Ensure __is_constructible(T[]) is false
1600 * include/std/type_traits (__do_is_default_constructible_impl)
1601 (__is_default_constructible_atom, __is_default_constructible_safe):
1602 Remove.
1603 (is_default_constructible): Use is_constructible.
1604 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1605 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1606 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1607 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1608 Likewise.
1609
1610 2019-05-20 Pádraig Brady <pbrady@fb.com>
1611
1612 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1613 to the deallocator with -fsized-deallocation.
1614
1615 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1616
1617 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1618 test by passing correct alignment to deallocate function.
1619
1620 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1621
1622 PR libstdc++/90520
1623 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1624 Raise exception if unique_ptr tuple member has unknown structure.
1625 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1626 Adjust worker to support new __uniq_ptr_data base class. Do not
1627 assume field called _M_head_impl is the first tuple element.
1628
1629 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1630
1631 * include/bits/stl_deque.h
1632 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1633 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1634 (_Deque_base::_Deque_impl_data): New.
1635 (_Deque_base::_Deque_impl): Inherit latter.
1636 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1637 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1638 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1639 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1640 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1641 (deque<>::deque()): Default.
1642 (deque<>::deque(deque&&)): Default.
1643 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1644 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1645 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1646 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1647 _M_range_initialize.
1648 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1649 (deque<>::resize(size_type, const value_type&)): Share a single
1650 implementation.
1651 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1652 _M_range_insert_aux.
1653 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1654 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1655 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1656 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1657
1658 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1659
1660 PR libstdc++/90246
1661 * include/std/variant (holds_alternative, get, get_if): Improve
1662 static assertion messages.
1663 (bad_variant_access::bad_variant_access()): Change default message.
1664 (__throw_bad_variant_access(bool)): New overload.
1665 (get): Use new overload.
1666 (visit, visit<R>): Improve exception message.
1667
1668 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1669 targets. Add more cases from P0608R3.
1670 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1671
1672 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1673 * include/experimental/type_traits (is_detected_exact)
1674 (is_detected_exact_v): Likewise.
1675 * include/pstl/execution_defs.h (is_execution_policy)
1676 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1677 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1678 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1679 * testsuite/experimental/names.cc: New test.
1680
1681 PR libstdc++/85965
1682 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1683 assertions from the destructor.
1684 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1685 Move static_assert for hash function to here.
1686 (_Hash_table_base::_M_equals): Move static_assert for equality
1687 predicate to here.
1688 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1689 Remove.
1690 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1691 the value directly instead of calling _S_value.
1692 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1693 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1694 _S_key(_Const_Link_type).
1695 * testsuite/23_containers/set/85965.cc: Check construction,
1696 destruction, assignment and size() do not trigger the assertions.
1697 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1698 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1699 expected errors.
1700 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1701 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1702 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1703 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1704 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1705 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1706 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1707
1708 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1709 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1710 in C++11.
1711
1712 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1713 P1165R1 entries.
1714 * doc/html/*: Regenerate.
1715 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1716 of decay_t (P0777R1).
1717
1718 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1719
1720 Move from state of allocators (LWG2593)
1721 * include/bits/stl_deque.h
1722 (_Deque_base(_Deque_base&&, false_type)): Remove.
1723 (_Deque_base(_Deque_base&&, true_type)): Remove.
1724 (_Deque_base(_Deque_base&&)): Adapt.
1725 (_Deque_base::_M_move_impl()): Remove.
1726 * testsuite/util/testsuite_allocator.h
1727 (propagating_allocator(propagating_allocator&&)): Preserve move from
1728 state.
1729 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1730 Adapt.
1731 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1732 Adapt.
1733 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1734 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1735 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1736 Adapt.
1737 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1738 Adapt.
1739 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1740 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1741 (test02): Adapt.
1742 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1743 (test02): Adapt.
1744 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1745 (test02): Adapt.
1746 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1747 (test02): Adapt.
1748 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1749 Adapt.
1750 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1751 Adapt.
1752 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1753 (test02): Adapt.
1754 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1755 (test02): Adapt.
1756
1757 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1758
1759 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1760 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1761
1762 * include/std/variant (__overload_set): Remove.
1763 (_Arr): New helper.
1764 (_Build_FUN): New class template to define a single FUN overload,
1765 with specializations to prevent unwanted conversions, as per P0608R3.
1766 (_Build_FUNs): New class template to build an overload set of FUN.
1767 (_FUN_type): New alias template to perform overload resolution.
1768 (__accepted_type): Use integer_constant base for failure case. Use
1769 _FUN_type for successful case.
1770 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1771 (variant::variant(_Tp&&)): Likewise.
1772 (variant::operator=(_Tp&&)): Likewise.
1773
1774 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1775 Replace raw visitation with a runtime check for the valueless state
1776 and a non-raw visitor.
1777 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1778 (variant::index()): Remove branch.
1779 (variant::swap(variant&)): Use valueless_by_exception() instead of
1780 comparing the index to variant_npos, and add likelihood attribute.
1781
1782 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1783 (_Hashtable_base::_Equal_hash_code): Define new class template.
1784 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1785 _Equal_helper.
1786
1787 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1788 Replace with _M_get non-static member function.
1789 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1790 member function.
1791 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1792 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1793
1794 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1795 _S_get accessors for members in EBO helpers.
1796 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1797 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1798 overloads.
1799 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1800 helpers.
1801 (_Hashtable_base::_M_eq()): Remove non-const overload.
1802
1803 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1804
1805 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1806
1807 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1808
1809 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1810 Fix return value.
1811
1812 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1813
1814 * config/os/solaris/solaris2.10: Move to ...
1815 * config/os/solaris: ... this.
1816 * configure.host (os_include_dir): Adapt.
1817 (abi_baseline_pair): Remove Solaris 10 handling.
1818 * config/abi/post/i386-solaris2.10: Remove.
1819 * config/abi/post/sparc-solaris2.10: Remove.
1820 * config/abi/post/i386-solaris2.11: Rename to ...
1821 * config/abi/post/i386-solaris: ... this.
1822 * config/abi/post/sparc-solaris2.11: Rename to ...
1823 * config/abi/post/sparc-solaris: ... this.
1824
1825 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1826 workaround.
1827
1828 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1829 xfail.
1830
1831 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1832
1833 * include/std/variant (__visit_with_index): Remove typedef.
1834 (__deduce_visit_result): New tag type.
1835 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1836 visitation of possibly-valueless variants, forwarding to __do_visit
1837 with the relevant tag type.
1838 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1839 and make lambda return void.
1840 (__variant_construct): Likewise.
1841 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1842 __raw_idx_visit and make lambda return void.
1843 (_Multi_array::__untag_result): Add metafunction to check the function
1844 pointer type for a tag type that dictates the kind of visitation.
1845 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1846 Use decltype(auto) instead of tagged function pointer type.
1847 (__gen_vtable_impl): Remove bool non-type parameter and unused
1848 _Variant_tuple parameter.
1849 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1850 (__gen_vtable_impl::__do_visit_invoke): Remove.
1851 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1852 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1853 for the visit<R> case, rather than dispatching to separate functions.
1854 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1855 lambda return void.
1856 (variant::swap): Likewise.
1857 (__do_visit): Replace two non-type template parameters with a single
1858 type parameter, so that the caller must specify the visitor's return
1859 type (or one of the tag types).
1860 (visit): Deduce a return type from the visitor and use the
1861 __deduce_visit_result tag to enforce that all overloads return the
1862 same type.
1863 (visit<R>): Call __do_visit<R> with explicit result type.
1864 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1865 lambda return void.
1866
1867 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1868
1869 nonesuch is insufficiently useless (lwg2996)
1870 * include/std/type_traits (struct __nonesuch): Added private base
1871 class to make __nonesuch not an aggregate and removed deleted default
1872 constructor.
1873 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1874 (operator=(const pair&)): Use __nonesuch instead of
1875 __nonesuch_no_braces.
1876 (operator=(pair&&)): Likewise
1877 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1878 of __nonesuch_no_braces.
1879 (operator=(tuple&&)): Likewise
1880 * include/experimental/type_traits (struct nonesuch): Added private
1881 base class to make nonesuch not an aggregate and removed deleted
1882 default constructor.
1883 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1884 * testsuite/experimental/type_traits/nonesuch.cc: New.
1885
1886 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1887
1888 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1889 (_Function_handler): Remove partial specializations for void return
1890 types and pointers to member.
1891 (_Function_handler::_M_manager): Adapt to removal of
1892 _Simple_type_wrapper.
1893 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1894 * include/std/functional (_Bind_result::__enable_if_void)
1895 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1896 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1897 return types.
1898 * include/std/future (__future_base::_Task_state::_M_run)
1899 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1900 change return type of lambda expressions.
1901
1902 * include/bits/invoke.h (__invoke_r): Define new function implementing
1903 the INVOKE<R> pseudo-function.
1904 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1905 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1906
1907 * include/std/type_traits (__is_nt_convertible_helper): Define it
1908 unconditionally, not only for C++20.
1909 (__is_nothrow_convertible): Define internal trait for use in C++11.
1910 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1911 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1912 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1913 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1914 that has nothrow explicit conversion but potentially-throwing implicit
1915 conversion.
1916 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1917 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1918 function to only consider implicit conversions.
1919 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1920
1921 * include/std/iterator: Include <iosfwd> instead of <istream> and
1922 <ostream>.
1923
1924 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1925 Remove unused, non-standard function.
1926
1927 * include/bits/regex.h (match_results::max_size()): Adjust return
1928 value to account for prefix/suffix/unmatched subs.
1929 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1930 reset the contained sub matches.
1931 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1932 function to set result state following a failed match.
1933 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1934 sub_match states after _M_resize. Use _M_establish_failed_match.
1935
1936 PR libstdc++/69724
1937 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1938 Replace single _Callable parameter with variadic _Args pack, to
1939 forward them directly to the tuple of decayed copies.
1940 * testsuite/30_threads/thread/cons/69724.cc: New test.
1941
1942 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1943
1944 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1945 * include/bits/basic_string.h: (operator=(const basic_string&):
1946 Move allocator decision to assign.
1947 (assign(const basic_string&)): Move allocator decision here.
1948 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1949 Add tests.
1950 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1951 Add tests.
1952
1953 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1954
1955 * testsuite/util/testsuite_allocator.h (memory_resource)
1956 (default_resource_mgr): Fix indentation.
1957
1958 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1959 Use operator-> to access raw pointer member.
1960 * testsuite/23_containers/vector/59829.cc: Likewise.
1961 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1962 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1963 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1964 for tests.
1965 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1966 its constructors and equality operators. Change converting
1967 constructors to use operator-> to access private member of the other
1968 pointer type.
1969 (PointerBase_void::operator->()): Add, for access to private member.
1970 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1971 (operator==(PointerBase, PointerBase)): Remove.
1972 (operator!=(PointerBase, PointerBase)): Remove.
1973
1974 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1975 not assume field called _M_head_impl is the first tuple element.
1976 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1977 implementation more accurate.
1978 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1979 empty pointer type and non-empty deleter.
1980
1981 LWG 2899 - Make is_move_constructible correct for unique_ptr
1982 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1983 move assignment operator.
1984 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1985 (__uniq_ptr_data): New class template with conditionally deleted
1986 special members.
1987 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1988 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1989 constructor and move assignment operator as defaulted.
1990 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1991 __uniq_ptr_impl::release().
1992 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1993 to __uniq_ptr_impl::reset(pointer).
1994 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1995 Check for new __uniq_ptr_data type.
1996 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1997
1998 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1999
2000 PR libstdc++/90454.cc path construction from void*
2001 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2002 pointers to void are rejected as well as void.
2003 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2004 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2005 pointers to void.
2006 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2007
2008 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2009 <remark> elements. Fix formatting of bibliography references.
2010
2011 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2012
2013 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2014
2015 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2016
2017 Remove Profile Mode, deprecated since 7.1.0
2018 * doc/Makefile.am: Remove XML file for profile mode docs.
2019 * doc/Makefile.in: Regenerate.
2020 * doc/xml/authors.xml: Remove authors of profile mode docs.
2021 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2022 mode.
2023 * doc/xml/manual/debug.xml: Likewise.
2024 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2025 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2026 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2027 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2028 directive.
2029 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2030 macro.
2031 * doc/html/*: Regenerate.
2032 * include/Makefile.am: Remove profile mode headers.
2033 * include/Makefile.in: Regenerate.
2034 * include/bits/c++config (std::__profile): Remove namespace.
2035 [_GLIBCXX_PROFILE]: Remove checks for macro.
2036 * include/profile/array: Remove.
2037 * include/profile/base.h: Remove.
2038 * include/profile/bitset: Remove.
2039 * include/profile/deque: Remove.
2040 * include/profile/forward_list: Remove.
2041 * include/profile/impl/profiler.h: Remove.
2042 * include/profile/impl/profiler_algos.h: Remove.
2043 * include/profile/impl/profiler_container_size.h: Remove.
2044 * include/profile/impl/profiler_hash_func.h: Remove.
2045 * include/profile/impl/profiler_hashtable_size.h: Remove.
2046 * include/profile/impl/profiler_list_to_slist.h: Remove.
2047 * include/profile/impl/profiler_list_to_vector.h: Remove.
2048 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2049 * include/profile/impl/profiler_node.h: Remove.
2050 * include/profile/impl/profiler_state.h: Remove.
2051 * include/profile/impl/profiler_trace.h: Remove.
2052 * include/profile/impl/profiler_vector_size.h: Remove.
2053 * include/profile/impl/profiler_vector_to_list.h: Remove.
2054 * include/profile/iterator_tracker.h: Remove.
2055 * include/profile/list: Remove.
2056 * include/profile/map: Remove.
2057 * include/profile/map.h: Remove.
2058 * include/profile/multimap.h: Remove.
2059 * include/profile/multiset.h: Remove.
2060 * include/profile/ordered_base.h: Remove.
2061 * include/profile/set: Remove.
2062 * include/profile/set.h: Remove.
2063 * include/profile/unordered_base.h: Remove.
2064 * include/profile/unordered_map: Remove.
2065 * include/profile/unordered_set: Remove.
2066 * include/profile/vector: Remove.
2067 * scripts/run_doxygen: Do not process profile mode headers.
2068 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2069 profile mode type.
2070 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2071 Remove dg-skip-if for profile mode.
2072 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2073 preprocessor check for profile mode.
2074 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2075 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2076 for profile mode.
2077 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2078 Likewise.
2079 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2080 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2081 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2082 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2083 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2084 Likewise.
2085 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2086 Likewise.
2087 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2088 Likewise.
2089 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2090 Likewise.
2091 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2092 preprocessor check for profile mode.
2093 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2094 Likewise.
2095 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2096 Remove dg-skip-if for profile mode.
2097 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2098 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2099 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2100 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2101 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2102 * testsuite/Makefile.am: Remove profile_flags variable and
2103 * testsuite/Makefile.am: Remove profile_flags variable and
2104 check-profile target.
2105 * testsuite/Makefile.in: Regenerate.
2106 * testsuite/ext/profile/all.cc: Remove.
2107 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2108 * testsuite/ext/profile/profiler_algos.cc: Remove.
2109 * testsuite/ext/profile/replace_new.cc: Remove.
2110 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2111 preprocessor check for profile mode.
2112 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2113 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2114 (check_v3_target_normal_mode): Do not check for profile mode macro.
2115 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2116 profile mode.
2117 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2118 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2119 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2120 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2121 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2122 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2123 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2124 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2125 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2126 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2127
2128 Remove array_allocator extension, deprecated since 4.9.0
2129 * doc/xml/manual/allocator.xml: Remove documentation for
2130 array_allocator.
2131 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2132 * doc/xml/manual/using.xml: Remove header from documentation.
2133 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2134 * include/Makefile.in: Regenerate.
2135 * include/ext/array_allocator.h: Remove.
2136 * include/precompiled/extc++.h: Do not include removed header.
2137 * testsuite/ext/array_allocator/1.cc: Remove.
2138 * testsuite/ext/array_allocator/2.cc: Remove.
2139 * testsuite/ext/array_allocator/26875.cc: Remove.
2140 * testsuite/ext/array_allocator/3.cc: Remove.
2141 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2142 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2143 * testsuite/ext/array_allocator/check_new.cc: Remove.
2144 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2145 * testsuite/ext/headers.cc: Do not include removed header.
2146
2147 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2148
2149 * include/bits/stl_bvector.h
2150 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2151 Make hidden friend.
2152 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2153 Likewise.
2154 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2155 Likewise.
2156 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2157 Likewise.
2158 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2159 Likewise.
2160 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2161 Likewise.
2162 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2163 Likewise.
2164 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2165 copy elision.
2166 (_Bit_iterator::operator-(difference_type)): Likewise.
2167 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2168 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2169 NRVO copy elision.
2170 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2171 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2172
2173 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2174
2175 PR libstdc++/81266
2176 * testsuite/util/thread/all.h: Do not use remove_pointer for
2177 std::thread::native_handle_type.
2178
2179 PR libstdc++/90397
2180 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2181 (_Variant_storage<true, Types...>::_M_reset()))
2182 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2183 (__get_storage): Likewise.
2184 (variant): Add noexcept to friend declarations for __get and
2185 __get_storage.
2186
2187 PR libstdc++/90388
2188 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2189 Use _Require for constraints.
2190 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2191 per the standard.
2192 (__uniq_ptr_hash): New base class with conditionally-disabled call
2193 operator.
2194 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2195 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2196 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2197
2198 * include/bits/shared_ptr.h: Improve docs.
2199 * include/bits/shared_ptr_base.h: Likewise.
2200 * include/bits/stl_uninitialized.h: Likewise.
2201 * include/bits/unique_ptr.h: Likewise.
2202 * libsupc++/new: Likewise.
2203
2204 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2205
2206 * include/bits/stl_deque.h
2207 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2208 Make hidden friend.
2209 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2210 Likewise.
2211 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2212 Likewise.
2213 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2214 Likewise.
2215 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2216 Likewise.
2217 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2218 Likewise.
2219 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2220 copy elision.
2221 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2222
2223 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2224
2225 PR libstdc++/90277
2226 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2227 (test01): Reserve for number of insertions to avoid rehash during test.
2228 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2229 (test01): Likewise.
2230 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2231 (test01): Likewise.
2232 (test02): Likewise.
2233 (test03): Likewise.
2234
2235 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2236
2237 * include/experimental/bits/fs_path.h: Improve docs.
2238 * include/experimental/bits/net.h: Fix wrong header name in comment.
2239 Do not document implementation details.
2240 * include/experimental/netfwd: Fix doxygen grouping.
2241
2242 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2243
2244 * include/bits/stl_pair.h: Improve docs.
2245 * include/std/tuple: Likewise.
2246
2247 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2248 inline namespace.
2249 * include/std/chrono: Improve docs.
2250 * include/std/ratio: Do not document implementation details.
2251 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2252 line numbers.
2253 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2254
2255 PR libstdc++/89102
2256 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2257 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2258 (__duration_common_type): New helper.
2259 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2260 __duration_common_type.
2261 (__timepoint_common_type_wrapper): Replace with ...
2262 (__timepoint_common_type): New helper.
2263 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2264 Use __time_point_common_type.
2265 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2266 (__common_type_impl): If either argument is transformed by decay,
2267 use the common_type of the decayed types.
2268 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2269 decayed, use __do_common_type_impl to get the common_type.
2270 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2271 (__do_member_type_wrapper, __member_type_wrapper)
2272 (__expanded_common_type_wrapper): Remove.
2273 (__common_type_pack, __common_type_fold): New helpers.
2274 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2275 __member_type_wrapper and __expanded_common_type_wrapper.
2276 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2277 Test zero-length template argument list.
2278 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2279 Test single argument cases and argument types that should decay.
2280 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2281 Adjust expected error.
2282 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2283 dg-error lineno.
2284 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2285 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2286 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2287
2288 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2289
2290 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2291
2292 Make allocator propagation more consistent for
2293 operator+(basic_string) (P1165R1)
2294 * include/bits/basic_string.h
2295 (operator+(basic_string&&, basic_string&&): Changed resulting
2296 allocator to always be the one from the first parameter.
2297 * include/bits/basic_string.tcc
2298 (operator+(const _CharT*, const basic_string&)): Changed
2299 resulting allocator to be SOCCC on the second parameter's allocator.
2300 (operator+(_CharT, const basic_string&)): Likewise.
2301 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2302 New.
2303 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2304 New.
2305
2306 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2307
2308 * include/bits/regex.h: Improve docs.
2309 * include/bits/regex.tcc: Do not document implementation details.
2310
2311 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2312
2313 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2314
2315 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2316 Add type printer for container types in std::__debug namespace.
2317 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2318 (gdb-tests): Use distinct parameters for the type of test and use of
2319 regex.
2320 (gdb-test): Check for regex test even if 'whatis' test.
2321 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2322 mode.
2323 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2324 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2325 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2326 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2327 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2328 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2329 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2330
2331 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2332
2333 * include/std/system_error (error_category): Fix comment.
2334
2335 PR libstdc++/90299
2336 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2337 argument is an empty path.
2338 (absolute(const path&, error_code&)): Use invalid_argument as error
2339 code instead of no_such_file_or_directory.
2340 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2341 of non-existent paths and empty paths with both overloads of absolute.
2342
2343 * include/std/system_error (error_category, error_code)
2344 (error_condition): Improve docs.
2345 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2346 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2347 to class documentation. Suppress documentation for implementation
2348 details.
2349 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2350 Suppress documentation for implementation details.
2351
2352 * include/std/system_error (error_code): Remove friend declaration
2353 for hash<error_code>.
2354 (hash<error_code>::operator()): Use public member functions to access
2355 value and category.
2356 (hash<error_condition>::operator()): Use address of category, not
2357 its object representation.
2358 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2359 Use public member functions to access value and category.
2360 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2361
2362 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2363
2364 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2365 * include/bits/hashtable_policy.h
2366 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2367 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2368 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2369 smaller than input value rather than always greater. Preserve
2370 _M_next_resize if called with 0 input. Use __builtin_floorl.
2371 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2372 elements + number of insertions is greater than _M_next_resize. Start
2373 with 11 buckets if not told otherwise. Use __builtin_floorl.
2374 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2375 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2376 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2377 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2378 told otherwise. Use __builtin_floorl.
2379 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2380 to also validate _Power2_rehash_policy.
2381 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2382 Adapt.
2383
2384 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2385
2386 PR libstdc++/61761
2387 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2388 std::copysign.
2389
2390 PR libstdc++/52119
2391 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2392 overflow warning with -Wpedantic -Wsystem-headers.
2393
2394 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2395
2396 PR libstdc++/90314
2397 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2398 * include/bits/move.h (swap): Remove extra parentheses.
2399
2400 * include/experimental/bits/lfts_config.h: Improve doc markup.
2401 * include/experimental/optional: Improve docs.
2402 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2403 (__constexpr_addressof): Remove.
2404 (optional::operator->()): Use std::__addressof().
2405 * include/std/optional (optional::operator->()): Adjust whitespace.
2406 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2407 that operator-> is still constexpr with overloaded operator&. Change
2408 to compile-only test.
2409 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2410 compile-only test.
2411
2412 * include/bits/shared_ptr.h: Improve docs.
2413 * include/bits/shared_ptr_atomic.h: Likewise.
2414 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2415
2416 * include/bits/basic_string.h: Fix iterator/index confusion in
2417 Doxygen comments.
2418 * include/bits/range_access.h: Fix Doxygen warnings.
2419 * include/bits/refwrap.h: Do not document implementation details.
2420 (ref, cref): Group docs with reference_wrapper.
2421 * include/std/fstream: Fix Doxygen markup.
2422 * libsupc++/initializer_list (begin, end): Group docs with
2423 initializer_list.
2424
2425 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2426
2427 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2428 * include/std/mutex: Likewise.
2429 * include/std/shared_mutex: Likewise.
2430
2431 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2432 * include/bits/fs_fwd.h: Likewise.
2433 * include/bits/fs_ops.h: Likewise.
2434 * include/bits/fs_path.h: Likewise.
2435 * include/std/filesystem: Likewise.
2436
2437 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2438 * include/experimental/buffer: Likewise.
2439 * include/experimental/executor: Likewise.
2440 * include/experimental/internet: Likewise.
2441 * include/experimental/io_context: Likewise.
2442 * include/experimental/net: Likewise.
2443 * include/experimental/netfwd: Likewise.
2444 * include/experimental/socket: Likewise.
2445 * include/experimental/timer: Likewise.
2446
2447 * doc/doxygen/doxygroups.cc: Move description of experimental group
2448 here.
2449 * include/experimental/algorithm: Add to libfund-ts doc group.
2450 * include/experimental/any: Likewise. Do not document implementation
2451 details.
2452 * include/experimental/array: Add to libfund-ts doc group.
2453 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2454 for Library Fundamentals.
2455 * include/experimental/chrono: Add to libfund-ts doc group.
2456 * include/experimental/deque: Likewise.
2457 * include/experimental/forward_list: Likewise.
2458 * include/experimental/functional: Likewise.
2459 * include/experimental/iterator: Likewise.
2460 * include/experimental/list: Likewise.
2461 * include/experimental/map: Likewise.
2462 * include/experimental/memory: Likewise.
2463 * include/experimental/memory_resource: Likewise. Improve docs.
2464 details.
2465 * include/experimental/numeric: Add to libfund-ts doc group.
2466 * include/experimental/optional: Likewise.
2467 * include/experimental/propagate_const: Likewise.
2468 * include/experimental/random: Likewise.
2469 * include/experimental/ratio: Likewise.
2470 * include/experimental/regex: Likewise.
2471 * include/experimental/set: Likewise.
2472 * include/experimental/source_location: Likewise.
2473 * include/experimental/string: Likewise.
2474 * include/experimental/string_view: Likewise.
2475 * include/experimental/system_error: Likewise.
2476 * include/experimental/tuple: Likewise.
2477 * include/experimental/type_traits: Likewise.
2478 * include/experimental/unordered_map: Likewise.
2479 * include/experimental/unordered_set: Likewise.
2480 * include/experimental/utility: Likewise.
2481 * include/experimental/vector: Likewise.
2482 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2483 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2484 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2485 Likewise.
2486 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2487 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2488 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2489 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2490 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2491
2492 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2493 * include/experimental/bits/fs_fwd.h: Improve docs.
2494 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2495 * include/experimental/bits/fs_path.h: Likewise.
2496 (path, filesystem_error, u8path): Improve docs.
2497 * include/experimental/filesystem: Link to docs for TS.
2498
2499 * config/allocator/new_allocator_base.h (__allocator_base): Add
2500 workaround for Doxygen bug #6945.
2501 * include/std/memory: Improve docs. Define group for pointer safety.
2502 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2503 conditional to suppress documentation for implementation details.
2504
2505 * include/bits/specfun.h: Improve docs.
2506 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2507 and namespaces.
2508
2509 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2510 (std::experimental): Add docs.
2511 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2512 namespace to nothing when generating docs.
2513 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2514 * include/std/chrono (std::chrono): Likewise.
2515 * include/std/functional (std::placeholders): Likewise.
2516 * include/std/thread (std::this_thread): Likewise.
2517
2518 * include/parallel/settings.h: Fix Doxygen markup.
2519
2520 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2521 anything unless PB_DS_CLASS_C_DEC is defined.
2522 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2523 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2524 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2525 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2526 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2527 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2528 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2529 Likewise.
2530 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2531 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2532 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2533 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2534 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2535 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2536 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2537 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2538 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2539 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2540 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2541 Likewise.
2542 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2543 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2544 Likewise.
2545 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2546 Likewise.
2547
2548 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2549 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2550 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2551 Doxygen expands.
2552
2553 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2554
2555 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2556 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2557 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2558 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2559 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2560 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2561 Likewise.
2562 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2563 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2564 Likewise.
2565
2566 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2567
2568 PR libstdc++/61761
2569 * include/std/complex (__complex_proj): Return parameter unchanged.
2570 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2571 floating-point types to take std::complex arguments.
2572 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2573 floating-point types.
2574 * testsuite/26_numerics/complex/proj.cc: New test.
2575
2576 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2577
2578 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2579 to _Lock_policyE[012].
2580 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2581
2582 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2583
2584 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2585 macros accidentally left in.
2586 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2587 unnecessary -lstdc++fs option. Fix test for mingw.
2588 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2589 Fix test for mingw.
2590
2591 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2592
2593 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2594
2595 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2596
2597 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2598
2599 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2600 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2601
2602 PR libstdc++/71312
2603 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2604
2605 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2606 attribute.
2607
2608 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2609 class template and partial specialization.
2610
2611 PR libstdc++/87982
2612 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2613 an integral type.
2614 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2615 functions to convert a value to an integral type.
2616 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2617 (fill_n): Convert _Size parameter to an integral type.
2618 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2619 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2620 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2621 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2622 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2623 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2624
2625 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2626
2627 Adding noexcept-specification on tuple constructors (LWG 2899)
2628 * libstdc++-v3/include/std/tuple:
2629 (tuple()): Add noexcept-specification.
2630 (tuple(const _Elements&...)): Likewise
2631 (tuple(_UElements&&...)): Likewise
2632 (tuple(const tuple<_UElements...>&)): Likewise
2633 (tuple(tuple<_UElements...>&&)): Likewise
2634 (tuple(const _T1&, const _T2&)): Likewise
2635 (tuple(_U1&&, _U2&&)): Likewise
2636 (tuple(const tuple<_U1, _U2>&): Likewise
2637 (tuple(tuple<_U1, _U2>&&): Likewise
2638 (tuple(const pair<_U1, _U2>&): Likewise
2639 (tuple(pair<_U1, _U2>&&): Likewise
2640 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2641
2642 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2643
2644 PR libstdc++/87106
2645 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2646 arguments with __restrict.
2647
2648 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2649
2650 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2651
2652 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2653
2654 * include/experimental/bits/fs_path.h
2655 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2656 avoid redundant call to _S_convert_loc with non-const pointers.
2657
2658 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2659 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2660 * testsuite/21_strings/basic_string/hash/hash.cc
2661 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2662 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2663 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2664
2665 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2666 wstring::_M_replace_dispatch with more specific patterns.
2667 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2668 Create const std::string to avoid redundant call to _S_convert_loc
2669 with non-const pointers.
2670 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2671 avoid unnecessary basic_string::assign instantiations.
2672
2673 * include/std/memory (__uses_alloc_args): Add string-literal to
2674 static_assert, to match the one in __uses_alloc.
2675 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2676 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2677 for recursive uses-allocator construction of nested pairs.
2678 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2679 comment.
2680
2681 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2682
2683 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2684 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2685 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2686 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2687
2688 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2689 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2690 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2691 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2692 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2693 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2694 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2695
2696 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2697
2698 PR libstdc++/90239
2699 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2700 * include/std/scoped_allocator [__cplusplus > 201703L]
2701 (scoped_allocator_adaptor::construct): Define in terms of
2702 uses_allocator_construction_args, as per P0591R4.
2703 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2704 * testsuite/util/testsuite_allocator.h: Remove name of unused
2705 parameter.
2706
2707 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2708
2709 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2710 * doc/html/*: Regenerate.
2711
2712 * include/bits/fs_path.h (operator<, operator<=, operator>)
2713 (operator>=, operator==, operator!=): Make hidden friends, as per
2714 LWG 3065.
2715 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2716 string type in test.
2717 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2718
2719 * include/std/any (any::any(ValueType&&)): Use __and_v.
2720 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2721 Likewise.
2722
2723 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2724 as per P0777R1.
2725 * include/std/type_traits (__result_of_memfun): Use remove_reference
2726 instead of __remove_cvref_t and remove redundant is_same check.
2727 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2728
2729 * include/experimental/string_view (basic_string_view::pointer)
2730 (basic_string_view::reference): Fix to refer to non-const value_type.
2731 * include/bits/basic_string.h (basic_string): Use __sv_check and
2732 __sv_limit instead of basic_string_view::_M_check and
2733 basic_string_view::_M_limit.
2734 * include/std/string_view (__sv_check, __sv_limit): New
2735 helper functions to replace basic_string_view::_M_check and
2736 basic_string_view::_M_limit.
2737 (basic_string_view): Add static assertions to enforce ill-formed
2738 requirement for traits_type::char_type from P1148R0, and to enforce
2739 required properties of char-like types.
2740 (basic_string_view::pointer, basic_string_view::reference): Fix to
2741 refer to non-const value_type.
2742 (basic_string_view::operator[], basic_string_view::at)
2743 (basic_string_view::front, basic_string_view::back)
2744 (basic_string_view::data): Use const_reference and const_pointer
2745 typedefs for return types.
2746 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2747 (hash<wstring_view>): Fix argument_type typedef.
2748 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2749 char/1.cc: Fix expected return type of basic_string_view::data().
2750 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2751 wchar_t/1.cc: Likewise.
2752 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2753 char/1.cc: Likewise.
2754 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2755 wchar_t/1.cc: Likewise.
2756 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2757 New test.
2758 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2759 Check reference and pointer typedefs.
2760 * testsuite/experimental/string_view/requirements/typedefs.cc:
2761 Likewise.
2762 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2763 Fix expected return type of basic_string_view::data().
2764 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2765 1.cc: Likewise.
2766 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2767 Likewise.
2768 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2769 1.cc: Likewise.
2770
2771 PR libstdc++/90220
2772 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2773 Avoid a runtime check for types that can never be stored in std::any.
2774 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2775 array types.
2776
2777 PR libstdc++/90220 (partial)
2778 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2779 not attempt ill-formed static_cast to pointers to non-object types.
2780 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2781 function types.
2782
2783 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2784 prevent -Wcatch-value warning.
2785
2786 * include/std/variant (__variant_construct): Use template parameter
2787 type instead of equivalent decltype-specifier.
2788 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2789 Replace forward with move.
2790 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2791 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2792 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2793 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2794 index after construction succeeds.
2795 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2796 if-constexpr checks that are always true. Use __remove_cvref_t instead
2797 of remove_reference so that is_nothrow_move_constructible check
2798 doesn't use a const rvalue parameter. In the potentially-throwing case
2799 construct a temporary and move assign it, as per LWG 2904.
2800 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2801 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2802 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2803 construct a temporary and move assign from it, as per LWG 2904.
2804 * testsuite/20_util/variant/exception_safety.cc: Check that
2805 assignment operators have strong exception safety guarantee.
2806
2807 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2808
2809 Document PSTL linker flags
2810
2811 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2812
2813 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2814
2815 * include/std/variant (__detail::__variant::_Traits): Make
2816 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2817 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2818 P0602R4.
2819 (__detail::__variant::_Copy_assign_alias): Only depend on
2820 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2821 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2822 move assignment operators.
2823
2824 PR libstdc++/90165
2825 * include/std/variant (variant::__not_self): New helper for the
2826 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2827 (variant::__to_type_impl): Remove.
2828 (variant::__to_type): Add default argument to check pack size, instead
2829 of using __to_type_impl.
2830 (variant::__accepted_type): Add default argument using __not_self.
2831 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2832 for variant(T&&) constructor constraint.
2833 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2834 Extract __accepted_type into a named template parameter for reuse in
2835 other constraints and in the exception specification.
2836 (variant::variant(in_place_type_t<T>, Args&&...))
2837 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2838 (variant::variant(in_place_index_t<T>, Args&&...))
2839 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2840 (variant::operator=T&&)): Remove redundant && from trait arguments.
2841 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2842 isn't used for in_place_type or in_place_index arguments.
2843
2844 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2845 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2846 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2847
2848 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2849 Bernd Edlinger <bernd.edlinger@hotmail.de>
2850 Jakub Jelinek <jakub@redhat.com>
2851
2852 PR target/89093
2853 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2854 general-regs-only target attribute for ARM.
2855
2856 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2857
2858 PR libstdc++/87431
2859 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2860 specialization also depend on is_nothrow_move_constructible.
2861 * include/std/variant (__detail::__variant::__never_valueless()):
2862 Only true if the variant would have a move assignment operator.
2863 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2864 Check __never_valueless<T...>().
2865 (variant::emplace): Only perform non-throwing move assignments
2866 for never-valueless alternatives if the variant has a move assignment
2867 operator.
2868 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2869 types can be emplaced into non-assignable variants.
2870 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2871 don't get copied when emplaced into non-assignable variants.
2872
2873 * include/std/variant (__detail::__variant::__ref_cast): Remove
2874 unused function.
2875 (__detail::__variant::_Uninitialized::_M_get)
2876 (__detail::__variant::__get)
2877 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2878
2879 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2880
2881 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2882 to Darwin10.
2883 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2884 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2885 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2886 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2887
2888 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2889
2890 Delegate PSTL configuration to pstl/pstl_config.h
2891
2892 * include/bits/c++config: Remove explicit PSTL configuration
2893 macros and use definitions from <pstl/pstl_config.h>.
2894
2895 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2896
2897 Cleanup algorithm implementations
2898 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2899 execution policy.
2900 (mismatch): Forward execution policy.
2901 (equal): Qualify call to std::equal().
2902 (partial_sort): Forward execution policy.
2903 (inplace_merge): Forward execution policy.
2904
2905 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2906
2907 Improve implementation of parallel equal()
2908 * include/pstl/algorithm_impl.h
2909 (__internal::__brick_equal): use "4 iterator" version of
2910 std::equal().
2911 (__internal::__brick_equal): use simd for random access
2912 iterators on unsequenced execution policies.
2913 (__internal::__pattern_equal): add "4 iterator" version
2914 (__internal::__pattern_equal): dispatch to simd __brick_equal
2915 for vector-only execution policies.
2916 (__internal::__pattern_equal): dispatch to __parallel_or for
2917 parallel execution policies.
2918 * include/pstl/glue_algorithm_impl.h
2919 (std::equal): dispatch to "4 iterator" version of
2920 __internal::__pattern_equal().
2921
2922 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2923
2924 PR libstdc++/90105
2925 * include/bits/forward_list.h (operator==): Do not use operator!= to
2926 compare elements.
2927 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2928 earlier in the list, so that sort is stable.
2929 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2930 * testsuite/23_containers/forward_list/comparable.cc: Test with
2931 types that meet the minimum EqualityComparable and LessThanComparable
2932 requirements. Remove irrelevant comment.
2933
2934 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2935 Do not depend on whether all alternative types are move constructible.
2936 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2937 from the operand when deciding whether to perform the assignment.
2938 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2939 with deleted move constructor and deleted move assignment operator.
2940 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2941 behaviour of variants with DeletedMoves as an alternative.
2942 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2943 (move_ctor, move_assign): Check that moving a variant with a
2944 DeletedMoves alternative falls back to copying instead of moving.
2945
2946 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2947 from static_assert declarations.
2948
2949 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2950 actually match its name.
2951 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2952 (test_swap()): Fix result for MoveCtorOnly and check
2953 MoveCtorAndSwapOnly.
2954
2955 * include/std/optional (optional::value_or(U&&) &&): Add missing
2956 constexpr specifier.
2957 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2958 for disengaged optionals and rvalue optionals.
2959 * testsuite/20_util/optional/observers/4.cc: Likewise.
2960
2961 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2962
2963 * include/pstl/algorithm_impl.h: Uglify identfiers.
2964 * include/pstl/numeric_impl.h: Uglify identfiers.
2965 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2966
2967 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2968
2969 * include/bits/c++config:
2970 Add definition for __PSTL_ASSERT.
2971 Add definition for __PSTL_ASSERT_MSG.
2972 * include/pstl/algorithm_impl.h: Replace use of assert().
2973 * include/pstl/numeric_impl.h: Replace use of assert().
2974 * include/pstl/parallel_backend_tbb.h:
2975 Replace use of assert().
2976 Replace use of __TBB_ASSERT().
2977 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2978
2979 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2980
2981 PR libstdc++/90046
2982 * src/c++17/memory_resource.cc
2983 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2984 needed to allow placing a _Chunk at the end of the buffer.
2985 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2986
2987 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2988
2989 * doc/xml/faq.xml: Add information about emergency EH pool.
2990 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2991 Move outdated information on mt_allocator to a separate section.
2992 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2993 doesn't affect the default allocator.
2994
2995 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2996 typo.
2997
2998 PR libstdc++/89851
2999 * testsuite/20_util/variant/89851.cc: New test.
3000
3001 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3002
3003 * include/std/variant: Adjust whitespace. Add comments.
3004 (_Multi_array): Leave primary template undefined.
3005 (_Multi_array<_Tp>): Define partial specialization for base case of
3006 recursion.
3007 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3008 which is always a reference.
3009 (__gen_vtable::_S_apply()): Remove function, inline body into
3010 default member initializer.
3011 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3012
3013 * include/std/variant (__variant_idx_cookie): Add member type.
3014 (__visitor_result_type): Remove.
3015 (__do_visit): Use invoke_result instead of __visitor_result_type.
3016 * testsuite/20_util/variant/visit.cc: New test.
3017
3018 PR libstdc++/90008
3019 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3020 unused capture.
3021 * testsuite/20_util/variant/90008.cc: New test.
3022
3023 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3024
3025 * include/pstl/algorithm_impl.h: Add namespace qualification.
3026 * include/pstl/execution_defs.h: Add namespace qualification.
3027 * include/pstl/execution_impl.h: Add namespace qualification.
3028 * include/pstl/numeric_impl.h: Add namespace qualification.
3029 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3030 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3031 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3032
3033 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3034
3035 Fix visit<R> for variant.
3036 * include/std/variant (__do_visit): Add a template parameter
3037 for enforcing same return types for visit.
3038 (__gen_vtable_impl): Likewise.
3039 (_S_apply_single_alt): Adjust.
3040 (__visit_invoke_impl): New. Handle casting to void.
3041 (__do_visit_invoke): New. Enforces same return types.
3042 (__do_visit_invoke_r): New. Converts return types.
3043 (__visit_invoke): Adjust.
3044 (__gen_vtable): Add a template parameter for enforcing
3045 same return types for visit.
3046 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3047 different return types.
3048 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3049 visitors with different return types don't accidentally
3050 compile with regular visitation.
3051
3052 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3053
3054 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3055 dg-require-filesystem-ts.
3056
3057 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3058
3059 * doc/xml/manual/status_cxx2020.xml: Update status.
3060 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3061 * testsuite/20_util/variant/visit_r.cc: New test.
3062
3063 * include/bits/fs_dir.h (directory_iterator::operator*)
3064 (directory_iterator::operator->): Add noexcept.
3065 (operator==, operator!=): Replace namespace-scope equality operators
3066 for directory iterators with hidden friends.
3067
3068 PR libstdc++/89986
3069 * config/abi/pre/gnu.ver: Add missing exports.
3070 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3071 increment member.
3072
3073 * config/abi/pre/gnu.ver: Export new symbols.
3074 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3075 (recursive_directory_iterator::recursion_pending())
3076 (recursive_directory_iterator::disable_recursion_pending()): Remove
3077 inline definitions. Make noexcept.
3078 (recursive_directory_iterator::depth())
3079 (recursive_directory_iterator::operator*())
3080 (recursive_directory_iterator::operator->()): Make noexcept.
3081 (recursive_directory_iterator::_M_options)
3082 (recursive_directory_iterator::_M_pending): Remove data members.
3083 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3084 (recursive_directory_iterator::recursive_directory_iterator): Remove
3085 ctor-initializer. Use new constructor for _Dir_stack.
3086 (recursive_directory_iterator::options())
3087 (recursive_directory_iterator::recursion_pending())
3088 (recursive_directory_iterator::disable_recursion_pending()): Add
3089 non-inline definitions.
3090 (recursive_directory_iterator::depth()): Make noexcept.
3091 (recursive_directory_iterator::increment(error_code&))
3092 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3093 location of options and recursion_pending members.
3094 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3095 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3096 user-declared move constructor and assignment operator, to make the
3097 type move-only.
3098
3099 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3100 d_type == DT_UNKNOWN immediately.
3101 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3102 handling here.
3103 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3104
3105 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3106 assignment.
3107 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3108 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3109 assignment.
3110
3111 PR libstdc++/87431 (again)
3112 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3113 Define partial specialization for basic_string.
3114 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3115 shared_ptr and weak_ptr.
3116 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3117 function.
3118 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3119 vector.
3120 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3121 unique_ptr.
3122 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3123 vector.
3124 * include/std/any (_Never_valueless_alt): Define explicit
3125 specialization for any.
3126 * include/std/variant (_Never_valueless_alt): Define primary template.
3127 (__never_valueless): Use _Never_valueless_alt instead of
3128 is_trivially_copyable.
3129 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3130 initializations to avoid try-catch overhead. Add special case for
3131 scalars produced by potentially-throwing conversions. Use
3132 _Never_valueless_alt instead of is_trivially_copyable for the
3133 remaining strong exception-safety cases.
3134 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3135 * testsuite/20_util/variant/87431.cc: Run both test functions.
3136 * testsuite/20_util/variant/exception_safety.cc: New test.
3137 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3138 so the variant becomes valueless.
3139
3140 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3141
3142 PR libstdc++/85184
3143 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3144 Remove assertions.
3145 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3146
3147 * include/std/string (__hash_string_base): New class template defining
3148 operator() for hashing strings.
3149 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3150 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3151 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3152 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3153
3154 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3155
3156 Use single-visitation in variant assignment and swap and relops.
3157 Also use indices instead of types when checking whether
3158 variants hold the same thing.
3159 * include/std/variant (__do_visit): Add a template parameter
3160 for index visitation, invoke with indices if index visitation
3161 is used.
3162 (__variant_idx_cookie): New.
3163 (__visit_with_index): Likewise.
3164 (_Copy_assign_base::operator=): Do single-visitation with
3165 an index visitor.
3166 (_Move_assign_base::operator=): Likewise.
3167 (_Extra_visit_slot_needed): Adjust.
3168 (__visit_invoke): Call with indices if it's an index visitor.
3169 (relops): Do single-visitation with an index visitor.
3170 (swap): Likewise.
3171 (__visitor_result_type): New.
3172
3173 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3174
3175 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3176
3177 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3178
3179 Don't revisit a variant we are already visiting.
3180 * include/std/variant (__variant_construct_single): New.
3181 (__variant_construct): Use it.
3182 (_M_destructive_move): Likewise.
3183 (_M_destructive_copy): Likewise.
3184 (_Copy_assign_base::operator=): Adjust.
3185 (_Move_assign_base::operator=): Likewise.
3186 (swap): Likewise.
3187
3188 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3189
3190 PR libstdc++/85965
3191 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3192 destructor so they are not evaluated until the _Key type is complete.
3193 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3194 * testsuite/23_containers/set/85965.cc: New test.
3195 * testsuite/23_containers/unordered_set/85965.cc: New test.
3196 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3197 with regexp matching the corresponding _Rb_tree specialization.
3198 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3199 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3200 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3201 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3202 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3203 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3204 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3205
3206 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3207
3208 PR libstdc++/89825
3209 Fix based on a suggestion by Antony Polukhin.
3210 * include/std/variant (__never_valueless): New.
3211 (_M_valid): Use it.
3212 (_Extra_visit_slot_needed): New.
3213 (_Multi_array): Use it.
3214 (_S_apply_all_alts): Likewise.
3215
3216 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3217
3218 PR libstdc++/89824
3219 Fix based on a suggestion by Antony Polukhin.
3220 * include/std/variant (__gen_vtable): Don't reserve an
3221 additional table slot, _Multi_array already does that.
3222
3223 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3224
3225 PR libstdc++/89816
3226 Fix based on a suggestion by Antony Polukhin.
3227 * include/std/variant (__variant_construct): Capture a pointer
3228 to the storage and visit just one variant.
3229
3230 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3231
3232 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3233 Doxygen-generated pages with unstable URL.
3234 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3235 * doc/xml/manual/extensions.xml: Likewise.
3236 * doc/xml/manual/parallel_mode.xml: Likewise.
3237 * doc/xml/manual/support.xml: Likewise.
3238
3239 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3240 avoid -Wconversion warnings.
3241
3242 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3243
3244 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3245 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3246 (allstamped): Add stamp-pstl.
3247 (install-headers): Add ptsl_builddir.
3248 * include/Makefile.in: Regenerate.
3249 * include/bits/c++config: Add pstl configuration.
3250 * include/pstl/LICENSE.txt: New file.
3251 * include/pstl/algorithm_fwd.h: New file.
3252 * include/pstl/algorithm_impl.h: New file.
3253 * include/pstl/execution_defs.h: New file.
3254 * include/pstl/execution_impl.h: New file.
3255 * include/pstl/glue_algorithm_defs.h: New file.
3256 * include/pstl/glue_algorithm_impl.h: New file.
3257 * include/pstl/glue_execution_defs.h: New file.
3258 * include/pstl/glue_memory_defs.h: New file.
3259 * include/pstl/glue_memory_impl.h: New file.
3260 * include/pstl/glue_numeric_defs.h: New file.
3261 * include/pstl/glue_numeric_impl.h: New file.
3262 * include/pstl/memory_impl.h: New file.
3263 * include/pstl/numeric_fwd.h: New file.
3264 * include/pstl/numeric_impl.h: New file.
3265 * include/pstl/parallel_backend.h: New file.
3266 * include/pstl/parallel_backend_tbb.h: New file.
3267 * include/pstl/parallel_backend_utils.h: New file.
3268 * include/pstl/parallel_impl.h: New file.
3269 * include/pstl/pstl_config.h: New file.
3270 * include/pstl/unseq_backend_simd.h: New file.
3271 * include/pstl/utils.h: New file.
3272 * include/std/algorithm: Include parallel algorithm implementations.
3273 * include/std/execution: New file.
3274 * include/std/memory: Include parallel algorithm implementations.
3275 * include/std/numeric: Include parallel algorithm implementations.
3276 * include/std/version: Add parallel algorithms feature test macro.
3277 * testsuite/util/pstl/pstl_test_config.h: New file.
3278 * testsuite/util/pstl/test_utils.h: New file.
3279 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3280 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3281 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3282 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3283 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3284 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3285 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3286 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3287 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3288 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3289 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3290 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3291 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3292 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3293 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3294 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3295 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3296 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3297 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3298 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3299 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3300 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3301 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3302 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3303 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3304 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3305 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3306 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3307 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3308 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3309 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3310 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3311 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3312 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3313 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3314 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3315 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3316 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3317 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3318 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3319 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3320 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3321 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3322 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3323 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3324 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3325 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3326 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3327 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3328 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3329 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3330 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3331 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3332 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3333 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3334 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3335 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3336 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3337 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3338 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3339 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3340 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3341 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3342 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3343 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3344 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3345 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3346 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3347 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3348 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3349 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3350 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3351 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3352 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3353 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3354 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3355 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3356 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3357 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3358 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3359 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3360 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3361 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3362 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3363 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3364 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3365 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3366 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3367 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3368 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3369 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3370 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3371 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3372 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3373 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3374 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3375 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3376 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3377 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3378 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3379 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3380 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3381 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3382 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3383 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3384 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3385
3386 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3387
3388 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3389 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3390 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3391 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3392 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3393 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3394 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3395 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3396 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3397 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3398 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3399 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3400 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3401 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3402 when the special functions IS is enabled, not for C++17.
3403 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3404 Replace with ...
3405 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3406 without checks for special functions in C++17.
3407 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3408 New test.
3409
3410 PR libstdc++/88066
3411 * include/backward/hash_map: Use <> for includes not "".
3412 * include/backward/hash_set: Likewise.
3413 * include/backward/strstream: Likewise.
3414 * include/tr1/bessel_function.tcc: Likewise.
3415 * include/tr1/exp_integral.tcc: Likewise.
3416 * include/tr1/legendre_function.tcc: Likewise.
3417 * include/tr1/modified_bessel_func.tcc: Likewise.
3418 * include/tr1/riemann_zeta.tcc: Likewise.
3419
3420 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3421
3422 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3423 of extension allocators.
3424 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3425 Document new headers in 7.2, 8.1 and 9.1 releases.
3426 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3427 * doc/html/*: Regenerate.
3428
3429 2019-03-12 John David Anglin <dave.anglin@bell.net>
3430
3431 PR libstdc++/89461
3432 * testsuite/lib/libstdc++.exp: Locate libatomic.
3433 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3434 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3435 libatomic options.
3436 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3437 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3438 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3439 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3440
3441 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3442
3443 PR libstdc++/89460
3444 * configure.ac: Check for sockatmark.
3445 * crossconfig.m4: Check for sockatmark.
3446 * config.h.in: Regenerate.
3447 * configure: Regenerate.
3448 * include/experimental/internet (address_v4::_S_hton): Rename
3449 overloaded functions to _S_hton_16 and _S_ntoh_16.
3450 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3451 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3452 * include/experimental/socket (basic_socket::at_mark): Check
3453 _GLIBCXX_HAVE_SOCKATMARK.
3454
3455 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3456 const variables instead of macros.
3457
3458 PR libstdc++/89629
3459 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3460 Use correct type for len_aligned.
3461 * testsuite/20_util/hash/89629.cc: New test.
3462
3463 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3464
3465 PR libstdc++/89641
3466 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3467 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3468 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3469 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3470 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3471 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3472 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3473 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3474 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3475 memory_order_seq_cst to int.
3476
3477 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3478
3479 * doc/xml/manual/using.xml: Use link element instead of xref.
3480 * doc/html/*: Regenerate.
3481
3482 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3483
3484 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3485
3486 PR libstdc++/89477
3487 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3488 parameters in deduction guides.
3489 * include/debug/multimap.h (multimap): Likewise.
3490 * include/debug/set.h (multimap): Likewise.
3491 * include/debug/multiset.h (multimap): Likewise.
3492 * include/debug/unordered_map (unordered_map): Likewise.
3493 (unordered_multimap): Likewise.
3494 * include/debug/unordered_set (unordered_set): Likewise.
3495 (unordered_multiset): Likewise.
3496
3497 PR libstdc++/89608
3498 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3499 Invalidate all iterators in case of rehash.
3500 (unordered_multimap<>::_M_check_rehashed): Likewise.
3501 * include/debug/unordered_set
3502 (unordered_set<>::_M_check_rehashed): Likewise.
3503 (unordered_multiset<>::_M_check_rehashed): Likewise.
3504 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3505
3506 2019-03-07 Andreas Schwab <schwab@suse.de>
3507
3508 * config/abi/post/riscv64-linux-gnu: New directory.
3509 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3510
3511 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3512
3513 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3514 compile test to run. Fix typo.
3515
3516 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3517 * doc/html/*: Regenerate.
3518
3519 P0356R5 Simplified partial function application
3520 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3521 helpers for bind_front.
3522 (bind_front, __cpp_lib_bind_front): Define.
3523 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3524
3525 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3526
3527 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3528 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3529 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3530 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3531
3532 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3533
3534 PR libstdc++/86655 - std::assoc_legendre should not constrain
3535 the value of m (or x).
3536 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3537 __sph_legendre): If degree > order Don't throw, return 0.
3538 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3539 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3540 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3541 * testsuite/tr1/5_numerical_facilities/special_functions/
3542 02_assoc_legendre/pr86655.cc: New test.
3543 * testsuite/tr1/5_numerical_facilities/special_functions/
3544 22_sph_legendre/pr86655.cc: New test.
3545
3546 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3547
3548 Rewrite variant.
3549 Also PR libstdc++/85517
3550 * include/std/variant (__do_visit): New.
3551 (__variant_cast): Likewise.
3552 (__variant_cookie): Likewise.
3553 (__erased_*): Remove.
3554 (_Variant_storage::_S_vtable): Likewise.
3555 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3556 (_Variant_storage::__M_reset): Adjust.
3557 (__variant_construct): New.
3558 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3559 __variant_construct.
3560 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3561 (_Move_ctor_base::__M_destructive_copy): New.
3562 (_Move_ctor_base::__M_destructive_move): Adjust to use
3563 __variant_construct.
3564 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3565 (_Copy_assign_alias): Adjust to check both copy assignment
3566 and copy construction for triviality.
3567 (_Move_assign_base::operator=): Adjust to use __do_visit.
3568 (_Multi_array): Add support for visitors that accept and return
3569 a __variant_cookie.
3570 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3571 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3572 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3573 a __variant_cookie temporary for a variant that is valueless and..
3574 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3575 (__gen_vtable::_Array_type): Conditionally make space for
3576 the __variant_cookie visitor case.
3577 (__variant_construct_by_index): New.
3578 (get_if): Adjust to use std::addressof.
3579 (relops): Adjust to use __do_visit.
3580 (variant): Add __variant_cast and __variant_construct_by_index
3581 as friends.
3582 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3583 instead of self-destruction.
3584 (variant::swap): Adjust to use __do_visit.
3585 (visit): Reimplement in terms of __do_visit.
3586 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3587 * testsuite/20_util/variant/compile.cc: Adjust.
3588 * testsuite/20_util/variant/run.cc: Likewise.
3589
3590 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3591
3592 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3593 constant.
3594 * testsuite/experimental/feat-char8_t.cc: Likewise.
3595
3596 * include/std/type_traits [C++20] (is_bounded_array)
3597 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3598 Define.
3599 * testsuite/20_util/is_bounded_array/requirements/
3600 explicit_instantiation.cc: New test.
3601 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3602 test.
3603 * testsuite/20_util/is_bounded_array/value.cc: New test.
3604 * testsuite/20_util/is_unbounded_array/requirements/
3605 explicit_instantiation.cc: New test.
3606 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3607 * test.
3608 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3609
3610 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3611 Add constexpr.
3612 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3613
3614 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3615
3616 * include/c_compatibility/math.h [C++20] (lerp): Add using
3617 declaration.
3618 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3619 (__lerp): Define function template to implement lerp.
3620 (lerp(float, float, float), lerp(double, double, double))
3621 (lerp(long double, long double, long double)): Define for C++20.
3622 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3623 (midpoint(T, T), midpoint(T*, T*)): Define.
3624 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3625 * testsuite/26_numerics/lerp.cc: New test.
3626 * testsuite/26_numerics/midpoint/floating.cc: New test.
3627 * testsuite/26_numerics/midpoint/integral.cc: New test.
3628 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3629
3630 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3631
3632 PR libstdc++/88996 Implement P0439R0
3633 Make std::memory_order a scoped enumeration.
3634 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3635 add variables for the old enumerators. Adjust calls.
3636 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3637 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3638
3639 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3640
3641 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3642 directive.
3643
3644 * include/std/memory_resource (polymorphic_allocator): Add default
3645 template argument for C++20.
3646 (polymorphic_allocator::allocate_bytes)
3647 (polymorphic_allocator::deallocate_bytes)
3648 (polymorphic_allocator::allocate_object)
3649 (polymorphic_allocator::deallocate_object)
3650 (polymorphic_allocator::new_object)
3651 (polymorphic_allocator::delete_object): New member functions for
3652 C++20.
3653 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3654 test.
3655
3656 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3657
3658 PR libstdc++/89562
3659 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3660 mode for mingw.
3661
3662 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3663
3664 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3665 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3666
3667 * include/std/memory (uses_allocator_construction_args): New set of
3668 overloaded functions.
3669 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3670 New functions.
3671 * include/std/memory_resource (polymorphic_allocator::construct)
3672 [__cplusplus > 201703l]: Replace all overloads with a single function
3673 using uses_allocator_construction_args.
3674 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3675 test.
3676 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3677
3678 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3679
3680 PR libstdc++/89466
3681 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3682 stylesheet directories before check for xsltproc. Try to use
3683 xmlcatalog to find local stylesheet directory before trying hardcoded
3684 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3685 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3686 use xsltproc if xmlcatalog fails to find a local stylesheet.
3687 * configure.ac: Check for xmlcatalog.
3688 * Makefile.in: Regenerate.
3689 * configure: Likewise.
3690 * doc/Makefile.in: Likewise.
3691 * include/Makefile.in: Likewise.
3692 * libsupc++/Makefile.in: Likewise.
3693 * po/Makefile.in: Likewise.
3694 * python/Makefile.in: Likewise.
3695 * src/Makefile.in: Likewise.
3696 * src/c++11/Makefile.in: Likewise.
3697 * src/c++17/Makefile.in: Likewise.
3698 * src/c++98/Makefile.in: Likewise.
3699 * src/filesystem/Makefile.in: Likewise.
3700 * testsuite/Makefile.in: Likewise.
3701
3702 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3703
3704 PR libstdc++/89477
3705 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3706 container deduction guides.
3707 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3708 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3709 parameters in deduction guides.
3710 * include/bits/stl_multimap.h (multimap): Likewise.
3711 * include/bits/stl_multiset.h (multiset): Likewise.
3712 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3713 * include/bits/stl_set.h (set): Likewise.
3714 * include/bits/stl_stack.h (stack): Likewise.
3715 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3716 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3717 constrain parameters in deduction guides.
3718 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3719 Likewise.
3720 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3721 deduction cases.
3722 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3723 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3724 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3725 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3726 Likewise.
3727 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3728 Likewise.
3729 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3730
3731 PR libstdc++/89416
3732 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3733 to class template and partial specialization using void_t.
3734 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3735
3736 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3737
3738 PR libstdc++/89416
3739 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3740 copy and move members public.
3741
3742 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3743
3744 * include/std/type_traits (__underlying_type_impl): New helper to
3745 make underlying_type SFINAE-friendly.
3746 (underlying_type): Derive from __underlying_type_impl.
3747 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3748 test.
3749
3750 PR libstdc++/89446
3751 * include/bits/char_traits.h (__constant_char_array): Check index is
3752 in range before dereferencing.
3753 (char_traits<char>::compare, char_traits<char>::find)
3754 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3755 immediately if n is zero.
3756 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3757 Remove workarounds for PR 67026.
3758 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3759 New test.
3760 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3761 New test.
3762
3763 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3764
3765 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3766 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3767
3768 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3769
3770 PR libstdc++/89402
3771 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3772 type to std::size_t and argument to type to long double.
3773
3774 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3775
3776 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3777 * config/abi/post/sparc64-linux-gnu: New directory.
3778 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3779 * config/abi/post/sparc64-linux-gnu/32: New directory.
3780 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3781
3782 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3783
3784 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3785 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3786 test.
3787
3788 2019-02-22 Tom Honermann <tom@honermann.net>
3789
3790 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3791 printers for u8string and u8string_view.
3792
3793 2019-02-22 Tom Honermann <tom@honermann.net>
3794
3795 * testsuite/18_support/byte/ops.cc: Validate
3796 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3797 std::to_integer<char32_t>.
3798 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3799 std::numeric_limits<char8_t>.
3800 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3801 std::numeric_limits<char8_t>::lowest().
3802 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3803 std::numeric_limits<char8_t>::max_digits10.
3804 * testsuite/18_support/type_info/fundamental.cc: Validate
3805 typeinfo for char8_t.
3806 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3807 std::from_chars with char8_t.
3808 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3809 Validate explicit instantiation of std::hash<char8_t>.
3810 * testsuite/20_util/is_integral/value.cc: Validate
3811 std::is_integral<char8_t>.
3812 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3813 Validate std::make_signed<char8_t>.
3814 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3815 Validate u8string construction from char8_t sources.
3816 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3817 std::pmr::u8string.
3818 * testsuite/21_strings/basic_string_view/operations/compare/
3819 char/70483.cc: Validate substr operations on u8string_view.
3820 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3821 the u8string_view typedef is defined.
3822 * testsuite/21_strings/char_traits/requirements/
3823 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3824 member functions.
3825 * testsuite/21_strings/char_traits/requirements/
3826 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3827 constexpr member functions.
3828 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3829 that the u8string typedef is defined.
3830 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3831 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3832 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3833 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3834 numbers.
3835 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3836 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3837 Likewise.
3838 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3839 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3840 Validate std::atomic<char8_t>::is_always_lock_free
3841 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3842 Update line numbers.
3843 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3844 Likewise.
3845 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3846 Likewise.
3847 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3848 Validate std::experimental::pmr::u8string.
3849 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3850 u8string_view typedef is defined.
3851 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3852 char32_t to the typelists.
3853
3854 2019-02-22 Tom Honermann <tom@honermann.net>
3855
3856 * include/ext/typelist.h: Constrain a partial specialization of
3857 typelist::detail::append_ to only match chain<T1,T2>.
3858
3859 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3860
3861 PR libstdc++/89416
3862 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3863 class template with class. Replace move and copy member types with
3864 member alias templates, so they are only instantiated when needed.
3865 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3866 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3867 test for C++11/14/17 as well.
3868 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3869 test.
3870
3871 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3872
3873 PR libstdc++/89402
3874 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3875 _GLIBCXX_PURE to the alias declaration.
3876
3877 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3878
3879 * testsuite/21_strings/basic_string/literals/types.cc
3880 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3881 * testsuite/21_strings/basic_string/literals/values.cc
3882 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3883 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3884 potentially having different type.
3885 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3886 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3887 to char.
3888 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3889 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3890 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3891 string literals only using basic character set.
3892 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3893 u8 literals to char.
3894 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3895 Test ATOMIC_CHAR8_T_LOCK_FREE.
3896 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3897 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3898 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3899 * testsuite/experimental/string_view/literals/types.cc
3900 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3901 literal.
3902 * testsuite/experimental/string_view/literals/values.cc
3903 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3904
3905 2019-02-19 Tom Honermann <tom@honermann.net>
3906
3907 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3908 from char16_32_t.cc; validates numeric_limits<char8_t>.
3909 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3910 test cloned from types.cc; validates operator""s for char8_t
3911 returns u8string.
3912 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3913 test cloned from values.cc; validates construction and comparison
3914 of u8string values.
3915 * testsuite/21_strings/basic_string/requirements/
3916 /explicit_instantiation/char8_t/1.cc: New test cloned from
3917 char16_t/1.cc; validates explicit instantiation of
3918 basic_string<char8_t>.
3919 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3920 New test cloned from types.cc; validates operator""sv for char8_t
3921 returns u8string_view.
3922 * testsuite/21_strings/basic_string_view/literals/
3923 values-char8_t.cc: New test cloned from values.cc; validates
3924 construction and comparison of u8string_view values.
3925 * testsuite/21_strings/basic_string_view/requirements/
3926 explicit_instantiation/char8_t/1.cc: New test cloned from
3927 char16_t/1.cc; validates explicit instantiation of
3928 basic_string_view<char8_t>.
3929 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3930 New test cloned from char16_t/65049.cc; validates that
3931 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3932 * testsuite/21_strings/char_traits/requirements/char8_t/
3933 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3934 that char_traits<char8_t> member typedefs are present and correct.
3935 * testsuite/21_strings/char_traits/requirements/
3936 explicit_instantiation/char8_t/1.cc: New test cloned from
3937 char16_t/1.cc; validates explicit instantiation of
3938 char_traits<char8_t>.
3939 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3940 from char16_t.cc: validates
3941 codecvt<char16_t, char8_t, mbstate_t>.
3942 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3943 from char32_t.cc: validates
3944 codecvt<char32_t, char8_t, mbstate_t>.
3945 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3946 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3947 codecvt<char32_t, char8_t, std::mbstate_t>.
3948 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3949 test cloned from string.cc; validates filesystem::path construction
3950 from char8_t input.
3951 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3952 the __cpp_lib_char8_t feature test macro is defined with the
3953 correct value.
3954 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3955 New test cloned from string.cc; validates filesystem::path
3956 construction from char8_t input.
3957 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3958 test cloned from types.cc; validates operator""sv for char8_t
3959 returns u8string_view.
3960 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3961 New test cloned from values.cc; validates construction and
3962 comparison of u8string_view values.
3963 * testsuite/experimental/string_view/requirements/
3964 explicit_instantiation/char8_t/1.cc: New test cloned from
3965 char16_t/1.cc; validates explicit instantiation of
3966 basic_string_view<char8_t>.
3967 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3968 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3969 enabled.
3970
3971 2019-02-19 Tom Honermann <tom@honermann.net>
3972
3973 P0482R5 char8_t: Standard library support
3974 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3975 typeinfo symbols for char8_t.
3976 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3977 (GLIBCXX_3.4.26): Add symbols for specializations of
3978 numeric_limits and codecvt that involve char8_t.
3979 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3980 * include/bits/atomic_base.h: Add atomic_char8_t.
3981 * include/bits/basic_string.h: Add std::hash<u8string> and
3982 operator""s(const char8_t*, size_t).
3983 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3984 __cpp_lib_char8_t.
3985 * include/bits/char_traits.h: Add char_traits<char8_t>.
3986 * include/bits/codecvt.h: Add
3987 codecvt<char16_t, char8_t, mbstate_t>,
3988 codecvt<char32_t, char8_t, mbstate_t>,
3989 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3990 codecvt_byname<char32_t, char8_t, mbstate_t>.
3991 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3992 recognize char8_t as an integral type.
3993 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3994 char8_t.
3995 (path::u8string): Return std::u8string when char8_t support is
3996 enabled.
3997 (path::generic_u8string): Likewise.
3998 (path::_S_convert): Handle conversion from char8_t input.
3999 (path::_S_str_convert): Likewise.
4000 * include/bits/functional_hash.h: Add hash<char8_t>.
4001 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4002 char8_t.
4003 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4004 for new char8_t specializations.
4005 * include/bits/localefwd.h: Add missing declarations of
4006 codecvt<char16_t, char, mbstate_t> and
4007 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4008 codecvt<char16_t, char8_t, mbstate_t> and
4009 codecvt<char32_t, char8_t, mbstate_t>.
4010 * include/bits/postypes.h: Add u8streampos
4011 * include/bits/stringfwd.h: Add declarations of
4012 char_traits<char8_t> and u8string.
4013 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4014 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4015 Recognize char8_t.
4016 (path::u8string): Return std::u8string when char8_t support is
4017 enabled.
4018 (path::generic_u8string): Likewise.
4019 (path::_S_convert): Handle conversion from char8_t input.
4020 (path::_S_str_convert): Likewise.
4021 * include/experimental/string: Add u8string.
4022 * include/experimental/string_view: Add u8string_view,
4023 hash<experimental::u8string_view>, and
4024 operator""sv(const char8_t*, size_t).
4025 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4026 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4027 as a character type.
4028 * include/std/limits: Add numeric_limits<char8_t>.
4029 * include/std/string_view: Add u8string_view,
4030 hash<experimental::u8string_view>, and
4031 operator""sv(const char8_t*, size_t).
4032 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4033 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4034 * libsupc++/atomic_lockfree_defines.h: Define
4035 ATOMIC_CHAR8_T_LOCK_FREE.
4036 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4037 codecvt.cc and limits.cc so that char8_t specializations of
4038 numeric_limits and codecvt and emitted.
4039 * src/c++11/Makefile.in: Likewise.
4040 * src/c++11/codecvt.cc: Define members of
4041 codecvt<char16_t, char8_t, mbstate_t>,
4042 codecvt<char32_t, char8_t, mbstate_t>,
4043 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4044 codecvt_byname<char32_t, char8_t, mbstate_t>.
4045 * src/c++11/limits.cc: Define members of
4046 numeric_limits<char8_t>.
4047 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4048 locale_init.cc and localename.cc.
4049 * src/c++98/Makefile.in: Likewise.
4050 * src/c++98/locale_init.cc: Add initialization for the
4051 codecvt<char16_t, char8_t, mbstate_t> and
4052 codecvt<char32_t, char8_t, mbstate_t> facets.
4053 * src/c++98/localename.cc: Likewise.
4054 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4055
4056 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4057
4058 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4059 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4060 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4061
4062 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4063
4064 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4065 * doc/html/*: Regenerate.
4066
4067 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4068 * doc/html/*: Regenerate.
4069
4070 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4071 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4072 allocator type in is_constructible checks.
4073 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4074 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4075 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4076 problematic type from LWG 2586 discussion.
4077 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4078 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4079
4080 * configure.ac: Check for C11 timespec_get function.
4081 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4082 (openbsd): Likewise
4083 * config.h.in: Regenerate.
4084 * configure: Regenerate.
4085 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4086 std for C++17 and up.
4087
4088 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4089 * include/bits/stl_queue.h
4090 (priority_queue(const Compare&, const Container&, const Alloc&))
4091 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4092 make_heap.
4093 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4094
4095 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4096 * include/bits/stl_queue.h (queue, priority_queue): Add static
4097 assertions to enforce LWG 2566 requirement on value_type.
4098 * include/bits/stl_stack.h (stack): Likewise.
4099
4100 PR middle-end/89303
4101 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4102
4103 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4104 * include/bits/std_abs.h: Add comment about LWG 2735.
4105 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4106
4107 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4108
4109 PR libstdc++/89345
4110 * include/std/version [__cpp_impl_destroying_delete]
4111 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4112 * libsupc++/new [__cpp_impl_destroying_delete]
4113 (__cpp_lib_destroying_delete): Likewise.
4114 (destroying_delete_t, destroying_delete): Likewise, but define even
4115 when __cpp_impl_destroying_delete is not defined.
4116 * testsuite/18_support/destroying_delete.cc: New test.
4117
4118 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4119
4120 PR libstdc++/89023
4121 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4122 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4123 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4124 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4125
4126 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4127
4128 PR libstdc++/71044
4129 * include/bits/fs_path.h (path::has_root_name)
4130 (path::has_root_directory, path::has_root_path)
4131 (path::has_relative_path, path::has_parent_path)
4132 (path::has_filename, path::has_stem, path::has_extension)
4133 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4134 noexcept.
4135 * src/c++17/fs_path.cc (path::has_root_name)
4136 (path::has_root_directory, path::has_root_path)
4137 (path::has_relative_path, path::has_parent_path)
4138 (path::has_filename, path::_M_find_extension): Add noexcept.
4139
4140 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4141
4142 PR libstdc++/89102 (partial)
4143 * include/std/type_traits (common_type<>): Define.
4144 (common_type<T>): Derive from common_type<T, T>.
4145 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4146 Test zero-length template argument list.
4147 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4148 Test additional single argument cases.
4149 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4150 Adjust expected error.
4151
4152 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4153
4154 PR libstdc++/89128
4155 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4156 guides.
4157 * include/bits/stl_stack.h (stack): Likewise.
4158 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4159 * testsuite/23_containers/queue/deduction.cc: New test.
4160 * testsuite/23_containers/stack/deduction.cc: New test.
4161
4162 PR libstdc++/89194
4163 * include/std/type_traits (__is_convertible_helper)
4164 (__is_convertible_helper<_From, _To, false>): Revert changes to
4165 support is_nothrow_convertible.
4166 (__is_nt_convertible_helper): New helper.
4167 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4168
4169 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4170 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4171
4172 PR libstdc++/89130
4173 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4174 __is_alloc_insertable_impl. Replace single type member with two
4175 members, one for each of copy and move insertable.
4176 (__is_move_insertable): New trait for internal use.
4177 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4178 (vector::_S_nothrow_relocate(true_type)): New functions to
4179 conditionally check if __relocate_a can throw.
4180 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4181 on __is_move_insertable.
4182 (vector::_S_do_relocate): New overloaded functions to conditionally
4183 call __relocate_a.
4184 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4185 based on _S_use_relocate.
4186 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4187 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4188 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4189
4190 PR libstdc++/89090
4191 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4192 parameter unnamed. Add message to static assertion.
4193 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4194 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4195 in C++11 code.
4196
4197 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4198
4199 PR libstdc++/87106
4200 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4201 Rename...
4202 (__is_bitwise_relocatable): ... to this.
4203 (__relocate_a_1): Adapt.
4204 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4205 (__is_bitwise_relocatable): ... to this.
4206
4207 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4208
4209 PR libstdc++/89117
4210 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4211 final component as well as from _M_pathname. Append the dot using
4212 operator+= instead of only to _M_pathname.
4213 (path::_M_find_extension): Reformat slightly.
4214 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4215 Add more test cases.
4216
4217 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4218
4219 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4220
4221 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4222
4223 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4224 constexpr specifiers from arg and proj.
4225
4226 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4227 __shared_ptr instantiations used by gcc4-compatible ABI.
4228
4229 * include/experimental/forward_list (experimental::erase): Qualify
4230 call to erase_if.
4231 * include/experimental/list (experimental::erase): Likewise.
4232 * include/std/forward_list (std::erase): Likewise.
4233 * include/std/list (std::erase): Likewise.
4234
4235 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4236 C++2a.
4237 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4238 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4239 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4240 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4241 * testsuite/ext/array_allocator/26875.cc: Likewise.
4242 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4243 * testsuite/util/replacement_memory_operators.h: Likewise.
4244 * testsuite/util/testsuite_allocator.h: Likewise.
4245
4246 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4247 normal mode vector, even for debug mode.
4248 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4249 Define alias template for normal mode vector.
4250
4251 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4252
4253 PR libstdc++/68737
4254 * config/locale/generic/c_locale.h (__convert_from_v)
4255 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4256 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4257 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4258 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4259
4260 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4261
4262 PR libstdc++/88840
4263 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4264 data member with static member function _S_use_relocate().
4265 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4266 (vector::_M_default_append): Use _S_use_relocate() instead of
4267 __use_relocate.
4268
4269 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4270 sign of results.
4271
4272 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4273
4274 PR libstdc++/88740
4275 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4276 write to stderr instead of using printf.
4277
4278 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4279
4280 PR libstdc++/86590
4281 * include/bits/char_traits.h (__constant_string_p,
4282 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4283 available.
4284
4285 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4286
4287 Implement C++20 P0600r1.
4288 * include/backward/hash_map: Add nodiscard attribute to empty.
4289 * include/backward/hash_set: Likewise.
4290 * backward/hashtable.h: Likewise.
4291 * include/bits/basic_string.h: Likewise.
4292 * include/bits/forward_list.h: Likewise.
4293 * include/bits/hashtable.h: Likewise.
4294 * include/bits/regex.h: Likewise.
4295 * include/bits/stl_deque.h: Likewise.
4296 * include/bits/stl_list.h: Likewise.
4297 * include/bits/stl_map.h: Likewise.
4298 * include/bits/stl_multimap.h: Likewise.
4299 * include/bits/stl_multiset.h: Likewise.
4300 * include/bits/stl_queue.h: Likewise.
4301 * include/bits/stl_set.h: Likewise.
4302 * include/bits/stl_stack.h: Likewise.
4303 * include/bits/stl_tree.h: Likewise.
4304 * include/bits/stl_vector.h: Likewise.
4305 * include/bits/unordered_map.h: Likewise.
4306 * include/bits/unordered_set.h: Likewise.
4307 * include/debug/array: Likewise.
4308 * include/experimental/any: Likewise.
4309 * include/experimental/bits/fs_path.h: Likewise.
4310 * include/experimental/internet: Likewise.
4311 * include/experimental/string_view: Likewise.
4312 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4313 Likewise.
4314 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4315 Likewise.
4316 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4317 Likewise.
4318 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4319 Likewise.
4320 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4321 Likewise.
4322 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4323 Likewise.
4324 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4325 Likewise.
4326 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4327 Likewise.
4328 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4329 info_fn_imps.hpp: Likewise.
4330 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4331 left_child_next_sibling_heap_.hpp: Likewise.
4332 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4333 Likewise.
4334 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4335 Likewise.
4336 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4337 Likewise.
4338 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4339 Likewise.
4340 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4341 Likewise.
4342 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4343 Likewise.
4344 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4345 Likewise.
4346 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4347 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4348 * include/ext/rope: Likewise.
4349 * include/ext/slist: Likewise.
4350 * include/ext/vstring.h: Likewise.
4351 * include/profile/array: Likewise.
4352 * include/std/array: Likewise.
4353 * include/tr1/array: Likewise.
4354 * include/tr1/hashtable.h: Likewise.
4355 * include/tr1/regex: Likewise.
4356 * include/tr2/dynamic_bitset: Likewise.
4357 * include/bits/alloc_traits.h: Add nodiscard attribute to
4358 allocate.
4359 * include/experimental/memory_resource: Likewise.
4360 * include/ext/alloc_traits.h: Likewise.
4361 * include/ext/array_allocator.h: Likewise.
4362 * include/ext/bitmap_allocator.h: Likewise.
4363 * include/ext/debug_allocator.h: Likewise.
4364 * include/ext/extptr_allocator.h: Likewise.
4365 * include/ext/mt_allocator.h: Likewise.
4366 * include/ext/new_allocator.h: Likewise.
4367 * include/ext/pool_allocator.h: Likewise.
4368 * include/ext/throw_allocator.h: Likewise.
4369 * include/std/scoped_allocator: Likewise.
4370 * libsupc++/eh_alloc.cc: Likewise.
4371 * include/std/future: Add nodiscard attribute to async.
4372 * libsupc++/new: Add nodiscard attribute to new.
4373
4374 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4375
4376 PR libstdc++/87514
4377 PR libstdc++/87520
4378 PR libstdc++/88782
4379 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4380 * include/bits/shared_ptr.h
4381 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4382 (allocate_shared): Change to use new tag type.
4383 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4384 Declare new member function.
4385 (_Sp_alloc_shared_tag): Define new type.
4386 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4387 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4388 _Sp_make_shared_tag::_S_eq to check type_info.
4389 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4390 Constrain to prevent being called with _Sp_alloc_shared_tag.
4391 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4392 Replace constructor with ...
4393 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4394 reference parameter so address of the new object can be returned to
4395 the caller. Obtain the allocator from the tag type.
4396 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4397 constructor with ...
4398 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4399 to the __shared_count constructor.
4400 (__allocate_shared): Change to use new tag type.
4401 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4402
4403 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4404
4405 * src/c++17/fs_ops.cc
4406 (equivalent(const path&, const path&, error_code&))
4407 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4408 compare files instead of relying on incomplete info returned by stat.
4409
4410 PR libstdc++/88884
4411 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4412 if the path is already absolute.
4413 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4414 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4415
4416 PR libstdc++/88881
4417 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4418 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4419 of filesystem::exists.
4420 (create_directories(const path&, error_code&)): Add assertions.
4421 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4422 Add workaround for bug in _wstat for paths with trailing slash.
4423 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4424 for expected behaviour on mingw.
4425 * testsuite/experimental/filesystem/operations/create_directories.cc:
4426 Likewise.
4427 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4428 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4429 not test permissions on mingw targets.
4430
4431 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4432
4433 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4434 constructors and open members taking wide strings. Fix patterns for
4435 filesystem::path members to match wstring_view parameters. Add
4436 exports for shared_ptr members used by directory iterators.
4437 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4438 error code parameter if the file doesn't exist.
4439 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4440 Likewise.
4441 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4442 values for mingw targets, where "/" is not an absolute path. Do not
4443 test symlinks on mingw targets.
4444 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4445 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4446 on mingw targets.
4447 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4448 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4449 that each component of the path is created.
4450 * testsuite/experimental/filesystem/operations/create_directories.cc:
4451 Likewise.
4452 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4453 permissions on mingw targets.
4454 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4455 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4456 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4457 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4458 mingw targets.
4459 * testsuite/experimental/filesystem/operations/permissions.cc:
4460 Likewise.
4461 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4462 symlinks or permissions on mingw targets.
4463 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4464 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4465 symlinks on mingw targets.
4466 * testsuite/experimental/filesystem/operations/remove_all.cc:
4467 Likewise.
4468 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4469 permissions on mingw targets.
4470 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4471 test symlinks on mingw targets.
4472 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4473 for mingw targets.
4474
4475 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4476
4477 PR libstdc++/88738
4478 Warn about unused comparisons of shared_ptr/unique_ptr
4479 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4480 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4481 <, <=, >, >= for shared_ptr.
4482 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4483
4484 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4485
4486 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4487 as 201611L, because P0497R0 changes are supported.
4488 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4489
4490 * include/bits/erase_if.h [__cplusplus > 201703L]
4491 (__cpp_lib_erase_if): Only define for C++2a.
4492 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4493 (__cpp_lib_null_iterators): Define.
4494 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4495 (__cpp_lib_null_iterators): Define.
4496 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4497
4498 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4499 status.
4500 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4501 Define.
4502 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4503 changes are supported.
4504 * include/std/optional (__cpp_lib_optional): Likewise.
4505 * include/std/variant (__cpp_lib_variant): Likewise.
4506 * include/std/version [!__STRICT_ANSI__]
4507 (__cpp_lib_uncaught_exceptions): Define as long integer.
4508 [__cplusplus >= 201703L] (__cpp_lib_any)
4509 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4510 (__cpp_lib_variant): Define for C++17.
4511 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4512 as long integer.
4513 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4514 integer.
4515
4516 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4517
4518 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4519
4520 PR libstdc++/88811
4521 PR libstdc++/83306
4522 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4523 before second path.
4524 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4525 test.
4526
4527 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4528
4529 * doc/xml/manual/intro.xml: Include new section.
4530 * doc/xml/manual/status_cxx2017.xml: Document more
4531 implementation-defined properties of the library.
4532 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4533 * doc/html/*: Regenerate.
4534
4535 * include/bits/refwrap.h [__cplusplus > 201703L]
4536 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4537 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4538 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4539 for C++2a.
4540 (reference_wrapper::operator()): Add static assertion.
4541 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4542
4543 * include/std/chrono (duration_values::zero(), duration_values::min())
4544 (duration_values::max()): Add noexcept.
4545 (duration::zero(), duration::min(), duration::max()): Likewise.
4546 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4547 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4548 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4549
4550 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4551
4552 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4553
4554 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4555 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4556
4557 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4558
4559 PR libstdc++/88802
4560 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4561 specialization for C++17 (P0513R0, LWG 2817).
4562 * testsuite/20_util/hash/nullptr.cc: New test.
4563
4564 PR libstdc++/88125
4565 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4566 pattern for std::basic_stringbuf::str().
4567
4568 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4569 basic_ostream::operator<< patterns.
4570
4571 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4572
4573 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4574 test failures on targets with 32-bit time_t.
4575
4576 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4577 * include/std/deque: Likewise.
4578 * include/std/forward_list: Likewise.
4579 * include/std/list: Likewise.
4580 * include/std/string: Likewise.
4581 * include/std/vector: Likewise.
4582 * include/std/version: Likewise.
4583 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4584 * testsuite/23_containers/deque/erasure.cc: Likewise.
4585 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4586 * testsuite/23_containers/list/erasure.cc: Likewise.
4587 * testsuite/23_containers/map/erasure.cc: Likewise.
4588 * testsuite/23_containers/set/erasure.cc: Likewise.
4589 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4590 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4591 * testsuite/23_containers/vector/erasure.cc: Likewise.
4592
4593 * include/experimental/internet [AI_NUMERICSERV]
4594 (resolver_base::numeric_service): Define conditionally.
4595 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4596 conditionally.
4597 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4598 Likewise.
4599
4600 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4601 Jonathan Wakely <jwakely@redhat.com>
4602
4603 Implement LWG 2221
4604 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4605 (GLIBCXX_3.4.26): Add new exports.
4606 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4607 correct list of sources.
4608 * include/Makefile.in: Regenerate.
4609 * include/std/ostream (operator<<(nullptr_t)): New member function.
4610 * src/c++17/ostream-inst.cc: New file.
4611 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4612 test.
4613
4614 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4615
4616 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4617 of the source file containing the caller.
4618 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4619 directories created by test.
4620 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4621 Likewise.
4622 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4623 Likewise.
4624 * testsuite/experimental/filesystem/iterators/
4625 recursive_directory_iterator.cc: Likewise.
4626
4627 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4628
4629 PR tree-optimization/88775
4630 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4631 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4632 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4633 instead of __builtin_constant_p if available. Don't bother with
4634 the pointer comparison in C++11 and earlier.
4635
4636 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4637
4638 PR other/16615
4639
4640 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4641 with "cannot".
4642
4643 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4644
4645 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4646 for filesystem::path. Give variables more distinctive names.
4647
4648 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4649 member function to perform non-trivial assignment.
4650 (_Optional_payload_base::_M_move_assign): Likewise.
4651 (_Optional_payload<T, true, false, true>::operator=)
4652 (_Optional_payload<T, true, true, false>::operator=)
4653 (_Optional_payload<T, true, false, false>::operator=): Call
4654 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4655
4656 PR libstdc++/88204
4657 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4658 test std::complex<long double> if long double format is IBM128.
4659 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4660 Likewise.
4661
4662 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4663
4664 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4665 for old std::unique_ptr layout.
4666 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4667 to become valueless. Add filesystem::path tests.
4668
4669 PR libstdc++/87855
4670 * include/std/optional (_Optional_payload_base): New class template
4671 for common code hoisted from _Optional_payload specializations. Use
4672 a template for the union, to allow a partial specialization for
4673 types with non-trivial destructors. Add constructors for in-place
4674 initialization to the union.
4675 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4676 to perform non-trivial copy construction, instead of relying on
4677 non-standard copy elision in a delegating constructor.
4678 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4679 non-trivial move construction.
4680 (_Optional_payload): Derive from _Optional_payload_base and use it
4681 for everything except the non-trivial assignment operators, which are
4682 defined as needed.
4683 (_Optional_payload<false, C, M>): Derive from the specialization
4684 _Optional_payload<true, false, false> and add a destructor.
4685 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4686 Forward to corresponding members of _Optional_payload.
4687 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4688 Hoist common members from _Optional_base.
4689 (_Optional_base): Make all members and base class public.
4690 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4691 _Optional_base_impl.
4692 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4693 support for new std::optional layout.
4694 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4695
4696 PR libstdc++/88066
4697 * include/bits/locale_conv.h: Use <> for includes not "".
4698 * include/ext/random: Likewise.
4699 * include/ext/vstring.h: Likewise.
4700
4701 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4702
4703 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4704 (GLIBCXX_3.4.21): Likewise.
4705
4706 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4707
4708 PR libstdc++/88749
4709 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4710 to match the one that controls whether utimbuf and utime are declared.
4711
4712 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4713
4714 PR libstdc++/87787
4715 * include/bits/char_traits.h (char_traits::move): Do not pass null
4716 pointers to memmove.
4717 * include/bits/locale_facets.h
4718 (ctype<char>::widen(const char*, const char*, char*)): Do not
4719 pass null pointers to memcpy.
4720 (ctype<char>::narrow(const char*, const char*, char, char*)):
4721 Likewise.
4722 (ctype<char>::do_widen(const char*, const char*, char*)):
4723 Likewise.
4724 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4725 Likewise.
4726
4727 * doc/xml/manual/spine.xml: Update copyright years.
4728 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4729 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4730 for C++17 filesystem library.
4731 * doc/html/*: Regenerate.
4732
4733 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4734 * config.h.in: Regenerate.
4735 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4736 alphabetically and add missing entries for copy_symlink,
4737 hard_link_count, rename, and resize_file.
4738 * configure: Regenerate.
4739 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4740 used unconditionally.
4741 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4742 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4743 supports truncating to zero length.
4744 * testsuite/27_io/filesystem/operations/all.cc: New test.
4745 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4746
4747 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4748
4749 PR libstdc++/86756
4750 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4751 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4752 * config.h.in: Regenerate.
4753 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4754 remaining std::filesystem types and functions.
4755 * configure: Regenerate.
4756 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4757 * src/c++17/Makefile.in: Regenerate.
4758 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4759 here, and change name of included file.
4760 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4761 here, and change name of included file.
4762 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4763 path to dir-common.h.
4764 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4765 path to ops-common.h. Disable -Wunused-parameter warnings.
4766 (internal_file_clock): Define unconditionally.
4767 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4768 define.
4769 (do_copy_file, do_space): Move definitions to ops.common.h.
4770 (copy, file_size, hard_link_count, last_write_time, space): Only
4771 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4772 report an error.
4773 (last_write_time, read_symlink): Remove unused attributes from
4774 parameters.
4775 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4776 * src/filesystem/Makefile.in: Regenerate.
4777 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4778 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4779 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4780 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4781 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4782 dummy types and functions instead of using #error.
4783 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4784 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4785 in terms of stat.
4786 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4787 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4788 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4789 to account for new namespace.
4790 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4791 -lstdc++fs from dg-options.
4792 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4793 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4794 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4795 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4796 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4797 Likewise.
4798 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4799 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4800 Likewise.
4801 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4802 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4803 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4804 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4805 * testsuite/27_io/filesystem/operations/create_directories.cc:
4806 Likewise.
4807 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4808 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4809 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4810 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4811 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4812 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4813 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4814 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4815 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4816 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4817 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4818 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4819 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4820 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4821 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4822 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4823 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4824 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4825 Likewise.
4826 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4827
4828
4829 PR libstdc++/86756
4830 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4831 typeinfo and vtables less greedy.
4832 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4833 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4834 * src/c++17/Makefile.in: Regenerate.
4835 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4836 here, and change name of included file.
4837 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4838 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4839 from sources.
4840 * src/filesystem/Makefile.in: Regenerate.
4841 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4842 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4843 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4844 from dg-options and remove dg-require-filesystem-ts.
4845 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4846 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4847 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4848 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4849 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4850 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4851 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4852 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4853 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4854 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4855 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4856 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4857 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4858 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4859 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4860 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4861 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4862 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4863 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4864 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4865 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4866 Likewise.
4867 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4868 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4869 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4870 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4871 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4872 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4873 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4874 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4875 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4876 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4877 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4878 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4879 Likewise.
4880 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4881 Likewise.
4882 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4883 Likewise.
4884 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4885 Likewise.
4886 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4887 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4888 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4889 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4890 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4891 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4892 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4893 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4894 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4895 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4896 Likewise.
4897 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4898 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4899 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4900 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4901 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4902
4903 PR libstdc++/87431
4904 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4905 Check is_trivially_copyable instead of is_scalar.
4906 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4907 contained value can throw and its type is trivially copyable then
4908 construct into a temporary variant and move from it, to provide the
4909 strong exception safety guarantee.
4910 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4911 Likewise.
4912 * testsuite/20_util/variant/87431.cc: New test.
4913 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4914 conversion causes valueless state.
4915
4916 PR libstdc++/88607
4917 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4918 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4919 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4920 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4921 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4922
4923 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4924
4925 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4926 (file_time_type): Redefine in terms of __file_clock.
4927 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4928 overflow.
4929 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4930 internal linkage.
4931 (internal_file_lock): New helper type for accessing __file_clock.
4932 (do_copy_file): Use internal_file_lock to convert system time to
4933 file_time_type.
4934 (last_write_time(const path&, error_code&)): Likewise.
4935 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4936
4937 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4938
4939 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4940 for const member functions of std::basic_string.
4941 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4942 in C++17.
4943 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4944 Make non-standard constructor private.
4945 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4946 Likewise.
4947 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4948 explicit instantiations for C++17 as well as earlier dialects.
4949 * src/c++17/Makefile.am: Add new source files.
4950 * src/c++17/Makefile.in: Regenerate.
4951 * src/c++17/cow-string-inst.cc: New file defining explicit
4952 instantiations for basic_string member functions added in C++17.
4953 * src/c++17/string-inst.cc: Likewise.
4954
4955 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4956 copy/move constructors for old std::basic_string.
4957 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4958 (basic_string::reference, basic_string::const_reference): Define
4959 as plain references for C++11 and later.
4960 (basic_string::basic_string()): Put constructor body outside
4961 preprocessor conditional groups.
4962 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4963 instead of copying it.
4964 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4965 Define.
4966 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4967 Define.
4968 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4969 cases for old basic_string.
4970 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4971 allocator-extended constructors unconditionally. Add extra members to
4972 allocator type when using old string ABI.
4973 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4974 for old string ABI.
4975 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4976
4977 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4978 -fno-inline added to test flags.
4979
4980 * testsuite/21_strings/basic_string/requirements/
4981 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4982
4983 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4984 assertion failures with old std::string ABI.
4985
4986 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4987 with ...
4988 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4989 functions that will only erase elements at the end.
4990 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4991 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4992 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4993 of erase(p, end()).
4994 (path::_List::pop_back()): Define.
4995 (path::_List::_M_erase_from(const_iterator)): Define.
4996 (path::operator/=(const path&)): Use pop_back to remove last component
4997 and _M_erase_from to remove multiple components.
4998 (path::_M_append(basic_string_view<value_type>)): Likewise.
4999 (path::operator+=(const path&)): Likewise.
5000 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5001 (path::remove_filename()): Likewise.
5002 (path::lexically_normal()): Use _List::_Impl iterators instead of
5003 path::iterator. Use pop_back to remove components from the end. Clear
5004 trailing filename, instead of using erase(const_iterator) to remove
5005 a non-final component.
5006 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5007 additional cases.
5008 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5009
5010 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5011 incorrect treatment of empty filename after trailing slash.
5012 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5013
5014 * testsuite/21_strings/basic_string/modifiers/assign/char/
5015 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5016 to test flags.
5017 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5018 move_assign_optim.cc: Likewise.
5019
5020 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5021 Jakub Jelinek <jakub@redhat.com>
5022
5023 PR libstdc++/88607
5024 * include/experimental/memory: Replace UTF-8 quote characters.
5025 * include/std/future: Replace UTF-8 "em dash" characters.
5026
5027 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5028
5029 PR libstdc++/88607
5030 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5031 * include/debug/forward_list: Likewise.
5032 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5033 character.
5034 * include/experimental/chrono: Likewise.
5035 * include/experimental/functional: Likewise.
5036 * include/experimental/ratio: Likewise.
5037 * include/experimental/system_error: Likewise.
5038 * include/experimental/tuple: Likewise.
5039 * include/experimental/type_traits: Likewise.
5040 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5041 * include/parallel/multiseq_selection.h: Likewise.
5042
5043 PR libstdc++/88681
5044 * config/abi/pre/gnu.ver: Add missing exports.
5045 * testsuite/22_locale/collate_byname/88681.cc: New test.
5046 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5047 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5048
5049 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5050
5051 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5052 initializer_list<value_type> and from input iterator ranges.
5053 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5054
5055 * testsuite/experimental/string_view/element_access/char/empty.cc:
5056 Fix year range in copyright header.
5057
5058 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5059
5060 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5061 Fix year range in copyright header.
5062
5063 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5064
5065 Update copyright years.
5066 \f
5067 Copyright (C) 2019 Free Software Foundation, Inc.
5068
5069 Copying and distribution of this file, with or without modification,
5070 are permitted in any medium without royalty provided the copyright
5071 notice and this notice are preserved.