1 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
3 * include/bits/algorithmfwd.h: Change title of doc group.
4 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
6 * include/bits/stl_numeric.h: Define doc group and add algos to it.
7 * include/std/numeric (__is_random_access_iter): New internal trait.
8 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
9 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
10 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
11 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
12 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
13 * testsuite/26_numerics/reduce/1.cc: New test.
14 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
15 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
16 * testsuite/26_numerics/transform_reduce/1.cc: New test.
17 * testsuite/util/testsuite_iterators.h (test_container::size()): New
20 * include/c_global/cstddef (std::byte): Perform arithmetic operations
21 in unsigned int to avoid promotion (LWG 2950).
23 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
25 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
28 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
30 PR libstdc++/90281 Fix string conversions for filesystem::path
31 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
32 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
33 __str_codecvt_in_all to fail for partial conversions and throw on
35 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
36 (path::_Cvt<char8_t>): Add explicit specialization.
37 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
39 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
40 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
41 instead of codecvt_utf8. Use __str_codecvt_in_all and
42 __str_codecvt_out_all.
43 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
44 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
45 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
46 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
47 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
48 after converting to UTF-8.
49 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
51 (path::string): Fix initialization of string types with different
53 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
54 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
55 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
57 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
58 return false for partial conversions.
59 * include/experimental/bits/fs_path.h (u8path):
60 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
61 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
62 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
63 instead of codecvt_utf8. Use __str_codecvt_in_all and
64 __str_codecvt_out_all.
65 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
66 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
67 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
68 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
69 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
70 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
72 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
73 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
74 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
76 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
77 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
78 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
79 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
80 strings and with Unicode characters outside the basic multilingual
82 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
83 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
84 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
85 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
86 * testsuite/experimental/filesystem/path/native/string.cc: Test with
87 empty strings and with Unicode characters outside the basic
90 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
91 Jonathan Wakely <jwakely@redhat.com>
93 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
94 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
95 deallocate node if insertion fails.
96 (_Hashtable::_M_insert_multi_node): Likewise.
97 (_Hashtable::_M_reinsert_node): Pass additional key argument.
98 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
99 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
100 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
101 (_Hashtable::extract(const _Key&)): Likewise.
102 (_Hashtable::_M_merge_unique): Pass additional key argument.
103 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
105 (_Hashtable::_M_insert): Likewise.
106 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
107 (_Hashtable_alloc): Add comments to functions with misleading names.
109 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
111 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
113 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
114 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
115 header for std::allocator.
116 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
117 using-declaration for std::size_t.
118 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
120 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
122 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
123 * testsuite/experimental/map/erasure.cc: Include <string> for
125 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
127 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
129 * include/experimental/type_traits (experimental::nonesuch): Use
130 pragma to disable -Wctor-dtor-privacy warnings.
131 * include/std/type_traits (__is_convertible_helper<From, To, false>)
132 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
134 * include/std/version (__cpp_lib_bind_front): Add missing macro.
136 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
138 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
139 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
140 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
141 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
143 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
144 (variant::emplace): Change static_assert messages from "should be"
146 (hash<monostate>::operator()): Remove name of unused parameter.
148 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
151 * include/Makefile.am: Add new <bits/charconv.h> header.
152 * include/Makefile.in: Regenerate.
153 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
154 (to_string(long), to_string(unsigned long), to_string(long long))
155 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
156 * include/bits/charconv.h: New header.
157 (__detail::__to_chars_len): Move here from <charconv>.
158 (__detail::__to_chars_10_impl): New function extracted from
159 __detail::__to_chars_10.
160 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
161 (__to_chars_unsigned_type): New class template that reuses
162 __make_unsigned_selector_base::__select to pick a type.
163 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
164 (__detail::__to_chars_len): Move to new header.
165 (__detail::__to_chars_10): Add inline specifier. Move code doing the
166 output to __detail::__to_chars_10_impl and call that.
167 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
168 * testsuite/21_strings/basic_string/numeric_conversions/char/
169 to_string.cc: Fix reference in comment. Remove unused variable.
170 * testsuite/21_strings/basic_string/numeric_conversions/char/
171 to_string_int.cc: New test.
173 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
175 Fix ConstexprIterator requirements tests - No constexpr algorithms!
176 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
177 Replace copy with hand-rolled loop.
178 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
181 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
183 Test for C++20 p0858 - ConstexprIterator requirements.
184 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
186 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
189 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
191 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
193 * include/bits/c++config: Rename all macros of the form __PSTL* to
195 * include/std/algorithm: Likewise.
196 * include/std/execution: Likewise.
197 * include/std/numeric: Likewise.
198 * include/std/memory: Likewise.
199 * include/pstl/glue_memory_impl.h: Likewise.
200 * include/pstl/numeric_impl.h: Likewise.
201 * include/pstl/glue_memory_defs.h: Likewise.
202 * include/pstl/execution_defs.h: Likewise.
203 * include/pstl/utils.h: Likewise.
204 * include/pstl/algorithm_fwd.h: Likewise.
205 * include/pstl/unseq_backend_simd.h: Likewise.
206 * include/pstl/glue_execution_defs.h: Likewise.
207 * include/pstl/algorithm_impl.h: Likewise.
208 * include/pstl/parallel_impl.h: Likewise.
209 * include/pstl/memory_impl.h: Likewise.
210 * include/pstl/glue_numeric_defs.h: Likewise.
211 * include/pstl/parallel_backend_utils.h: Likewise.
212 * include/pstl/glue_algorithm_defs.h: Likewise.
213 * include/pstl/parallel_backend.h: Likewise.
214 * include/pstl/glue_numeric_impl.h: Likewise.
215 * include/pstl/parallel_backend_tbb.h: Likewise.
216 * include/pstl/numeric_fwd.h: Likewise.
217 * include/pstl/glue_algorithm_impl.h: Likewise.
218 * include/pstl/execution_impl.h: Likewise.
219 * include/pstl/pstl_config.h: Likewise.
220 * testsuite/util/pstl/pstl_test_config.h: Likewise.
221 * testsuite/util/pstl/test_utils.h: Likewise.
222 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
224 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
226 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
228 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
229 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
230 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
231 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
232 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
234 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
235 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
236 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
237 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
238 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
240 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
241 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
242 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
243 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
244 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
246 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
247 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
248 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
250 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
252 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
253 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
254 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
256 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
258 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
260 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
262 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
264 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
266 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
268 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
270 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
272 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
274 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
276 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
278 Rename header guards to be consistent with upstream project's
280 * include/pstl/glue_memory_impl.h: Rename all macros of the form
281 _PSTL_(.*)_H to _PSTL_\U\1_H.
282 * include/pstl/numeric_impl.h: Likewise.
283 * include/pstl/glue_memory_defs.h: Likewise.
284 * include/pstl/execution_defs.h: Likewise.
285 * include/pstl/utils.h: Likewise.
286 * include/pstl/algorithm_fwd.h: Likewise.
287 * include/pstl/unseq_backend_simd.h: Likewise.
288 * include/pstl/glue_execution_defs.h: Likewise.
289 * include/pstl/algorithm_impl.h: Likewise.
290 * include/pstl/parallel_impl.h: Likewise.
291 * include/pstl/memory_impl.h: Likewise.
292 * include/pstl/glue_numeric_defs.h: Likewise.
293 * include/pstl/parallel_backend_utils.h: Likewise.
294 * include/pstl/glue_algorithm_defs.h: Likewise.
295 * include/pstl/parallel_backend.h: Likewise.
296 * include/pstl/glue_numeric_impl.h: Likewise.
297 * include/pstl/parallel_backend_tbb.h: Likewise.
298 * include/pstl/numeric_fwd.h: Likewise.
299 * include/pstl/glue_algorithm_impl.h: Likewise.
300 * include/pstl/execution_impl.h: Likewise.
301 * include/pstl/pstl_config.h: Likewise.
302 * testsuite/util/pstl/pstl_test_config.h: Likewise.
304 Synchronize libstdc++ parallel algorithms with upstream
306 * include/pstl/algorithm_fwd.h: Synchronize with
307 upstream PSTL project.
308 * include/pstl/algorithm_impl.h: Likewise.
309 * include/pstl/execution_defs.h: Likewise.
310 * include/pstl/execution_impl.h: Likewise.
311 * include/pstl/glue_algorithm_impl.h: Likewise.
312 * include/pstl/glue_execution_defs.h: Likewise.
313 * include/pstl/numeric_fwd.h: Likewise.
314 * include/pstl/numeric_impl.h: Likewise.
315 * include/pstl/parallel_backend.h: Likewise.
316 * include/pstl/pstl_config.h: Likewise.
317 * include/pstl/unseq_backend_simd.h: Likewise.
318 * include/pstl/parallel_backend_serial.h: New file.
319 * include/Makefile.am (pstl_headers): Add
320 parallel_backend_serial.h.
321 * include/Makefile.in: Regenerate.
323 Clean up non-conforming names
324 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
325 Uglfiy copy_range1 and copy_range2
326 (__pattern_walk2_n): Rename local n to __n
327 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
328 Rename parameter _T to _Tp.
330 Integrate non-TBB serial backend support
331 * include/bits/c++config: Adjust TBB detection logic to select serial
332 PSTL backend if no TBB present.
333 * testsuite/utils/pstl/test_utils.h: Remove check for
334 _PSTL_USE_PAR_POLICIES
336 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
338 * testsuite/24_iterators/container_access.cc: Move dg-options before
339 dg-do directive so the target check uses the -std option.
342 * configure: Regenerate.
343 * src/Makefile.am (stamp-debug): Also test for missing makefile.
344 * src/Makefile.in: Regenerate.
346 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
348 * include/std/array: Do not include <stdexcept>.
349 * include/std/optional: Include <exception> and
350 <bits/exception_defines.h> instead of <stdexcept>.
351 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
353 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
355 * testsuite/23_containers/map/erasure.cc: Include <string>.
356 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
358 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
359 dg-prune-output for different C++98 diagnostic.
360 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
362 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
364 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
366 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
368 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
370 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
372 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
374 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
376 * testsuite/23_containers/vector/requirements/dr438/
377 constructor_1_neg.cc: Likewise.
378 * testsuite/23_containers/vector/requirements/dr438/
379 constructor_2_neg.cc: Likewise.
380 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
382 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
384 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
385 Do not test allocator rebinding extension for C++2a.
386 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
387 dg-do directive for C++17 and C++2a.
389 * testsuite/23_containers/deque/requirements/explicit_instantiation/
390 1_c++0x.cc: Remove redundant test.
391 * testsuite/23_containers/deque/requirements/explicit_instantiation/
392 2.cc: Use target selector instead of preprocessor condition.
393 * testsuite/23_containers/deque/requirements/explicit_instantiation/
394 3.cc: Do not run test for C++2a.
395 * testsuite/23_containers/forward_list/requirements/
396 explicit_instantiation/3.cc: Likewise.
397 * testsuite/23_containers/forward_list/requirements/
398 explicit_instantiation/5.cc: Do not test allocator rebinding extension
400 * testsuite/23_containers/list/requirements/explicit_instantiation/
401 1_c++0x.cc: Remove redundant test.
402 * testsuite/23_containers/list/requirements/explicit_instantiation/
403 2.cc: Use target selector instead of preprocessor condition.
404 * testsuite/23_containers/list/requirements/explicit_instantiation/
405 3.cc: Do not run test for C++2a.
406 * testsuite/23_containers/list/requirements/explicit_instantiation/
407 5.cc: Do not test allocator rebinding extension for C++2a.
408 * testsuite/23_containers/map/requirements/explicit_instantiation/
409 1_c++0x.cc: Remove redundant test.
410 * testsuite/23_containers/map/requirements/explicit_instantiation/
411 2.cc: Adjust comment.
412 * testsuite/23_containers/map/requirements/explicit_instantiation/
413 3.cc: Do not run test for C++2a.
414 * testsuite/23_containers/map/requirements/explicit_instantiation/
415 5.cc: Do not test allocator rebinding extension for C++2a.
416 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
417 1_c++0x.cc: Remove redundant test.
418 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
419 3.cc: Do not run test for C++2a.
420 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
421 5.cc: Do not test allocator rebinding extension for C++2a.
422 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
423 3.cc: Do not run test for C++2a.
424 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
425 5.cc: Do not test allocator rebinding extension for C++2a.
426 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
427 Do not run test for C++2a.
428 * testsuite/23_containers/set/requirements/explicit_instantiation/
429 1_c++0x.cc: Remove redundant test.
430 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
431 Do not test allocator rebinding extension for C++2a.
432 * testsuite/23_containers/unordered_map/requirements/
433 explicit_instantiation/3.cc: Likewise.
434 * testsuite/23_containers/unordered_map/requirements/
435 explicit_instantiation/5.cc: Do not test allocator rebinding extension
437 * testsuite/23_containers/unordered_multimap/requirements/
438 explicit_instantiation/3.cc: Do not run test for C++2a.
439 * testsuite/23_containers/unordered_multimap/requirements/
440 explicit_instantiation/5.cc: Do not test allocator rebinding extension
442 * testsuite/23_containers/unordered_multiset/requirements/
443 explicit_instantiation/3.cc: Do not run test for C++2a.
444 * testsuite/23_containers/unordered_multiset/requirements/
445 explicit_instantiation/5.cc: Do not test allocator rebinding extension
447 * testsuite/23_containers/unordered_set/requirements/
448 explicit_instantiation/3.cc: Do not run test for C++2a.
449 * testsuite/23_containers/unordered_set/requirements/
450 explicit_instantiation/5.cc: Do not test allocator rebinding extension
452 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
453 2.cc: Remove redundant test.
454 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
455 3.cc: Do not run test for C++2a.
456 * testsuite/23_containers/vector/requirements/explicit_instantiation/
459 * include/std/type_traits (is_empty, is_polymorphic, is_final)
460 (is_abstract, is_aggregate): Remove static_assert.
461 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
463 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
464 missing -std=gnu++17 option.
465 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
466 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
467 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
470 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
471 * testsuite/18_support/set_unexpected.cc: Likewise.
472 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
474 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
475 function to be valid in C++11.
476 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
477 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
478 include Library Fundamentals or Networking headers in C++11 mode.
479 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
481 * include/std/tuple (_TC): Replace with _TupleConstraints.
482 (_TupleConstraints): New helper for SFINAE constraints, with more
483 expressive member functions to reduce duplication when used.
484 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
485 (tuple::_TCC): Replace dummy type parameter with bool non-type
486 parameter that can be used to check the pack size.
487 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
488 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
489 checking constraints in constructors.
490 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
492 (tuple::tuple): Use new helpers to reduce repitition in constraints.
493 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
494 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
495 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
496 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
497 constraints in constructors.
498 (tuple::__is_alloc_arg()): New SFINAE helpers.
499 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
501 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
502 * testsuite/20_util/tuple/cons/90700.cc: New test.
503 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
504 to meet new constraint on allocator-extended default constructor.
506 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
508 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
509 * include/bits/stl_multimap.h (multimap): Likewise.
511 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
513 Rename variables and cleanup comments.
514 * include/bits/hashtable_policy.h
515 * include/bits/hashtable.h
517 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
519 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
520 Fix bgcolor for P0340R3.
521 * doc/html/*: Regenerate.
524 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
525 <experimental/memory_resource>.
526 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
527 P0339R6, P0340R3, P1164R1 and P1357R1.
528 * doc/html/*: Regenerate.
530 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
531 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
532 allocator::value_type assertion for C++2a.
533 * include/bits/hashtable.h: Likewise.
534 * include/bits/stl_deque.h: Likewise.
535 * include/bits/stl_list.h: Likewise.
536 * include/bits/stl_map.h: Likewise.
537 * include/bits/stl_multimap.h: Likewise.
538 * include/bits/stl_multiset.h: Likewise.
539 * include/bits/stl_set.h: Likewise.
540 * include/bits/stl_vector.h: Likewise.
541 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
542 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
543 * testsuite/23_containers/list/48101-3_neg.cc: New test.
544 * testsuite/23_containers/map/48101-3_neg.cc: New test.
545 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
546 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
547 * testsuite/23_containers/set/48101-3_neg.cc: New test.
548 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
549 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
550 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
551 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
552 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
554 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
556 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
558 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
560 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
562 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
564 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
566 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
568 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
571 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
572 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
573 * libsupc++/eh_term_handler.h: New header defining
574 _GLIBCXX_DEFAULT_TERM_HANDLER.
575 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
576 (set_terminate): Restore default handler when argument is null.
577 (set_unexpected): Likewise.
578 * testsuite/18_support/set_terminate.cc: New test.
579 * testsuite/18_support/set_unexpected.cc: New test.
581 * include/backward/hashtable.h (size_t, ptrdiff_t)
582 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
583 (distance, vector, pair, __iterator_category): Remove
584 using-declarations that add these names to namespace __gnu_cxx.
585 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
586 * include/ext/debug_allocator.h (size_t): Likewise.
587 * include/ext/functional (size_t, unary_function, binary_function)
588 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
590 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
591 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
592 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
593 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
594 * include/ext/numeric (iota): Fix outdated comment.
595 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
596 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
597 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
598 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
599 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
601 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
602 (allocator, __true_type, __false_type): Likewise.
604 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
607 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
608 New helpers for checking preconditions in traits.
609 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
610 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
611 (is_destructible, is_nothrow_destructible, is_constructible)
612 (is_default_constructible, is_copy_constructible)
613 (is_move_constructible, is_nothrow_default_constructible)
614 (is_nothrow_constructible, is_nothrow_copy_constructible)
615 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
616 (is_nothrow_assignable, is_nothrow_copy_assignable)
617 (is_nothrow_move_assignable, is_trivially_constructible)
618 (is_trivially_copy_constructible, is_trivially_move_constructible)
619 is_trivially_assignable, is_trivially_copy_assignable)
620 (is_trivially_move_assignable, is_trivially_destructible)
621 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
622 (is_invocable_r, is_nothrow_invocable)
623 (has_unique_object_representations, is_aggregate): Add static_asserts
624 to make sure that type traits are not misused with incomplete types.
625 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
626 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
627 base characteristics without assertions that can be reused in other
629 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
630 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
632 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
633 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
634 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
635 * testsuite/20_util/is_class/value.cc: Check incomplete type.
636 * testsuite/20_util/is_function/value.cc: Likewise.
637 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
638 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
640 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
641 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
642 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
643 * testsuite/20_util/is_union/value.cc: Likewise.
644 * testsuite/20_util/is_void/value.cc: Likewise.
645 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
647 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
649 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
650 Add new private member function.
651 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
652 (random_device::_M_init_pretr1(const string&)): Call new private
653 member with string data.
654 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
656 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
657 test using COW strings.
658 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
659 a value from the device.
660 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
661 Fix typo in token string.
663 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
665 LWG2788 basic_string spurious use of a default constructible allocator
666 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
667 (basic_string::_M_replace_dispatch): Construct temporary string with
668 the current allocator.
669 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
670 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
672 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
674 * doc/xml/manual/diagnostics.xml: Update list of headers that define
676 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
677 section about new/delete overloads. Improve section on verbose
679 * doc/html/*: Regenerate.
681 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
682 P0811R3. Change status of P1353R0.
683 * doc/html/*: Regenerate.
685 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
686 documentation of implementation-defined types for [thread.req.native].
687 * doc/xml/manual/status_cxx2017.xml: Update documentation of
688 implementation-defined strings for [variant.bad.access]. Fix typo in
689 documentation of implementation-defined support for [fs.conform.9945].
690 * doc/html/*: Regenerate.
692 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
695 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
696 that fails on mingw-w64.
699 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
700 (status(const path&, error_code&)): Use parent_path() to remove
702 (symlink_status(const path&, error_code&)): Duplicate workaround for
703 bug in _wstat for paths with trailing slash.
704 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
706 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
707 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
709 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
710 once instead of building it iteratively.
712 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
714 PR libstdc++/85494 use rdseed and rand_s in std::random_device
715 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
716 the assembler supports rdseed.
717 * config.h.in: Regenerate.
718 * configure: Regenerate.
719 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
720 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
721 * doc/html/*: Regenerate.
722 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
723 * include/bits/random.h (random_device::random_device()): Always call
724 _M_init rather than _M_init_pretr1.
725 (random_device::random_device(const string&)): Likewise.
726 (random_device::operator()()): Always call _M_getval().
727 (random_device::_M_file): Replace first member of union with an
728 anonymous struct, with _M_file as its first member.
729 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
730 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
731 (USE_MT19937): Define if none of the above are defined.
732 (USE_POSIX_FILE_IO): Define.
733 (_M_strtoul): Remove.
734 [USE_RDSEED] (__x86_rdseed): Define new function.
735 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
736 (random_device::_M_init(const string&)): Initialize new union members.
737 Add support for "rdseed" and "rand_s" tokens. Decide what the
738 "default" token does according to which USE_* macros are defined.
739 [USE_POSIX_FILE_IO]: Store a file descriptor.
740 [USE_MT19937]: Forward to _M_init_pretr1 instead.
741 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
742 code from _M_strtoul.
743 [!USE_MT19937]: Call _M_init, transforming the old default token or
744 numeric tokens to "default".
745 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
746 (random_device::_M_getval()): Use new union members to obtain a
747 random number from the stored function pointer or file descriptor.
748 [USE_MT19937]: Obtain a value from the mt19937 engine.
749 (random_device::_M_getval_pretr1()): Call _M_getval().
750 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
752 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
753 * testsuite/26_numerics/random/random_device/85494.cc: New test.
755 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
758 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
759 _M_split_cmpts() for a path with multiple components.
760 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
761 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
762 components and reserve space in vector. Return early when there is
764 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
765 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
767 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
768 form of std::equals for C++11 compatibility.
770 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
772 * doc/xml/manual/appendix_contributing.xml: Update pointer to
773 C++ standard at ansi.org.
775 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
777 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
778 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
781 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
782 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
784 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
786 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
788 * testsuite/20_util/function_objects/invoke/3.cc: New test.
789 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
790 "compile" test to "run".
792 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
793 * doc/html/*: Regenerate.
794 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
795 rvalue aliasing constructor.
796 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
797 (reinterpret_pointer_cast): Add overloads taking rvalues.
798 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
799 Add rvalue aliasing constructor.
800 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
801 "run" and check return values as well as types.
802 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
803 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
804 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
805 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
808 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
809 * doc/xml/manual/intro.xml: Likewise.
810 * include/std/future (__create_task_state): Add default arguments
811 to make providing an allocator optional.
812 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
813 instead of delegating to another constructor.
814 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
815 define allocator-extended constructors for C++17 and later.
816 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
818 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
819 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
820 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
822 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
824 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
825 Don't run the libstdc++/83237 part on simulator targets.
827 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
829 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
831 * doc/html/*: Regenerate.
833 * include/experimental/any (__any_caster): Use RTTI if comparing
834 addresses fails, to support non-unique addresses in shared libraries.
835 * include/std/any (__any_caster): Likewise.
838 * include/experimental/any (__any_caster): Constrain to only be
839 callable for object types. Use remove_cv_t instead of decay_t.
840 If the type decays or isn't copy constructible, compare the manager
841 function to a dummy specialization.
842 (__any_caster): Add overload constrained for non-object types.
843 (any::_Manager_internal<_Op>): Add dummy specialization.
844 * testsuite/experimental/any/misc/any_cast.cc: Test function types
847 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
850 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
851 reversed arguments to uninitialized_copy_n.
852 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
853 is unchanged by copy assignment.
854 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
855 compare path components.
858 * include/experimental/memory_resource: Add system header pragma and
859 do not define anything unless compiled as C++14 or later.
860 (__resource_adaptor_common::__guaranteed_alignment): Remove.
861 (__resource_adaptor_imp::do_allocate): If the requested alignment
862 is a fundamental alignment then either allocate directly from _M_alloc
863 or call the new _M_allocate function.
864 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
865 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
866 of the allocator rebound to a POD type with the specified alignment.
867 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
868 * testsuite/experimental/memory_resource/new_delete_resource.cc:
869 Adjust expected allocation sizes.
870 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
871 xfail for Solaris x86.
873 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
875 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
876 * include/pstl/execution_defs.h (__enable_if_execution_policy):
877 Use std::__remove_cvref_t when building with GCC.
879 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
882 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
883 Use "additional_flags" to pass -ltbb to v3_target_compile command.
884 Use check_v3_target_prop_cached to cache the result of the test.
886 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
888 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
891 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
892 Changed v3_target_compile check from preprocess to executable.
893 Added "-ltbb" to v3_target_compile flags.
895 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
897 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
898 Add check for Thread Building Blocks 2018 or later.
900 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
902 * testsuite/experimental/names.cc: Only include Networking TS headers
903 on targets with the necessary Gthreads support.
905 2019-05-20 Marek Polacek <polacek@redhat.com>
907 CWG 2094 - volatile scalars are trivially copyable.
909 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
910 result for volatile int.
912 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
914 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
915 * testsuite/experimental/names.cc: Include <experimental/filesystem>
918 PR c++/90532 Ensure __is_constructible(T[]) is false
919 * include/std/type_traits (__do_is_default_constructible_impl)
920 (__is_default_constructible_atom, __is_default_constructible_safe):
922 (is_default_constructible): Use is_constructible.
923 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
924 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
925 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
926 * testsuite/20_util/is_trivially_default_constructible/value.cc:
929 2019-05-20 Pádraig Brady <pbrady@fb.com>
931 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
932 to the deallocator with -fsized-deallocation.
934 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
936 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
937 test by passing correct alignment to deallocate function.
939 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
942 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
943 Raise exception if unique_ptr tuple member has unknown structure.
944 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
945 Adjust worker to support new __uniq_ptr_data base class. Do not
946 assume field called _M_head_impl is the first tuple element.
948 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
950 * include/bits/stl_deque.h
951 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
952 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
953 (_Deque_base::_Deque_impl_data): New.
954 (_Deque_base::_Deque_impl): Inherit latter.
955 (_Deque_base::_Deque_impl::_M_swap_data): Move...
956 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
957 (_Deque_base::_Deque_impl()): Add noexcept qualification.
958 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
959 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
960 (deque<>::deque()): Default.
961 (deque<>::deque(deque&&)): Default.
962 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
963 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
964 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
965 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
967 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
968 (deque<>::resize(size_type, const value_type&)): Share a single
970 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
972 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
973 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
974 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
975 * testsuite/23_containers/deque/allocator/default_init.cc: New.
977 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
980 * include/std/variant (holds_alternative, get, get_if): Improve
981 static assertion messages.
982 (bad_variant_access::bad_variant_access()): Change default message.
983 (__throw_bad_variant_access(bool)): New overload.
984 (get): Use new overload.
985 (visit, visit<R>): Improve exception message.
987 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
988 targets. Add more cases from P0608R3.
989 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
991 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
992 * include/experimental/type_traits (is_detected_exact)
993 (is_detected_exact_v): Likewise.
994 * include/pstl/execution_defs.h (is_execution_policy)
995 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
996 * include/pstl/execution_impl.h (__policy_traits): Likewise.
997 * testsuite/17_intro/names.cc: Check for more non-reserved names.
998 * testsuite/experimental/names.cc: New test.
1001 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1002 assertions from the destructor.
1003 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1004 Move static_assert for hash function to here.
1005 (_Hash_table_base::_M_equals): Move static_assert for equality
1007 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1009 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1010 the value directly instead of calling _S_value.
1011 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1012 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1013 _S_key(_Const_Link_type).
1014 * testsuite/23_containers/set/85965.cc: Check construction,
1015 destruction, assignment and size() do not trigger the assertions.
1016 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1017 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1019 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1020 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1021 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1022 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1023 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1024 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1025 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1027 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1028 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1031 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1033 * doc/html/*: Regenerate.
1034 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1035 of decay_t (P0777R1).
1037 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1039 Move from state of allocators (LWG2593)
1040 * include/bits/stl_deque.h
1041 (_Deque_base(_Deque_base&&, false_type)): Remove.
1042 (_Deque_base(_Deque_base&&, true_type)): Remove.
1043 (_Deque_base(_Deque_base&&)): Adapt.
1044 (_Deque_base::_M_move_impl()): Remove.
1045 * testsuite/util/testsuite_allocator.h
1046 (propagating_allocator(propagating_allocator&&)): Preserve move from
1048 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1050 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1052 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1053 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1054 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1056 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1058 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1059 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1061 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1063 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1065 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1067 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1069 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1071 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1073 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1076 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1078 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1079 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1081 * include/std/variant (__overload_set): Remove.
1083 (_Build_FUN): New class template to define a single FUN overload,
1084 with specializations to prevent unwanted conversions, as per P0608R3.
1085 (_Build_FUNs): New class template to build an overload set of FUN.
1086 (_FUN_type): New alias template to perform overload resolution.
1087 (__accepted_type): Use integer_constant base for failure case. Use
1088 _FUN_type for successful case.
1089 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1090 (variant::variant(_Tp&&)): Likewise.
1091 (variant::operator=(_Tp&&)): Likewise.
1093 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1094 Replace raw visitation with a runtime check for the valueless state
1095 and a non-raw visitor.
1096 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1097 (variant::index()): Remove branch.
1098 (variant::swap(variant&)): Use valueless_by_exception() instead of
1099 comparing the index to variant_npos, and add likelihood attribute.
1101 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1102 (_Hashtable_base::_Equal_hash_code): Define new class template.
1103 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1106 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1107 Replace with _M_get non-static member function.
1108 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1110 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1111 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1113 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1114 _S_get accessors for members in EBO helpers.
1115 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1116 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1118 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1120 (_Hashtable_base::_M_eq()): Remove non-const overload.
1122 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1124 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1126 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1128 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1131 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1133 * config/os/solaris/solaris2.10: Move to ...
1134 * config/os/solaris: ... this.
1135 * configure.host (os_include_dir): Adapt.
1136 (abi_baseline_pair): Remove Solaris 10 handling.
1137 * config/abi/post/i386-solaris2.10: Remove.
1138 * config/abi/post/sparc-solaris2.10: Remove.
1139 * config/abi/post/i386-solaris2.11: Rename to ...
1140 * config/abi/post/i386-solaris: ... this.
1141 * config/abi/post/sparc-solaris2.11: Rename to ...
1142 * config/abi/post/sparc-solaris: ... this.
1144 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1147 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1150 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1152 * include/std/variant (__visit_with_index): Remove typedef.
1153 (__deduce_visit_result): New tag type.
1154 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1155 visitation of possibly-valueless variants, forwarding to __do_visit
1156 with the relevant tag type.
1157 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1158 and make lambda return void.
1159 (__variant_construct): Likewise.
1160 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1161 __raw_idx_visit and make lambda return void.
1162 (_Multi_array::__untag_result): Add metafunction to check the function
1163 pointer type for a tag type that dictates the kind of visitation.
1164 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1165 Use decltype(auto) instead of tagged function pointer type.
1166 (__gen_vtable_impl): Remove bool non-type parameter and unused
1167 _Variant_tuple parameter.
1168 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1169 (__gen_vtable_impl::__do_visit_invoke): Remove.
1170 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1171 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1172 for the visit<R> case, rather than dispatching to separate functions.
1173 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1175 (variant::swap): Likewise.
1176 (__do_visit): Replace two non-type template parameters with a single
1177 type parameter, so that the caller must specify the visitor's return
1178 type (or one of the tag types).
1179 (visit): Deduce a return type from the visitor and use the
1180 __deduce_visit_result tag to enforce that all overloads return the
1182 (visit<R>): Call __do_visit<R> with explicit result type.
1183 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1186 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1188 nonesuch is insufficiently useless (lwg2996)
1189 * include/std/type_traits (struct __nonesuch): Added private base
1190 class to make __nonesuch not an aggregate and removed deleted default
1192 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1193 (operator=(const pair&)): Use __nonesuch instead of
1194 __nonesuch_no_braces.
1195 (operator=(pair&&)): Likewise
1196 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1197 of __nonesuch_no_braces.
1198 (operator=(tuple&&)): Likewise
1199 * include/experimental/type_traits (struct nonesuch): Added private
1200 base class to make nonesuch not an aggregate and removed deleted
1201 default constructor.
1202 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1203 * testsuite/experimental/type_traits/nonesuch.cc: New.
1205 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1207 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1208 (_Function_handler): Remove partial specializations for void return
1209 types and pointers to member.
1210 (_Function_handler::_M_manager): Adapt to removal of
1211 _Simple_type_wrapper.
1212 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1213 * include/std/functional (_Bind_result::__enable_if_void)
1214 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1215 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1217 * include/std/future (__future_base::_Task_state::_M_run)
1218 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1219 change return type of lambda expressions.
1221 * include/bits/invoke.h (__invoke_r): Define new function implementing
1222 the INVOKE<R> pseudo-function.
1223 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1224 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1226 * include/std/type_traits (__is_nt_convertible_helper): Define it
1227 unconditionally, not only for C++20.
1228 (__is_nothrow_convertible): Define internal trait for use in C++11.
1229 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1230 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1231 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1232 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1233 that has nothrow explicit conversion but potentially-throwing implicit
1235 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1236 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1237 function to only consider implicit conversions.
1238 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1240 * include/std/iterator: Include <iosfwd> instead of <istream> and
1243 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1244 Remove unused, non-standard function.
1246 * include/bits/regex.h (match_results::max_size()): Adjust return
1247 value to account for prefix/suffix/unmatched subs.
1248 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1249 reset the contained sub matches.
1250 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1251 function to set result state following a failed match.
1252 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1253 sub_match states after _M_resize. Use _M_establish_failed_match.
1256 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1257 Replace single _Callable parameter with variadic _Args pack, to
1258 forward them directly to the tuple of decayed copies.
1259 * testsuite/30_threads/thread/cons/69724.cc: New test.
1261 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1263 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1264 * include/bits/basic_string.h: (operator=(const basic_string&):
1265 Move allocator decision to assign.
1266 (assign(const basic_string&)): Move allocator decision here.
1267 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1269 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1272 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1274 * testsuite/util/testsuite_allocator.h (memory_resource)
1275 (default_resource_mgr): Fix indentation.
1277 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1278 Use operator-> to access raw pointer member.
1279 * testsuite/23_containers/vector/59829.cc: Likewise.
1280 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1281 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1282 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1284 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1285 its constructors and equality operators. Change converting
1286 constructors to use operator-> to access private member of the other
1288 (PointerBase_void::operator->()): Add, for access to private member.
1289 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1290 (operator==(PointerBase, PointerBase)): Remove.
1291 (operator!=(PointerBase, PointerBase)): Remove.
1293 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1294 not assume field called _M_head_impl is the first tuple element.
1295 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1296 implementation more accurate.
1297 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1298 empty pointer type and non-empty deleter.
1300 LWG 2899 - Make is_move_constructible correct for unique_ptr
1301 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1302 move assignment operator.
1303 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1304 (__uniq_ptr_data): New class template with conditionally deleted
1306 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1307 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1308 constructor and move assignment operator as defaulted.
1309 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1310 __uniq_ptr_impl::release().
1311 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1312 to __uniq_ptr_impl::reset(pointer).
1313 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1314 Check for new __uniq_ptr_data type.
1315 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1317 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1319 PR libstdc++/90454.cc path construction from void*
1320 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1321 pointers to void are rejected as well as void.
1322 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1323 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1325 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1327 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1328 <remark> elements. Fix formatting of bibliography references.
1330 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1332 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1334 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1336 Remove Profile Mode, deprecated since 7.1.0
1337 * doc/Makefile.am: Remove XML file for profile mode docs.
1338 * doc/Makefile.in: Regenerate.
1339 * doc/xml/authors.xml: Remove authors of profile mode docs.
1340 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1342 * doc/xml/manual/debug.xml: Likewise.
1343 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1344 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1345 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1346 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1348 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1350 * doc/html/*: Regenerate.
1351 * include/Makefile.am: Remove profile mode headers.
1352 * include/Makefile.in: Regenerate.
1353 * include/bits/c++config (std::__profile): Remove namespace.
1354 [_GLIBCXX_PROFILE]: Remove checks for macro.
1355 * include/profile/array: Remove.
1356 * include/profile/base.h: Remove.
1357 * include/profile/bitset: Remove.
1358 * include/profile/deque: Remove.
1359 * include/profile/forward_list: Remove.
1360 * include/profile/impl/profiler.h: Remove.
1361 * include/profile/impl/profiler_algos.h: Remove.
1362 * include/profile/impl/profiler_container_size.h: Remove.
1363 * include/profile/impl/profiler_hash_func.h: Remove.
1364 * include/profile/impl/profiler_hashtable_size.h: Remove.
1365 * include/profile/impl/profiler_list_to_slist.h: Remove.
1366 * include/profile/impl/profiler_list_to_vector.h: Remove.
1367 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1368 * include/profile/impl/profiler_node.h: Remove.
1369 * include/profile/impl/profiler_state.h: Remove.
1370 * include/profile/impl/profiler_trace.h: Remove.
1371 * include/profile/impl/profiler_vector_size.h: Remove.
1372 * include/profile/impl/profiler_vector_to_list.h: Remove.
1373 * include/profile/iterator_tracker.h: Remove.
1374 * include/profile/list: Remove.
1375 * include/profile/map: Remove.
1376 * include/profile/map.h: Remove.
1377 * include/profile/multimap.h: Remove.
1378 * include/profile/multiset.h: Remove.
1379 * include/profile/ordered_base.h: Remove.
1380 * include/profile/set: Remove.
1381 * include/profile/set.h: Remove.
1382 * include/profile/unordered_base.h: Remove.
1383 * include/profile/unordered_map: Remove.
1384 * include/profile/unordered_set: Remove.
1385 * include/profile/vector: Remove.
1386 * scripts/run_doxygen: Do not process profile mode headers.
1387 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1389 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1390 Remove dg-skip-if for profile mode.
1391 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1392 preprocessor check for profile mode.
1393 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1394 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1396 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1398 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1399 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1400 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1401 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1402 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1404 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1406 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1408 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1410 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1411 preprocessor check for profile mode.
1412 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1414 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1415 Remove dg-skip-if for profile mode.
1416 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1417 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1418 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1419 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1420 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1421 * testsuite/Makefile.am: Remove profile_flags variable and
1422 * testsuite/Makefile.am: Remove profile_flags variable and
1423 check-profile target.
1424 * testsuite/Makefile.in: Regenerate.
1425 * testsuite/ext/profile/all.cc: Remove.
1426 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1427 * testsuite/ext/profile/profiler_algos.cc: Remove.
1428 * testsuite/ext/profile/replace_new.cc: Remove.
1429 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1430 preprocessor check for profile mode.
1431 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1432 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1433 (check_v3_target_normal_mode): Do not check for profile mode macro.
1434 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1436 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1437 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1438 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1439 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1440 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1441 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1442 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1443 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1444 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1445 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1447 Remove array_allocator extension, deprecated since 4.9.0
1448 * doc/xml/manual/allocator.xml: Remove documentation for
1450 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1451 * doc/xml/manual/using.xml: Remove header from documentation.
1452 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1453 * include/Makefile.in: Regenerate.
1454 * include/ext/array_allocator.h: Remove.
1455 * include/precompiled/extc++.h: Do not include removed header.
1456 * testsuite/ext/array_allocator/1.cc: Remove.
1457 * testsuite/ext/array_allocator/2.cc: Remove.
1458 * testsuite/ext/array_allocator/26875.cc: Remove.
1459 * testsuite/ext/array_allocator/3.cc: Remove.
1460 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1461 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1462 * testsuite/ext/array_allocator/check_new.cc: Remove.
1463 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1464 * testsuite/ext/headers.cc: Do not include removed header.
1466 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1468 * include/bits/stl_bvector.h
1469 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1471 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1473 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1475 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1477 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1479 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1481 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1483 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1485 (_Bit_iterator::operator-(difference_type)): Likewise.
1486 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1487 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1489 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1490 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1492 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1495 * testsuite/util/thread/all.h: Do not use remove_pointer for
1496 std::thread::native_handle_type.
1499 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1500 (_Variant_storage<true, Types...>::_M_reset()))
1501 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1502 (__get_storage): Likewise.
1503 (variant): Add noexcept to friend declarations for __get and
1507 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1508 Use _Require for constraints.
1509 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1511 (__uniq_ptr_hash): New base class with conditionally-disabled call
1513 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1514 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1515 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1517 * include/bits/shared_ptr.h: Improve docs.
1518 * include/bits/shared_ptr_base.h: Likewise.
1519 * include/bits/stl_uninitialized.h: Likewise.
1520 * include/bits/unique_ptr.h: Likewise.
1521 * libsupc++/new: Likewise.
1523 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1525 * include/bits/stl_deque.h
1526 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1528 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1530 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1532 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1534 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1536 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1538 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1540 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1542 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1545 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1546 (test01): Reserve for number of insertions to avoid rehash during test.
1547 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1549 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1554 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1556 * include/experimental/bits/fs_path.h: Improve docs.
1557 * include/experimental/bits/net.h: Fix wrong header name in comment.
1558 Do not document implementation details.
1559 * include/experimental/netfwd: Fix doxygen grouping.
1561 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1563 * include/bits/stl_pair.h: Improve docs.
1564 * include/std/tuple: Likewise.
1566 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1568 * include/std/chrono: Improve docs.
1569 * include/std/ratio: Do not document implementation details.
1570 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1572 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1575 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1576 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1577 (__duration_common_type): New helper.
1578 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1579 __duration_common_type.
1580 (__timepoint_common_type_wrapper): Replace with ...
1581 (__timepoint_common_type): New helper.
1582 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1583 Use __time_point_common_type.
1584 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1585 (__common_type_impl): If either argument is transformed by decay,
1586 use the common_type of the decayed types.
1587 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1588 decayed, use __do_common_type_impl to get the common_type.
1589 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1590 (__do_member_type_wrapper, __member_type_wrapper)
1591 (__expanded_common_type_wrapper): Remove.
1592 (__common_type_pack, __common_type_fold): New helpers.
1593 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1594 __member_type_wrapper and __expanded_common_type_wrapper.
1595 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1596 Test zero-length template argument list.
1597 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1598 Test single argument cases and argument types that should decay.
1599 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1600 Adjust expected error.
1601 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1603 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1604 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1605 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1607 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1609 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1611 Make allocator propagation more consistent for
1612 operator+(basic_string) (P1165R1)
1613 * include/bits/basic_string.h
1614 (operator+(basic_string&&, basic_string&&): Changed resulting
1615 allocator to always be the one from the first parameter.
1616 * include/bits/basic_string.tcc
1617 (operator+(const _CharT*, const basic_string&)): Changed
1618 resulting allocator to be SOCCC on the second parameter's allocator.
1619 (operator+(_CharT, const basic_string&)): Likewise.
1620 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1622 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1625 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1627 * include/bits/regex.h: Improve docs.
1628 * include/bits/regex.tcc: Do not document implementation details.
1630 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1632 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1634 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1635 Add type printer for container types in std::__debug namespace.
1636 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1637 (gdb-tests): Use distinct parameters for the type of test and use of
1639 (gdb-test): Check for regex test even if 'whatis' test.
1640 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1642 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1643 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1644 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1645 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1646 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1647 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1648 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1650 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1652 * include/std/system_error (error_category): Fix comment.
1655 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1656 argument is an empty path.
1657 (absolute(const path&, error_code&)): Use invalid_argument as error
1658 code instead of no_such_file_or_directory.
1659 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1660 of non-existent paths and empty paths with both overloads of absolute.
1662 * include/std/system_error (error_category, error_code)
1663 (error_condition): Improve docs.
1664 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1665 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1666 to class documentation. Suppress documentation for implementation
1668 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1669 Suppress documentation for implementation details.
1671 * include/std/system_error (error_code): Remove friend declaration
1672 for hash<error_code>.
1673 (hash<error_code>::operator()): Use public member functions to access
1675 (hash<error_condition>::operator()): Use address of category, not
1676 its object representation.
1677 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1678 Use public member functions to access value and category.
1679 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1681 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1683 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1684 * include/bits/hashtable_policy.h
1685 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1686 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1687 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1688 smaller than input value rather than always greater. Preserve
1689 _M_next_resize if called with 0 input. Use __builtin_floorl.
1690 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1691 elements + number of insertions is greater than _M_next_resize. Start
1692 with 11 buckets if not told otherwise. Use __builtin_floorl.
1693 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1694 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1695 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1696 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1697 told otherwise. Use __builtin_floorl.
1698 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1699 to also validate _Power2_rehash_policy.
1700 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1703 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1706 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1710 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1711 overflow warning with -Wpedantic -Wsystem-headers.
1713 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1716 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1717 * include/bits/move.h (swap): Remove extra parentheses.
1719 * include/experimental/bits/lfts_config.h: Improve doc markup.
1720 * include/experimental/optional: Improve docs.
1721 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1722 (__constexpr_addressof): Remove.
1723 (optional::operator->()): Use std::__addressof().
1724 * include/std/optional (optional::operator->()): Adjust whitespace.
1725 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1726 that operator-> is still constexpr with overloaded operator&. Change
1727 to compile-only test.
1728 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1731 * include/bits/shared_ptr.h: Improve docs.
1732 * include/bits/shared_ptr_atomic.h: Likewise.
1733 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1735 * include/bits/basic_string.h: Fix iterator/index confusion in
1737 * include/bits/range_access.h: Fix Doxygen warnings.
1738 * include/bits/refwrap.h: Do not document implementation details.
1739 (ref, cref): Group docs with reference_wrapper.
1740 * include/std/fstream: Fix Doxygen markup.
1741 * libsupc++/initializer_list (begin, end): Group docs with
1744 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1746 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1747 * include/std/mutex: Likewise.
1748 * include/std/shared_mutex: Likewise.
1750 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1751 * include/bits/fs_fwd.h: Likewise.
1752 * include/bits/fs_ops.h: Likewise.
1753 * include/bits/fs_path.h: Likewise.
1754 * include/std/filesystem: Likewise.
1756 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1757 * include/experimental/buffer: Likewise.
1758 * include/experimental/executor: Likewise.
1759 * include/experimental/internet: Likewise.
1760 * include/experimental/io_context: Likewise.
1761 * include/experimental/net: Likewise.
1762 * include/experimental/netfwd: Likewise.
1763 * include/experimental/socket: Likewise.
1764 * include/experimental/timer: Likewise.
1766 * doc/doxygen/doxygroups.cc: Move description of experimental group
1768 * include/experimental/algorithm: Add to libfund-ts doc group.
1769 * include/experimental/any: Likewise. Do not document implementation
1771 * include/experimental/array: Add to libfund-ts doc group.
1772 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1773 for Library Fundamentals.
1774 * include/experimental/chrono: Add to libfund-ts doc group.
1775 * include/experimental/deque: Likewise.
1776 * include/experimental/forward_list: Likewise.
1777 * include/experimental/functional: Likewise.
1778 * include/experimental/iterator: Likewise.
1779 * include/experimental/list: Likewise.
1780 * include/experimental/map: Likewise.
1781 * include/experimental/memory: Likewise.
1782 * include/experimental/memory_resource: Likewise. Improve docs.
1784 * include/experimental/numeric: Add to libfund-ts doc group.
1785 * include/experimental/optional: Likewise.
1786 * include/experimental/propagate_const: Likewise.
1787 * include/experimental/random: Likewise.
1788 * include/experimental/ratio: Likewise.
1789 * include/experimental/regex: Likewise.
1790 * include/experimental/set: Likewise.
1791 * include/experimental/source_location: Likewise.
1792 * include/experimental/string: Likewise.
1793 * include/experimental/string_view: Likewise.
1794 * include/experimental/system_error: Likewise.
1795 * include/experimental/tuple: Likewise.
1796 * include/experimental/type_traits: Likewise.
1797 * include/experimental/unordered_map: Likewise.
1798 * include/experimental/unordered_set: Likewise.
1799 * include/experimental/utility: Likewise.
1800 * include/experimental/vector: Likewise.
1801 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1802 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1803 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1805 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1806 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1807 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1808 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1809 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1811 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1812 * include/experimental/bits/fs_fwd.h: Improve docs.
1813 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1814 * include/experimental/bits/fs_path.h: Likewise.
1815 (path, filesystem_error, u8path): Improve docs.
1816 * include/experimental/filesystem: Link to docs for TS.
1818 * config/allocator/new_allocator_base.h (__allocator_base): Add
1819 workaround for Doxygen bug #6945.
1820 * include/std/memory: Improve docs. Define group for pointer safety.
1821 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1822 conditional to suppress documentation for implementation details.
1824 * include/bits/specfun.h: Improve docs.
1825 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1828 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1829 (std::experimental): Add docs.
1830 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1831 namespace to nothing when generating docs.
1832 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1833 * include/std/chrono (std::chrono): Likewise.
1834 * include/std/functional (std::placeholders): Likewise.
1835 * include/std/thread (std::this_thread): Likewise.
1837 * include/parallel/settings.h: Fix Doxygen markup.
1839 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1840 anything unless PB_DS_CLASS_C_DEC is defined.
1841 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1842 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1843 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1844 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1845 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1846 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1847 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1849 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1850 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1851 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1852 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1853 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1854 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1855 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1856 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1857 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1858 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1859 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1861 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1862 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1864 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1867 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1868 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1869 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1872 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1874 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1875 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1876 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1877 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1878 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1879 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1881 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1882 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1885 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1888 * include/std/complex (__complex_proj): Return parameter unchanged.
1889 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1890 floating-point types to take std::complex arguments.
1891 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1892 floating-point types.
1893 * testsuite/26_numerics/complex/proj.cc: New test.
1895 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1897 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1898 to _Lock_policyE[012].
1899 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1901 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1903 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1904 macros accidentally left in.
1905 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1906 unnecessary -lstdc++fs option. Fix test for mingw.
1907 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1910 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1912 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1914 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1916 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1918 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1919 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1922 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1924 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1927 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1928 class template and partial specialization.
1931 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1933 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1934 functions to convert a value to an integral type.
1935 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1936 (fill_n): Convert _Size parameter to an integral type.
1937 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1938 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1939 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1940 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1941 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1942 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1944 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1946 Adding noexcept-specification on tuple constructors (LWG 2899)
1947 * libstdc++-v3/include/std/tuple:
1948 (tuple()): Add noexcept-specification.
1949 (tuple(const _Elements&...)): Likewise
1950 (tuple(_UElements&&...)): Likewise
1951 (tuple(const tuple<_UElements...>&)): Likewise
1952 (tuple(tuple<_UElements...>&&)): Likewise
1953 (tuple(const _T1&, const _T2&)): Likewise
1954 (tuple(_U1&&, _U2&&)): Likewise
1955 (tuple(const tuple<_U1, _U2>&): Likewise
1956 (tuple(tuple<_U1, _U2>&&): Likewise
1957 (tuple(const pair<_U1, _U2>&): Likewise
1958 (tuple(pair<_U1, _U2>&&): Likewise
1959 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1961 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1964 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1965 arguments with __restrict.
1967 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1969 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1971 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1973 * include/experimental/bits/fs_path.h
1974 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1975 avoid redundant call to _S_convert_loc with non-const pointers.
1977 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1978 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1979 * testsuite/21_strings/basic_string/hash/hash.cc
1980 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1981 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1982 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1984 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1985 wstring::_M_replace_dispatch with more specific patterns.
1986 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1987 Create const std::string to avoid redundant call to _S_convert_loc
1988 with non-const pointers.
1989 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1990 avoid unnecessary basic_string::assign instantiations.
1992 * include/std/memory (__uses_alloc_args): Add string-literal to
1993 static_assert, to match the one in __uses_alloc.
1994 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1995 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1996 for recursive uses-allocator construction of nested pairs.
1997 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2000 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2002 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2003 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2004 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2005 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2007 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2008 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2009 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2010 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2011 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2012 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2013 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2015 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2018 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2019 * include/std/scoped_allocator [__cplusplus > 201703L]
2020 (scoped_allocator_adaptor::construct): Define in terms of
2021 uses_allocator_construction_args, as per P0591R4.
2022 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2023 * testsuite/util/testsuite_allocator.h: Remove name of unused
2026 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2028 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2029 * doc/html/*: Regenerate.
2031 * include/bits/fs_path.h (operator<, operator<=, operator>)
2032 (operator>=, operator==, operator!=): Make hidden friends, as per
2034 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2035 string type in test.
2036 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2038 * include/std/any (any::any(ValueType&&)): Use __and_v.
2039 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2042 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2044 * include/std/type_traits (__result_of_memfun): Use remove_reference
2045 instead of __remove_cvref_t and remove redundant is_same check.
2046 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2048 * include/experimental/string_view (basic_string_view::pointer)
2049 (basic_string_view::reference): Fix to refer to non-const value_type.
2050 * include/bits/basic_string.h (basic_string): Use __sv_check and
2051 __sv_limit instead of basic_string_view::_M_check and
2052 basic_string_view::_M_limit.
2053 * include/std/string_view (__sv_check, __sv_limit): New
2054 helper functions to replace basic_string_view::_M_check and
2055 basic_string_view::_M_limit.
2056 (basic_string_view): Add static assertions to enforce ill-formed
2057 requirement for traits_type::char_type from P1148R0, and to enforce
2058 required properties of char-like types.
2059 (basic_string_view::pointer, basic_string_view::reference): Fix to
2060 refer to non-const value_type.
2061 (basic_string_view::operator[], basic_string_view::at)
2062 (basic_string_view::front, basic_string_view::back)
2063 (basic_string_view::data): Use const_reference and const_pointer
2064 typedefs for return types.
2065 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2066 (hash<wstring_view>): Fix argument_type typedef.
2067 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2068 char/1.cc: Fix expected return type of basic_string_view::data().
2069 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2070 wchar_t/1.cc: Likewise.
2071 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2072 char/1.cc: Likewise.
2073 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2074 wchar_t/1.cc: Likewise.
2075 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2077 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2078 Check reference and pointer typedefs.
2079 * testsuite/experimental/string_view/requirements/typedefs.cc:
2081 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2082 Fix expected return type of basic_string_view::data().
2083 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2085 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2087 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2091 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2092 Avoid a runtime check for types that can never be stored in std::any.
2093 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2096 PR libstdc++/90220 (partial)
2097 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2098 not attempt ill-formed static_cast to pointers to non-object types.
2099 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2102 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2103 prevent -Wcatch-value warning.
2105 * include/std/variant (__variant_construct): Use template parameter
2106 type instead of equivalent decltype-specifier.
2107 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2108 Replace forward with move.
2109 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2110 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2111 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2112 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2113 index after construction succeeds.
2114 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2115 if-constexpr checks that are always true. Use __remove_cvref_t instead
2116 of remove_reference so that is_nothrow_move_constructible check
2117 doesn't use a const rvalue parameter. In the potentially-throwing case
2118 construct a temporary and move assign it, as per LWG 2904.
2119 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2120 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2121 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2122 construct a temporary and move assign from it, as per LWG 2904.
2123 * testsuite/20_util/variant/exception_safety.cc: Check that
2124 assignment operators have strong exception safety guarantee.
2126 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2128 Document PSTL linker flags
2130 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2132 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2134 * include/std/variant (__detail::__variant::_Traits): Make
2135 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2136 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2138 (__detail::__variant::_Copy_assign_alias): Only depend on
2139 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2140 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2141 move assignment operators.
2144 * include/std/variant (variant::__not_self): New helper for the
2145 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2146 (variant::__to_type_impl): Remove.
2147 (variant::__to_type): Add default argument to check pack size, instead
2148 of using __to_type_impl.
2149 (variant::__accepted_type): Add default argument using __not_self.
2150 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2151 for variant(T&&) constructor constraint.
2152 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2153 Extract __accepted_type into a named template parameter for reuse in
2154 other constraints and in the exception specification.
2155 (variant::variant(in_place_type_t<T>, Args&&...))
2156 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2157 (variant::variant(in_place_index_t<T>, Args&&...))
2158 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2159 (variant::operator=T&&)): Remove redundant && from trait arguments.
2160 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2161 isn't used for in_place_type or in_place_index arguments.
2163 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2164 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2165 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2167 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2168 Bernd Edlinger <bernd.edlinger@hotmail.de>
2169 Jakub Jelinek <jakub@redhat.com>
2172 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2173 general-regs-only target attribute for ARM.
2175 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2178 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2179 specialization also depend on is_nothrow_move_constructible.
2180 * include/std/variant (__detail::__variant::__never_valueless()):
2181 Only true if the variant would have a move assignment operator.
2182 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2183 Check __never_valueless<T...>().
2184 (variant::emplace): Only perform non-throwing move assignments
2185 for never-valueless alternatives if the variant has a move assignment
2187 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2188 types can be emplaced into non-assignable variants.
2189 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2190 don't get copied when emplaced into non-assignable variants.
2192 * include/std/variant (__detail::__variant::__ref_cast): Remove
2194 (__detail::__variant::_Uninitialized::_M_get)
2195 (__detail::__variant::__get)
2196 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2198 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2200 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2202 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2203 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2204 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2205 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2207 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2209 Delegate PSTL configuration to pstl/pstl_config.h
2211 * include/bits/c++config: Remove explicit PSTL configuration
2212 macros and use definitions from <pstl/pstl_config.h>.
2214 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2216 Cleanup algorithm implementations
2217 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2219 (mismatch): Forward execution policy.
2220 (equal): Qualify call to std::equal().
2221 (partial_sort): Forward execution policy.
2222 (inplace_merge): Forward execution policy.
2224 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2226 Improve implementation of parallel equal()
2227 * include/pstl/algorithm_impl.h
2228 (__internal::__brick_equal): use "4 iterator" version of
2230 (__internal::__brick_equal): use simd for random access
2231 iterators on unsequenced execution policies.
2232 (__internal::__pattern_equal): add "4 iterator" version
2233 (__internal::__pattern_equal): dispatch to simd __brick_equal
2234 for vector-only execution policies.
2235 (__internal::__pattern_equal): dispatch to __parallel_or for
2236 parallel execution policies.
2237 * include/pstl/glue_algorithm_impl.h
2238 (std::equal): dispatch to "4 iterator" version of
2239 __internal::__pattern_equal().
2241 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2244 * include/bits/forward_list.h (operator==): Do not use operator!= to
2246 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2247 earlier in the list, so that sort is stable.
2248 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2249 * testsuite/23_containers/forward_list/comparable.cc: Test with
2250 types that meet the minimum EqualityComparable and LessThanComparable
2251 requirements. Remove irrelevant comment.
2253 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2254 Do not depend on whether all alternative types are move constructible.
2255 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2256 from the operand when deciding whether to perform the assignment.
2257 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2258 with deleted move constructor and deleted move assignment operator.
2259 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2260 behaviour of variants with DeletedMoves as an alternative.
2261 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2262 (move_ctor, move_assign): Check that moving a variant with a
2263 DeletedMoves alternative falls back to copying instead of moving.
2265 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2266 from static_assert declarations.
2268 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2269 actually match its name.
2270 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2271 (test_swap()): Fix result for MoveCtorOnly and check
2272 MoveCtorAndSwapOnly.
2274 * include/std/optional (optional::value_or(U&&) &&): Add missing
2275 constexpr specifier.
2276 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2277 for disengaged optionals and rvalue optionals.
2278 * testsuite/20_util/optional/observers/4.cc: Likewise.
2280 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2282 * include/pstl/algorithm_impl.h: Uglify identfiers.
2283 * include/pstl/numeric_impl.h: Uglify identfiers.
2284 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2286 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2288 * include/bits/c++config:
2289 Add definition for __PSTL_ASSERT.
2290 Add definition for __PSTL_ASSERT_MSG.
2291 * include/pstl/algorithm_impl.h: Replace use of assert().
2292 * include/pstl/numeric_impl.h: Replace use of assert().
2293 * include/pstl/parallel_backend_tbb.h:
2294 Replace use of assert().
2295 Replace use of __TBB_ASSERT().
2296 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2298 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2301 * src/c++17/memory_resource.cc
2302 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2303 needed to allow placing a _Chunk at the end of the buffer.
2304 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2306 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2308 * doc/xml/faq.xml: Add information about emergency EH pool.
2309 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2310 Move outdated information on mt_allocator to a separate section.
2311 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2312 doesn't affect the default allocator.
2314 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2318 * testsuite/20_util/variant/89851.cc: New test.
2320 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2322 * include/std/variant: Adjust whitespace. Add comments.
2323 (_Multi_array): Leave primary template undefined.
2324 (_Multi_array<_Tp>): Define partial specialization for base case of
2326 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2327 which is always a reference.
2328 (__gen_vtable::_S_apply()): Remove function, inline body into
2329 default member initializer.
2330 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2332 * include/std/variant (__variant_idx_cookie): Add member type.
2333 (__visitor_result_type): Remove.
2334 (__do_visit): Use invoke_result instead of __visitor_result_type.
2335 * testsuite/20_util/variant/visit.cc: New test.
2338 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2340 * testsuite/20_util/variant/90008.cc: New test.
2342 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2344 * include/pstl/algorithm_impl.h: Add namespace qualification.
2345 * include/pstl/execution_defs.h: Add namespace qualification.
2346 * include/pstl/execution_impl.h: Add namespace qualification.
2347 * include/pstl/numeric_impl.h: Add namespace qualification.
2348 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2349 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2350 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2352 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2354 Fix visit<R> for variant.
2355 * include/std/variant (__do_visit): Add a template parameter
2356 for enforcing same return types for visit.
2357 (__gen_vtable_impl): Likewise.
2358 (_S_apply_single_alt): Adjust.
2359 (__visit_invoke_impl): New. Handle casting to void.
2360 (__do_visit_invoke): New. Enforces same return types.
2361 (__do_visit_invoke_r): New. Converts return types.
2362 (__visit_invoke): Adjust.
2363 (__gen_vtable): Add a template parameter for enforcing
2364 same return types for visit.
2365 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2366 different return types.
2367 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2368 visitors with different return types don't accidentally
2369 compile with regular visitation.
2371 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2373 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2374 dg-require-filesystem-ts.
2376 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2378 * doc/xml/manual/status_cxx2020.xml: Update status.
2379 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2380 * testsuite/20_util/variant/visit_r.cc: New test.
2382 * include/bits/fs_dir.h (directory_iterator::operator*)
2383 (directory_iterator::operator->): Add noexcept.
2384 (operator==, operator!=): Replace namespace-scope equality operators
2385 for directory iterators with hidden friends.
2388 * config/abi/pre/gnu.ver: Add missing exports.
2389 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2392 * config/abi/pre/gnu.ver: Export new symbols.
2393 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2394 (recursive_directory_iterator::recursion_pending())
2395 (recursive_directory_iterator::disable_recursion_pending()): Remove
2396 inline definitions. Make noexcept.
2397 (recursive_directory_iterator::depth())
2398 (recursive_directory_iterator::operator*())
2399 (recursive_directory_iterator::operator->()): Make noexcept.
2400 (recursive_directory_iterator::_M_options)
2401 (recursive_directory_iterator::_M_pending): Remove data members.
2402 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2403 (recursive_directory_iterator::recursive_directory_iterator): Remove
2404 ctor-initializer. Use new constructor for _Dir_stack.
2405 (recursive_directory_iterator::options())
2406 (recursive_directory_iterator::recursion_pending())
2407 (recursive_directory_iterator::disable_recursion_pending()): Add
2408 non-inline definitions.
2409 (recursive_directory_iterator::depth()): Make noexcept.
2410 (recursive_directory_iterator::increment(error_code&))
2411 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2412 location of options and recursion_pending members.
2413 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2414 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2415 user-declared move constructor and assignment operator, to make the
2418 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2419 d_type == DT_UNKNOWN immediately.
2420 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2422 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2424 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2426 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2427 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2430 PR libstdc++/87431 (again)
2431 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2432 Define partial specialization for basic_string.
2433 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2434 shared_ptr and weak_ptr.
2435 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2437 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2439 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2441 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2443 * include/std/any (_Never_valueless_alt): Define explicit
2444 specialization for any.
2445 * include/std/variant (_Never_valueless_alt): Define primary template.
2446 (__never_valueless): Use _Never_valueless_alt instead of
2447 is_trivially_copyable.
2448 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2449 initializations to avoid try-catch overhead. Add special case for
2450 scalars produced by potentially-throwing conversions. Use
2451 _Never_valueless_alt instead of is_trivially_copyable for the
2452 remaining strong exception-safety cases.
2453 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2454 * testsuite/20_util/variant/87431.cc: Run both test functions.
2455 * testsuite/20_util/variant/exception_safety.cc: New test.
2456 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2457 so the variant becomes valueless.
2459 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2462 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2464 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2466 * include/std/string (__hash_string_base): New class template defining
2467 operator() for hashing strings.
2468 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2469 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2470 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2471 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2473 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2475 Use single-visitation in variant assignment and swap and relops.
2476 Also use indices instead of types when checking whether
2477 variants hold the same thing.
2478 * include/std/variant (__do_visit): Add a template parameter
2479 for index visitation, invoke with indices if index visitation
2481 (__variant_idx_cookie): New.
2482 (__visit_with_index): Likewise.
2483 (_Copy_assign_base::operator=): Do single-visitation with
2485 (_Move_assign_base::operator=): Likewise.
2486 (_Extra_visit_slot_needed): Adjust.
2487 (__visit_invoke): Call with indices if it's an index visitor.
2488 (relops): Do single-visitation with an index visitor.
2490 (__visitor_result_type): New.
2492 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2494 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2496 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2498 Don't revisit a variant we are already visiting.
2499 * include/std/variant (__variant_construct_single): New.
2500 (__variant_construct): Use it.
2501 (_M_destructive_move): Likewise.
2502 (_M_destructive_copy): Likewise.
2503 (_Copy_assign_base::operator=): Adjust.
2504 (_Move_assign_base::operator=): Likewise.
2507 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2510 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2511 destructor so they are not evaluated until the _Key type is complete.
2512 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2513 * testsuite/23_containers/set/85965.cc: New test.
2514 * testsuite/23_containers/unordered_set/85965.cc: New test.
2515 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2516 with regexp matching the corresponding _Rb_tree specialization.
2517 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2518 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2519 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2520 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2521 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2522 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2523 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2525 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2528 Fix based on a suggestion by Antony Polukhin.
2529 * include/std/variant (__never_valueless): New.
2531 (_Extra_visit_slot_needed): New.
2532 (_Multi_array): Use it.
2533 (_S_apply_all_alts): Likewise.
2535 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2538 Fix based on a suggestion by Antony Polukhin.
2539 * include/std/variant (__gen_vtable): Don't reserve an
2540 additional table slot, _Multi_array already does that.
2542 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2545 Fix based on a suggestion by Antony Polukhin.
2546 * include/std/variant (__variant_construct): Capture a pointer
2547 to the storage and visit just one variant.
2549 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2551 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2552 Doxygen-generated pages with unstable URL.
2553 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2554 * doc/xml/manual/extensions.xml: Likewise.
2555 * doc/xml/manual/parallel_mode.xml: Likewise.
2556 * doc/xml/manual/support.xml: Likewise.
2558 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2559 avoid -Wconversion warnings.
2561 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2563 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2564 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2565 (allstamped): Add stamp-pstl.
2566 (install-headers): Add ptsl_builddir.
2567 * include/Makefile.in: Regenerate.
2568 * include/bits/c++config: Add pstl configuration.
2569 * include/pstl/LICENSE.txt: New file.
2570 * include/pstl/algorithm_fwd.h: New file.
2571 * include/pstl/algorithm_impl.h: New file.
2572 * include/pstl/execution_defs.h: New file.
2573 * include/pstl/execution_impl.h: New file.
2574 * include/pstl/glue_algorithm_defs.h: New file.
2575 * include/pstl/glue_algorithm_impl.h: New file.
2576 * include/pstl/glue_execution_defs.h: New file.
2577 * include/pstl/glue_memory_defs.h: New file.
2578 * include/pstl/glue_memory_impl.h: New file.
2579 * include/pstl/glue_numeric_defs.h: New file.
2580 * include/pstl/glue_numeric_impl.h: New file.
2581 * include/pstl/memory_impl.h: New file.
2582 * include/pstl/numeric_fwd.h: New file.
2583 * include/pstl/numeric_impl.h: New file.
2584 * include/pstl/parallel_backend.h: New file.
2585 * include/pstl/parallel_backend_tbb.h: New file.
2586 * include/pstl/parallel_backend_utils.h: New file.
2587 * include/pstl/parallel_impl.h: New file.
2588 * include/pstl/pstl_config.h: New file.
2589 * include/pstl/unseq_backend_simd.h: New file.
2590 * include/pstl/utils.h: New file.
2591 * include/std/algorithm: Include parallel algorithm implementations.
2592 * include/std/execution: New file.
2593 * include/std/memory: Include parallel algorithm implementations.
2594 * include/std/numeric: Include parallel algorithm implementations.
2595 * include/std/version: Add parallel algorithms feature test macro.
2596 * testsuite/util/pstl/pstl_test_config.h: New file.
2597 * testsuite/util/pstl/test_utils.h: New file.
2598 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2599 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2600 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2601 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2602 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2603 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2604 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2605 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2606 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2607 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2608 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2609 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2610 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2611 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2612 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2613 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2614 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2615 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2616 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2617 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2618 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2619 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2620 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2621 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2622 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2623 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2624 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2625 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2626 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2627 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2628 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2629 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2630 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2631 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2632 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2633 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2634 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2635 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2636 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2637 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2638 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2639 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2640 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2641 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2642 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2643 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2644 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2645 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2646 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2647 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2648 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2649 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2650 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2651 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2652 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2653 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2654 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2655 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2656 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2657 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2658 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2659 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2660 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2661 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2662 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2663 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2664 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2665 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2666 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2667 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2668 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2669 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2670 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2671 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2672 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2673 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2674 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2675 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2676 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2677 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2678 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2679 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2680 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2681 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2682 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2683 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2684 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2685 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2686 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2687 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2688 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2689 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2690 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2691 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2692 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2693 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2694 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2695 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2696 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2697 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2698 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2699 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2700 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2701 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2702 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2703 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2705 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2707 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2708 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2709 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2710 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2711 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2712 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2713 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2714 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2715 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2716 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2717 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2718 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2719 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2720 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2721 when the special functions IS is enabled, not for C++17.
2722 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2724 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2725 without checks for special functions in C++17.
2726 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2730 * include/backward/hash_map: Use <> for includes not "".
2731 * include/backward/hash_set: Likewise.
2732 * include/backward/strstream: Likewise.
2733 * include/tr1/bessel_function.tcc: Likewise.
2734 * include/tr1/exp_integral.tcc: Likewise.
2735 * include/tr1/legendre_function.tcc: Likewise.
2736 * include/tr1/modified_bessel_func.tcc: Likewise.
2737 * include/tr1/riemann_zeta.tcc: Likewise.
2739 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2741 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2742 of extension allocators.
2743 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2744 Document new headers in 7.2, 8.1 and 9.1 releases.
2745 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2746 * doc/html/*: Regenerate.
2748 2019-03-12 John David Anglin <dave.anglin@bell.net>
2751 * testsuite/lib/libstdc++.exp: Locate libatomic.
2752 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2753 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2755 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2756 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2757 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2758 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2760 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2763 * configure.ac: Check for sockatmark.
2764 * crossconfig.m4: Check for sockatmark.
2765 * config.h.in: Regenerate.
2766 * configure: Regenerate.
2767 * include/experimental/internet (address_v4::_S_hton): Rename
2768 overloaded functions to _S_hton_16 and _S_ntoh_16.
2769 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2770 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2771 * include/experimental/socket (basic_socket::at_mark): Check
2772 _GLIBCXX_HAVE_SOCKATMARK.
2774 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2775 const variables instead of macros.
2778 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2779 Use correct type for len_aligned.
2780 * testsuite/20_util/hash/89629.cc: New test.
2782 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2785 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2786 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2787 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2788 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2789 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2790 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2791 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2792 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2793 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2794 memory_order_seq_cst to int.
2796 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2798 * doc/xml/manual/using.xml: Use link element instead of xref.
2799 * doc/html/*: Regenerate.
2801 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2803 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2806 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2807 parameters in deduction guides.
2808 * include/debug/multimap.h (multimap): Likewise.
2809 * include/debug/set.h (multimap): Likewise.
2810 * include/debug/multiset.h (multimap): Likewise.
2811 * include/debug/unordered_map (unordered_map): Likewise.
2812 (unordered_multimap): Likewise.
2813 * include/debug/unordered_set (unordered_set): Likewise.
2814 (unordered_multiset): Likewise.
2817 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2818 Invalidate all iterators in case of rehash.
2819 (unordered_multimap<>::_M_check_rehashed): Likewise.
2820 * include/debug/unordered_set
2821 (unordered_set<>::_M_check_rehashed): Likewise.
2822 (unordered_multiset<>::_M_check_rehashed): Likewise.
2823 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2825 2019-03-07 Andreas Schwab <schwab@suse.de>
2827 * config/abi/post/riscv64-linux-gnu: New directory.
2828 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2830 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2832 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2833 compile test to run. Fix typo.
2835 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2836 * doc/html/*: Regenerate.
2838 P0356R5 Simplified partial function application
2839 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2840 helpers for bind_front.
2841 (bind_front, __cpp_lib_bind_front): Define.
2842 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2844 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2846 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2847 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2848 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2849 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2851 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2853 PR libstdc++/86655 - std::assoc_legendre should not constrain
2854 the value of m (or x).
2855 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2856 __sph_legendre): If degree > order Don't throw, return 0.
2857 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2858 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2859 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2860 * testsuite/tr1/5_numerical_facilities/special_functions/
2861 02_assoc_legendre/pr86655.cc: New test.
2862 * testsuite/tr1/5_numerical_facilities/special_functions/
2863 22_sph_legendre/pr86655.cc: New test.
2865 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2868 Also PR libstdc++/85517
2869 * include/std/variant (__do_visit): New.
2870 (__variant_cast): Likewise.
2871 (__variant_cookie): Likewise.
2872 (__erased_*): Remove.
2873 (_Variant_storage::_S_vtable): Likewise.
2874 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2875 (_Variant_storage::__M_reset): Adjust.
2876 (__variant_construct): New.
2877 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2878 __variant_construct.
2879 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2880 (_Move_ctor_base::__M_destructive_copy): New.
2881 (_Move_ctor_base::__M_destructive_move): Adjust to use
2882 __variant_construct.
2883 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2884 (_Copy_assign_alias): Adjust to check both copy assignment
2885 and copy construction for triviality.
2886 (_Move_assign_base::operator=): Adjust to use __do_visit.
2887 (_Multi_array): Add support for visitors that accept and return
2889 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2890 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2891 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2892 a __variant_cookie temporary for a variant that is valueless and..
2893 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2894 (__gen_vtable::_Array_type): Conditionally make space for
2895 the __variant_cookie visitor case.
2896 (__variant_construct_by_index): New.
2897 (get_if): Adjust to use std::addressof.
2898 (relops): Adjust to use __do_visit.
2899 (variant): Add __variant_cast and __variant_construct_by_index
2901 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2902 instead of self-destruction.
2903 (variant::swap): Adjust to use __do_visit.
2904 (visit): Reimplement in terms of __do_visit.
2905 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2906 * testsuite/20_util/variant/compile.cc: Adjust.
2907 * testsuite/20_util/variant/run.cc: Likewise.
2909 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2911 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2913 * testsuite/experimental/feat-char8_t.cc: Likewise.
2915 * include/std/type_traits [C++20] (is_bounded_array)
2916 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2918 * testsuite/20_util/is_bounded_array/requirements/
2919 explicit_instantiation.cc: New test.
2920 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2922 * testsuite/20_util/is_bounded_array/value.cc: New test.
2923 * testsuite/20_util/is_unbounded_array/requirements/
2924 explicit_instantiation.cc: New test.
2925 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2927 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2929 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2931 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2933 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2935 * include/c_compatibility/math.h [C++20] (lerp): Add using
2937 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2938 (__lerp): Define function template to implement lerp.
2939 (lerp(float, float, float), lerp(double, double, double))
2940 (lerp(long double, long double, long double)): Define for C++20.
2941 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2942 (midpoint(T, T), midpoint(T*, T*)): Define.
2943 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2944 * testsuite/26_numerics/lerp.cc: New test.
2945 * testsuite/26_numerics/midpoint/floating.cc: New test.
2946 * testsuite/26_numerics/midpoint/integral.cc: New test.
2947 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2949 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2951 PR libstdc++/88996 Implement P0439R0
2952 Make std::memory_order a scoped enumeration.
2953 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2954 add variables for the old enumerators. Adjust calls.
2955 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2956 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2958 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2960 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2963 * include/std/memory_resource (polymorphic_allocator): Add default
2964 template argument for C++20.
2965 (polymorphic_allocator::allocate_bytes)
2966 (polymorphic_allocator::deallocate_bytes)
2967 (polymorphic_allocator::allocate_object)
2968 (polymorphic_allocator::deallocate_object)
2969 (polymorphic_allocator::new_object)
2970 (polymorphic_allocator::delete_object): New member functions for
2972 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2975 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2978 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2981 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2983 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2984 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2986 * include/std/memory (uses_allocator_construction_args): New set of
2987 overloaded functions.
2988 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2990 * include/std/memory_resource (polymorphic_allocator::construct)
2991 [__cplusplus > 201703l]: Replace all overloads with a single function
2992 using uses_allocator_construction_args.
2993 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2995 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2997 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3000 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3001 stylesheet directories before check for xsltproc. Try to use
3002 xmlcatalog to find local stylesheet directory before trying hardcoded
3003 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3004 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3005 use xsltproc if xmlcatalog fails to find a local stylesheet.
3006 * configure.ac: Check for xmlcatalog.
3007 * Makefile.in: Regenerate.
3008 * configure: Likewise.
3009 * doc/Makefile.in: Likewise.
3010 * include/Makefile.in: Likewise.
3011 * libsupc++/Makefile.in: Likewise.
3012 * po/Makefile.in: Likewise.
3013 * python/Makefile.in: Likewise.
3014 * src/Makefile.in: Likewise.
3015 * src/c++11/Makefile.in: Likewise.
3016 * src/c++17/Makefile.in: Likewise.
3017 * src/c++98/Makefile.in: Likewise.
3018 * src/filesystem/Makefile.in: Likewise.
3019 * testsuite/Makefile.in: Likewise.
3021 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3024 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3025 container deduction guides.
3026 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3027 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3028 parameters in deduction guides.
3029 * include/bits/stl_multimap.h (multimap): Likewise.
3030 * include/bits/stl_multiset.h (multiset): Likewise.
3031 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3032 * include/bits/stl_set.h (set): Likewise.
3033 * include/bits/stl_stack.h (stack): Likewise.
3034 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3035 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3036 constrain parameters in deduction guides.
3037 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3039 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3041 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3042 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3043 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3044 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3046 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3048 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3051 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3052 to class template and partial specialization using void_t.
3053 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3055 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3058 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3059 copy and move members public.
3061 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3063 * include/std/type_traits (__underlying_type_impl): New helper to
3064 make underlying_type SFINAE-friendly.
3065 (underlying_type): Derive from __underlying_type_impl.
3066 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3070 * include/bits/char_traits.h (__constant_char_array): Check index is
3071 in range before dereferencing.
3072 (char_traits<char>::compare, char_traits<char>::find)
3073 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3074 immediately if n is zero.
3075 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3076 Remove workarounds for PR 67026.
3077 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3079 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3082 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3084 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3085 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3087 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3090 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3091 type to std::size_t and argument to type to long double.
3093 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3095 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3096 * config/abi/post/sparc64-linux-gnu: New directory.
3097 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3098 * config/abi/post/sparc64-linux-gnu/32: New directory.
3099 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3101 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3103 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3104 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3107 2019-02-22 Tom Honermann <tom@honermann.net>
3109 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3110 printers for u8string and u8string_view.
3112 2019-02-22 Tom Honermann <tom@honermann.net>
3114 * testsuite/18_support/byte/ops.cc: Validate
3115 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3116 std::to_integer<char32_t>.
3117 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3118 std::numeric_limits<char8_t>.
3119 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3120 std::numeric_limits<char8_t>::lowest().
3121 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3122 std::numeric_limits<char8_t>::max_digits10.
3123 * testsuite/18_support/type_info/fundamental.cc: Validate
3124 typeinfo for char8_t.
3125 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3126 std::from_chars with char8_t.
3127 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3128 Validate explicit instantiation of std::hash<char8_t>.
3129 * testsuite/20_util/is_integral/value.cc: Validate
3130 std::is_integral<char8_t>.
3131 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3132 Validate std::make_signed<char8_t>.
3133 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3134 Validate u8string construction from char8_t sources.
3135 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3137 * testsuite/21_strings/basic_string_view/operations/compare/
3138 char/70483.cc: Validate substr operations on u8string_view.
3139 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3140 the u8string_view typedef is defined.
3141 * testsuite/21_strings/char_traits/requirements/
3142 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3144 * testsuite/21_strings/char_traits/requirements/
3145 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3146 constexpr member functions.
3147 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3148 that the u8string typedef is defined.
3149 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3150 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3151 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3152 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3154 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3155 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3157 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3158 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3159 Validate std::atomic<char8_t>::is_always_lock_free
3160 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3161 Update line numbers.
3162 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3164 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3166 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3167 Validate std::experimental::pmr::u8string.
3168 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3169 u8string_view typedef is defined.
3170 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3171 char32_t to the typelists.
3173 2019-02-22 Tom Honermann <tom@honermann.net>
3175 * include/ext/typelist.h: Constrain a partial specialization of
3176 typelist::detail::append_ to only match chain<T1,T2>.
3178 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3181 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3182 class template with class. Replace move and copy member types with
3183 member alias templates, so they are only instantiated when needed.
3184 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3185 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3186 test for C++11/14/17 as well.
3187 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3190 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3193 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3194 _GLIBCXX_PURE to the alias declaration.
3196 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3198 * testsuite/21_strings/basic_string/literals/types.cc
3199 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3200 * testsuite/21_strings/basic_string/literals/values.cc
3201 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3202 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3203 potentially having different type.
3204 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3205 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3207 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3208 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3209 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3210 string literals only using basic character set.
3211 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3212 u8 literals to char.
3213 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3214 Test ATOMIC_CHAR8_T_LOCK_FREE.
3215 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3216 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3217 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3218 * testsuite/experimental/string_view/literals/types.cc
3219 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3221 * testsuite/experimental/string_view/literals/values.cc
3222 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3224 2019-02-19 Tom Honermann <tom@honermann.net>
3226 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3227 from char16_32_t.cc; validates numeric_limits<char8_t>.
3228 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3229 test cloned from types.cc; validates operator""s for char8_t
3231 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3232 test cloned from values.cc; validates construction and comparison
3234 * testsuite/21_strings/basic_string/requirements/
3235 /explicit_instantiation/char8_t/1.cc: New test cloned from
3236 char16_t/1.cc; validates explicit instantiation of
3237 basic_string<char8_t>.
3238 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3239 New test cloned from types.cc; validates operator""sv for char8_t
3240 returns u8string_view.
3241 * testsuite/21_strings/basic_string_view/literals/
3242 values-char8_t.cc: New test cloned from values.cc; validates
3243 construction and comparison of u8string_view values.
3244 * testsuite/21_strings/basic_string_view/requirements/
3245 explicit_instantiation/char8_t/1.cc: New test cloned from
3246 char16_t/1.cc; validates explicit instantiation of
3247 basic_string_view<char8_t>.
3248 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3249 New test cloned from char16_t/65049.cc; validates that
3250 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3251 * testsuite/21_strings/char_traits/requirements/char8_t/
3252 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3253 that char_traits<char8_t> member typedefs are present and correct.
3254 * testsuite/21_strings/char_traits/requirements/
3255 explicit_instantiation/char8_t/1.cc: New test cloned from
3256 char16_t/1.cc; validates explicit instantiation of
3257 char_traits<char8_t>.
3258 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3259 from char16_t.cc: validates
3260 codecvt<char16_t, char8_t, mbstate_t>.
3261 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3262 from char32_t.cc: validates
3263 codecvt<char32_t, char8_t, mbstate_t>.
3264 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3265 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3266 codecvt<char32_t, char8_t, std::mbstate_t>.
3267 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3268 test cloned from string.cc; validates filesystem::path construction
3270 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3271 the __cpp_lib_char8_t feature test macro is defined with the
3273 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3274 New test cloned from string.cc; validates filesystem::path
3275 construction from char8_t input.
3276 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3277 test cloned from types.cc; validates operator""sv for char8_t
3278 returns u8string_view.
3279 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3280 New test cloned from values.cc; validates construction and
3281 comparison of u8string_view values.
3282 * testsuite/experimental/string_view/requirements/
3283 explicit_instantiation/char8_t/1.cc: New test cloned from
3284 char16_t/1.cc; validates explicit instantiation of
3285 basic_string_view<char8_t>.
3286 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3287 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3290 2019-02-19 Tom Honermann <tom@honermann.net>
3292 P0482R5 char8_t: Standard library support
3293 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3294 typeinfo symbols for char8_t.
3295 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3296 (GLIBCXX_3.4.26): Add symbols for specializations of
3297 numeric_limits and codecvt that involve char8_t.
3298 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3299 * include/bits/atomic_base.h: Add atomic_char8_t.
3300 * include/bits/basic_string.h: Add std::hash<u8string> and
3301 operator""s(const char8_t*, size_t).
3302 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3304 * include/bits/char_traits.h: Add char_traits<char8_t>.
3305 * include/bits/codecvt.h: Add
3306 codecvt<char16_t, char8_t, mbstate_t>,
3307 codecvt<char32_t, char8_t, mbstate_t>,
3308 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3309 codecvt_byname<char32_t, char8_t, mbstate_t>.
3310 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3311 recognize char8_t as an integral type.
3312 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3314 (path::u8string): Return std::u8string when char8_t support is
3316 (path::generic_u8string): Likewise.
3317 (path::_S_convert): Handle conversion from char8_t input.
3318 (path::_S_str_convert): Likewise.
3319 * include/bits/functional_hash.h: Add hash<char8_t>.
3320 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3322 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3323 for new char8_t specializations.
3324 * include/bits/localefwd.h: Add missing declarations of
3325 codecvt<char16_t, char, mbstate_t> and
3326 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3327 codecvt<char16_t, char8_t, mbstate_t> and
3328 codecvt<char32_t, char8_t, mbstate_t>.
3329 * include/bits/postypes.h: Add u8streampos
3330 * include/bits/stringfwd.h: Add declarations of
3331 char_traits<char8_t> and u8string.
3332 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3333 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3335 (path::u8string): Return std::u8string when char8_t support is
3337 (path::generic_u8string): Likewise.
3338 (path::_S_convert): Handle conversion from char8_t input.
3339 (path::_S_str_convert): Likewise.
3340 * include/experimental/string: Add u8string.
3341 * include/experimental/string_view: Add u8string_view,
3342 hash<experimental::u8string_view>, and
3343 operator""sv(const char8_t*, size_t).
3344 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3345 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3346 as a character type.
3347 * include/std/limits: Add numeric_limits<char8_t>.
3348 * include/std/string_view: Add u8string_view,
3349 hash<experimental::u8string_view>, and
3350 operator""sv(const char8_t*, size_t).
3351 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3352 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3353 * libsupc++/atomic_lockfree_defines.h: Define
3354 ATOMIC_CHAR8_T_LOCK_FREE.
3355 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3356 codecvt.cc and limits.cc so that char8_t specializations of
3357 numeric_limits and codecvt and emitted.
3358 * src/c++11/Makefile.in: Likewise.
3359 * src/c++11/codecvt.cc: Define members of
3360 codecvt<char16_t, char8_t, mbstate_t>,
3361 codecvt<char32_t, char8_t, mbstate_t>,
3362 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3363 codecvt_byname<char32_t, char8_t, mbstate_t>.
3364 * src/c++11/limits.cc: Define members of
3365 numeric_limits<char8_t>.
3366 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3367 locale_init.cc and localename.cc.
3368 * src/c++98/Makefile.in: Likewise.
3369 * src/c++98/locale_init.cc: Add initialization for the
3370 codecvt<char16_t, char8_t, mbstate_t> and
3371 codecvt<char32_t, char8_t, mbstate_t> facets.
3372 * src/c++98/localename.cc: Likewise.
3373 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3375 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3377 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3378 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3379 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3381 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3383 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3384 * doc/html/*: Regenerate.
3386 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3387 * doc/html/*: Regenerate.
3389 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3390 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3391 allocator type in is_constructible checks.
3392 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3393 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3394 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3395 problematic type from LWG 2586 discussion.
3396 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3397 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3399 * configure.ac: Check for C11 timespec_get function.
3400 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3402 * config.h.in: Regenerate.
3403 * configure: Regenerate.
3404 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3405 std for C++17 and up.
3407 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3408 * include/bits/stl_queue.h
3409 (priority_queue(const Compare&, const Container&, const Alloc&))
3410 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3412 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3414 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3415 * include/bits/stl_queue.h (queue, priority_queue): Add static
3416 assertions to enforce LWG 2566 requirement on value_type.
3417 * include/bits/stl_stack.h (stack): Likewise.
3420 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3422 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3423 * include/bits/std_abs.h: Add comment about LWG 2735.
3424 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3426 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3429 * include/std/version [__cpp_impl_destroying_delete]
3430 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3431 * libsupc++/new [__cpp_impl_destroying_delete]
3432 (__cpp_lib_destroying_delete): Likewise.
3433 (destroying_delete_t, destroying_delete): Likewise, but define even
3434 when __cpp_impl_destroying_delete is not defined.
3435 * testsuite/18_support/destroying_delete.cc: New test.
3437 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3440 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3441 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3442 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3443 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3445 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3448 * include/bits/fs_path.h (path::has_root_name)
3449 (path::has_root_directory, path::has_root_path)
3450 (path::has_relative_path, path::has_parent_path)
3451 (path::has_filename, path::has_stem, path::has_extension)
3452 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3454 * src/c++17/fs_path.cc (path::has_root_name)
3455 (path::has_root_directory, path::has_root_path)
3456 (path::has_relative_path, path::has_parent_path)
3457 (path::has_filename, path::_M_find_extension): Add noexcept.
3459 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3461 PR libstdc++/89102 (partial)
3462 * include/std/type_traits (common_type<>): Define.
3463 (common_type<T>): Derive from common_type<T, T>.
3464 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3465 Test zero-length template argument list.
3466 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3467 Test additional single argument cases.
3468 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3469 Adjust expected error.
3471 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3474 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3476 * include/bits/stl_stack.h (stack): Likewise.
3477 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3478 * testsuite/23_containers/queue/deduction.cc: New test.
3479 * testsuite/23_containers/stack/deduction.cc: New test.
3482 * include/std/type_traits (__is_convertible_helper)
3483 (__is_convertible_helper<_From, _To, false>): Revert changes to
3484 support is_nothrow_convertible.
3485 (__is_nt_convertible_helper): New helper.
3486 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3488 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3489 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3492 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3493 __is_alloc_insertable_impl. Replace single type member with two
3494 members, one for each of copy and move insertable.
3495 (__is_move_insertable): New trait for internal use.
3496 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3497 (vector::_S_nothrow_relocate(true_type)): New functions to
3498 conditionally check if __relocate_a can throw.
3499 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3500 on __is_move_insertable.
3501 (vector::_S_do_relocate): New overloaded functions to conditionally
3503 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3504 based on _S_use_relocate.
3505 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3506 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3507 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3510 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3511 parameter unnamed. Add message to static assertion.
3512 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3513 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3516 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3519 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3521 (__is_bitwise_relocatable): ... to this.
3522 (__relocate_a_1): Adapt.
3523 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3524 (__is_bitwise_relocatable): ... to this.
3526 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3529 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3530 final component as well as from _M_pathname. Append the dot using
3531 operator+= instead of only to _M_pathname.
3532 (path::_M_find_extension): Reformat slightly.
3533 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3534 Add more test cases.
3536 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3538 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3540 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3542 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3543 constexpr specifiers from arg and proj.
3545 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3546 __shared_ptr instantiations used by gcc4-compatible ABI.
3548 * include/experimental/forward_list (experimental::erase): Qualify
3550 * include/experimental/list (experimental::erase): Likewise.
3551 * include/std/forward_list (std::erase): Likewise.
3552 * include/std/list (std::erase): Likewise.
3554 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3556 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3557 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3558 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3559 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3560 * testsuite/ext/array_allocator/26875.cc: Likewise.
3561 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3562 * testsuite/util/replacement_memory_operators.h: Likewise.
3563 * testsuite/util/testsuite_allocator.h: Likewise.
3565 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3566 normal mode vector, even for debug mode.
3567 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3568 Define alias template for normal mode vector.
3570 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3573 * config/locale/generic/c_locale.h (__convert_from_v)
3574 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3575 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3576 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3577 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3579 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3582 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3583 data member with static member function _S_use_relocate().
3584 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3585 (vector::_M_default_append): Use _S_use_relocate() instead of
3588 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3591 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3594 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3595 write to stderr instead of using printf.
3597 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3600 * include/bits/char_traits.h (__constant_string_p,
3601 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3604 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3606 Implement C++20 P0600r1.
3607 * include/backward/hash_map: Add nodiscard attribute to empty.
3608 * include/backward/hash_set: Likewise.
3609 * backward/hashtable.h: Likewise.
3610 * include/bits/basic_string.h: Likewise.
3611 * include/bits/forward_list.h: Likewise.
3612 * include/bits/hashtable.h: Likewise.
3613 * include/bits/regex.h: Likewise.
3614 * include/bits/stl_deque.h: Likewise.
3615 * include/bits/stl_list.h: Likewise.
3616 * include/bits/stl_map.h: Likewise.
3617 * include/bits/stl_multimap.h: Likewise.
3618 * include/bits/stl_multiset.h: Likewise.
3619 * include/bits/stl_queue.h: Likewise.
3620 * include/bits/stl_set.h: Likewise.
3621 * include/bits/stl_stack.h: Likewise.
3622 * include/bits/stl_tree.h: Likewise.
3623 * include/bits/stl_vector.h: Likewise.
3624 * include/bits/unordered_map.h: Likewise.
3625 * include/bits/unordered_set.h: Likewise.
3626 * include/debug/array: Likewise.
3627 * include/experimental/any: Likewise.
3628 * include/experimental/bits/fs_path.h: Likewise.
3629 * include/experimental/internet: Likewise.
3630 * include/experimental/string_view: Likewise.
3631 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3633 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3635 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3637 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3639 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3641 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3643 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3645 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3647 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3648 info_fn_imps.hpp: Likewise.
3649 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3650 left_child_next_sibling_heap_.hpp: Likewise.
3651 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3653 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3655 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3657 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3659 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3661 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3663 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3665 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3666 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3667 * include/ext/rope: Likewise.
3668 * include/ext/slist: Likewise.
3669 * include/ext/vstring.h: Likewise.
3670 * include/profile/array: Likewise.
3671 * include/std/array: Likewise.
3672 * include/tr1/array: Likewise.
3673 * include/tr1/hashtable.h: Likewise.
3674 * include/tr1/regex: Likewise.
3675 * include/tr2/dynamic_bitset: Likewise.
3676 * include/bits/alloc_traits.h: Add nodiscard attribute to
3678 * include/experimental/memory_resource: Likewise.
3679 * include/ext/alloc_traits.h: Likewise.
3680 * include/ext/array_allocator.h: Likewise.
3681 * include/ext/bitmap_allocator.h: Likewise.
3682 * include/ext/debug_allocator.h: Likewise.
3683 * include/ext/extptr_allocator.h: Likewise.
3684 * include/ext/mt_allocator.h: Likewise.
3685 * include/ext/new_allocator.h: Likewise.
3686 * include/ext/pool_allocator.h: Likewise.
3687 * include/ext/throw_allocator.h: Likewise.
3688 * include/std/scoped_allocator: Likewise.
3689 * libsupc++/eh_alloc.cc: Likewise.
3690 * include/std/future: Add nodiscard attribute to async.
3691 * libsupc++/new: Add nodiscard attribute to new.
3693 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3698 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3699 * include/bits/shared_ptr.h
3700 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3701 (allocate_shared): Change to use new tag type.
3702 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3703 Declare new member function.
3704 (_Sp_alloc_shared_tag): Define new type.
3705 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3706 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3707 _Sp_make_shared_tag::_S_eq to check type_info.
3708 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3709 Constrain to prevent being called with _Sp_alloc_shared_tag.
3710 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3711 Replace constructor with ...
3712 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3713 reference parameter so address of the new object can be returned to
3714 the caller. Obtain the allocator from the tag type.
3715 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3716 constructor with ...
3717 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3718 to the __shared_count constructor.
3719 (__allocate_shared): Change to use new tag type.
3720 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3722 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3724 * src/c++17/fs_ops.cc
3725 (equivalent(const path&, const path&, error_code&))
3726 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3727 compare files instead of relying on incomplete info returned by stat.
3730 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3731 if the path is already absolute.
3732 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3733 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3736 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3737 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3738 of filesystem::exists.
3739 (create_directories(const path&, error_code&)): Add assertions.
3740 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3741 Add workaround for bug in _wstat for paths with trailing slash.
3742 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3743 for expected behaviour on mingw.
3744 * testsuite/experimental/filesystem/operations/create_directories.cc:
3746 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3747 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3748 not test permissions on mingw targets.
3750 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3752 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3753 constructors and open members taking wide strings. Fix patterns for
3754 filesystem::path members to match wstring_view parameters. Add
3755 exports for shared_ptr members used by directory iterators.
3756 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3757 error code parameter if the file doesn't exist.
3758 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3760 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3761 values for mingw targets, where "/" is not an absolute path. Do not
3762 test symlinks on mingw targets.
3763 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3764 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3766 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3767 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3768 that each component of the path is created.
3769 * testsuite/experimental/filesystem/operations/create_directories.cc:
3771 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3772 permissions on mingw targets.
3773 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3774 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3775 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3776 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3778 * testsuite/experimental/filesystem/operations/permissions.cc:
3780 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3781 symlinks or permissions on mingw targets.
3782 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3783 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3784 symlinks on mingw targets.
3785 * testsuite/experimental/filesystem/operations/remove_all.cc:
3787 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3788 permissions on mingw targets.
3789 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3790 test symlinks on mingw targets.
3791 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3794 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3797 Warn about unused comparisons of shared_ptr/unique_ptr
3798 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3799 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3800 <, <=, >, >= for shared_ptr.
3801 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3803 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3805 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3806 as 201611L, because P0497R0 changes are supported.
3807 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3809 * include/bits/erase_if.h [__cplusplus > 201703L]
3810 (__cpp_lib_erase_if): Only define for C++2a.
3811 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3812 (__cpp_lib_null_iterators): Define.
3813 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3814 (__cpp_lib_null_iterators): Define.
3815 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3817 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3819 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3821 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3822 changes are supported.
3823 * include/std/optional (__cpp_lib_optional): Likewise.
3824 * include/std/variant (__cpp_lib_variant): Likewise.
3825 * include/std/version [!__STRICT_ANSI__]
3826 (__cpp_lib_uncaught_exceptions): Define as long integer.
3827 [__cplusplus >= 201703L] (__cpp_lib_any)
3828 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3829 (__cpp_lib_variant): Define for C++17.
3830 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3832 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3835 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3837 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3841 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3843 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3846 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3848 * doc/xml/manual/intro.xml: Include new section.
3849 * doc/xml/manual/status_cxx2017.xml: Document more
3850 implementation-defined properties of the library.
3851 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3852 * doc/html/*: Regenerate.
3854 * include/bits/refwrap.h [__cplusplus > 201703L]
3855 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3856 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3857 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3859 (reference_wrapper::operator()): Add static assertion.
3860 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3862 * include/std/chrono (duration_values::zero(), duration_values::min())
3863 (duration_values::max()): Add noexcept.
3864 (duration::zero(), duration::min(), duration::max()): Likewise.
3865 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3866 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3867 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3869 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3871 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3873 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3874 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3876 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3879 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3880 specialization for C++17 (P0513R0, LWG 2817).
3881 * testsuite/20_util/hash/nullptr.cc: New test.
3884 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3885 pattern for std::basic_stringbuf::str().
3887 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3888 basic_ostream::operator<< patterns.
3890 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3892 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3893 test failures on targets with 32-bit time_t.
3895 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3896 * include/std/deque: Likewise.
3897 * include/std/forward_list: Likewise.
3898 * include/std/list: Likewise.
3899 * include/std/string: Likewise.
3900 * include/std/vector: Likewise.
3901 * include/std/version: Likewise.
3902 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3903 * testsuite/23_containers/deque/erasure.cc: Likewise.
3904 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3905 * testsuite/23_containers/list/erasure.cc: Likewise.
3906 * testsuite/23_containers/map/erasure.cc: Likewise.
3907 * testsuite/23_containers/set/erasure.cc: Likewise.
3908 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3909 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3910 * testsuite/23_containers/vector/erasure.cc: Likewise.
3912 * include/experimental/internet [AI_NUMERICSERV]
3913 (resolver_base::numeric_service): Define conditionally.
3914 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3916 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3919 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3920 Jonathan Wakely <jwakely@redhat.com>
3923 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3924 (GLIBCXX_3.4.26): Add new exports.
3925 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3926 correct list of sources.
3927 * include/Makefile.in: Regenerate.
3928 * include/std/ostream (operator<<(nullptr_t)): New member function.
3929 * src/c++17/ostream-inst.cc: New file.
3930 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3933 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3935 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3936 of the source file containing the caller.
3937 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3938 directories created by test.
3939 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3941 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3943 * testsuite/experimental/filesystem/iterators/
3944 recursive_directory_iterator.cc: Likewise.
3946 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3948 PR tree-optimization/88775
3949 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3950 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3951 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3952 instead of __builtin_constant_p if available. Don't bother with
3953 the pointer comparison in C++11 and earlier.
3955 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3959 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3962 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3964 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3965 for filesystem::path. Give variables more distinctive names.
3967 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3968 member function to perform non-trivial assignment.
3969 (_Optional_payload_base::_M_move_assign): Likewise.
3970 (_Optional_payload<T, true, false, true>::operator=)
3971 (_Optional_payload<T, true, true, false>::operator=)
3972 (_Optional_payload<T, true, false, false>::operator=): Call
3973 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3976 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3977 test std::complex<long double> if long double format is IBM128.
3978 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3981 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3983 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3984 for old std::unique_ptr layout.
3985 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3986 to become valueless. Add filesystem::path tests.
3989 * include/std/optional (_Optional_payload_base): New class template
3990 for common code hoisted from _Optional_payload specializations. Use
3991 a template for the union, to allow a partial specialization for
3992 types with non-trivial destructors. Add constructors for in-place
3993 initialization to the union.
3994 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3995 to perform non-trivial copy construction, instead of relying on
3996 non-standard copy elision in a delegating constructor.
3997 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3998 non-trivial move construction.
3999 (_Optional_payload): Derive from _Optional_payload_base and use it
4000 for everything except the non-trivial assignment operators, which are
4002 (_Optional_payload<false, C, M>): Derive from the specialization
4003 _Optional_payload<true, false, false> and add a destructor.
4004 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4005 Forward to corresponding members of _Optional_payload.
4006 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4007 Hoist common members from _Optional_base.
4008 (_Optional_base): Make all members and base class public.
4009 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4010 _Optional_base_impl.
4011 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4012 support for new std::optional layout.
4013 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4016 * include/bits/locale_conv.h: Use <> for includes not "".
4017 * include/ext/random: Likewise.
4018 * include/ext/vstring.h: Likewise.
4020 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4022 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4023 (GLIBCXX_3.4.21): Likewise.
4025 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4028 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4029 to match the one that controls whether utimbuf and utime are declared.
4031 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4034 * include/bits/char_traits.h (char_traits::move): Do not pass null
4035 pointers to memmove.
4036 * include/bits/locale_facets.h
4037 (ctype<char>::widen(const char*, const char*, char*)): Do not
4038 pass null pointers to memcpy.
4039 (ctype<char>::narrow(const char*, const char*, char, char*)):
4041 (ctype<char>::do_widen(const char*, const char*, char*)):
4043 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4046 * doc/xml/manual/spine.xml: Update copyright years.
4047 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4048 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4049 for C++17 filesystem library.
4050 * doc/html/*: Regenerate.
4052 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4053 * config.h.in: Regenerate.
4054 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4055 alphabetically and add missing entries for copy_symlink,
4056 hard_link_count, rename, and resize_file.
4057 * configure: Regenerate.
4058 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4059 used unconditionally.
4060 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4061 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4062 supports truncating to zero length.
4063 * testsuite/27_io/filesystem/operations/all.cc: New test.
4064 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4066 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4069 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4070 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4071 * config.h.in: Regenerate.
4072 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4073 remaining std::filesystem types and functions.
4074 * configure: Regenerate.
4075 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4076 * src/c++17/Makefile.in: Regenerate.
4077 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4078 here, and change name of included file.
4079 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4080 here, and change name of included file.
4081 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4082 path to dir-common.h.
4083 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4084 path to ops-common.h. Disable -Wunused-parameter warnings.
4085 (internal_file_clock): Define unconditionally.
4086 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4088 (do_copy_file, do_space): Move definitions to ops.common.h.
4089 (copy, file_size, hard_link_count, last_write_time, space): Only
4090 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4092 (last_write_time, read_symlink): Remove unused attributes from
4094 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4095 * src/filesystem/Makefile.in: Regenerate.
4096 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4097 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4098 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4099 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4100 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4101 dummy types and functions instead of using #error.
4102 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4103 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4105 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4106 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4107 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4108 to account for new namespace.
4109 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4110 -lstdc++fs from dg-options.
4111 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4112 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4113 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4114 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4115 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4117 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4118 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4120 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4121 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4122 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4123 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4124 * testsuite/27_io/filesystem/operations/create_directories.cc:
4126 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4127 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4128 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4129 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4130 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4131 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4132 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4133 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4134 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4135 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4136 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4137 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4138 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4139 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4140 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4141 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4142 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4143 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4145 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4149 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4150 typeinfo and vtables less greedy.
4151 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4152 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4153 * src/c++17/Makefile.in: Regenerate.
4154 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4155 here, and change name of included file.
4156 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4157 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4159 * src/filesystem/Makefile.in: Regenerate.
4160 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4161 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4162 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4163 from dg-options and remove dg-require-filesystem-ts.
4164 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4165 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4166 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4167 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4168 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4169 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4170 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4171 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4172 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4173 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4174 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4175 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4176 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4177 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4178 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4179 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4180 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4181 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4182 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4183 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4184 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4186 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4187 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4188 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4189 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4190 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4191 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4192 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4193 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4194 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4195 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4196 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4197 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4199 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4201 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4203 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4205 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4206 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4207 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4208 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4209 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4210 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4211 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4212 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4213 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4214 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4216 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4217 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4218 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4219 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4220 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4223 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4224 Check is_trivially_copyable instead of is_scalar.
4225 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4226 contained value can throw and its type is trivially copyable then
4227 construct into a temporary variant and move from it, to provide the
4228 strong exception safety guarantee.
4229 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4231 * testsuite/20_util/variant/87431.cc: New test.
4232 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4233 conversion causes valueless state.
4236 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4237 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4238 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4239 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4240 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4242 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4244 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4245 (file_time_type): Redefine in terms of __file_clock.
4246 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4248 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4250 (internal_file_lock): New helper type for accessing __file_clock.
4251 (do_copy_file): Use internal_file_lock to convert system time to
4253 (last_write_time(const path&, error_code&)): Likewise.
4254 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4256 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4258 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4259 for const member functions of std::basic_string.
4260 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4262 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4263 Make non-standard constructor private.
4264 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4266 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4267 explicit instantiations for C++17 as well as earlier dialects.
4268 * src/c++17/Makefile.am: Add new source files.
4269 * src/c++17/Makefile.in: Regenerate.
4270 * src/c++17/cow-string-inst.cc: New file defining explicit
4271 instantiations for basic_string member functions added in C++17.
4272 * src/c++17/string-inst.cc: Likewise.
4274 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4275 copy/move constructors for old std::basic_string.
4276 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4277 (basic_string::reference, basic_string::const_reference): Define
4278 as plain references for C++11 and later.
4279 (basic_string::basic_string()): Put constructor body outside
4280 preprocessor conditional groups.
4281 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4282 instead of copying it.
4283 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4285 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4287 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4288 cases for old basic_string.
4289 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4290 allocator-extended constructors unconditionally. Add extra members to
4291 allocator type when using old string ABI.
4292 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4294 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4296 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4297 -fno-inline added to test flags.
4299 * testsuite/21_strings/basic_string/requirements/
4300 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4302 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4303 assertion failures with old std::string ABI.
4305 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4307 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4308 functions that will only erase elements at the end.
4309 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4310 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4311 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4313 (path::_List::pop_back()): Define.
4314 (path::_List::_M_erase_from(const_iterator)): Define.
4315 (path::operator/=(const path&)): Use pop_back to remove last component
4316 and _M_erase_from to remove multiple components.
4317 (path::_M_append(basic_string_view<value_type>)): Likewise.
4318 (path::operator+=(const path&)): Likewise.
4319 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4320 (path::remove_filename()): Likewise.
4321 (path::lexically_normal()): Use _List::_Impl iterators instead of
4322 path::iterator. Use pop_back to remove components from the end. Clear
4323 trailing filename, instead of using erase(const_iterator) to remove
4324 a non-final component.
4325 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4327 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4329 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4330 incorrect treatment of empty filename after trailing slash.
4331 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4333 * testsuite/21_strings/basic_string/modifiers/assign/char/
4334 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4336 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4337 move_assign_optim.cc: Likewise.
4339 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4340 Jakub Jelinek <jakub@redhat.com>
4343 * include/experimental/memory: Replace UTF-8 quote characters.
4344 * include/std/future: Replace UTF-8 "em dash" characters.
4346 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4349 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4350 * include/debug/forward_list: Likewise.
4351 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4353 * include/experimental/chrono: Likewise.
4354 * include/experimental/functional: Likewise.
4355 * include/experimental/ratio: Likewise.
4356 * include/experimental/system_error: Likewise.
4357 * include/experimental/tuple: Likewise.
4358 * include/experimental/type_traits: Likewise.
4359 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4360 * include/parallel/multiseq_selection.h: Likewise.
4363 * config/abi/pre/gnu.ver: Add missing exports.
4364 * testsuite/22_locale/collate_byname/88681.cc: New test.
4365 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4366 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4368 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4370 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4371 initializer_list<value_type> and from input iterator ranges.
4372 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4374 * testsuite/experimental/string_view/element_access/char/empty.cc:
4375 Fix year range in copyright header.
4377 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4379 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4380 Fix year range in copyright header.
4382 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4384 Update copyright years.
4386 Copyright (C) 2019 Free Software Foundation, Inc.
4388 Copying and distribution of this file, with or without modification,
4389 are permitted in any medium without royalty provided the copyright
4390 notice and this notice are preserved.