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