1 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
4 category used in invocable check.
5 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
6 * testsuite/26_numerics/reduce/2.cc: New test.
8 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
10 * include/bits/algorithmfwd.h: Change title of doc group.
11 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
13 * include/bits/stl_numeric.h: Define doc group and add algos to it.
14 * include/std/numeric (__is_random_access_iter): New internal trait.
15 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
16 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
17 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
18 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
19 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
20 * testsuite/26_numerics/reduce/1.cc: New test.
21 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
22 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
23 * testsuite/26_numerics/transform_reduce/1.cc: New test.
24 * testsuite/util/testsuite_iterators.h (test_container::size()): New
27 * include/c_global/cstddef (std::byte): Perform arithmetic operations
28 in unsigned int to avoid promotion (LWG 2950).
30 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
32 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
35 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
37 PR libstdc++/90281 Fix string conversions for filesystem::path
38 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
39 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
40 __str_codecvt_in_all to fail for partial conversions and throw on
42 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
43 (path::_Cvt<char8_t>): Add explicit specialization.
44 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
46 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
47 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
48 instead of codecvt_utf8. Use __str_codecvt_in_all and
49 __str_codecvt_out_all.
50 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
51 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
52 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
53 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
54 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
55 after converting to UTF-8.
56 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
58 (path::string): Fix initialization of string types with different
60 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
61 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
62 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
64 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
65 return false for partial conversions.
66 * include/experimental/bits/fs_path.h (u8path):
67 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
68 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
69 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
70 instead of codecvt_utf8. Use __str_codecvt_in_all and
71 __str_codecvt_out_all.
72 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
73 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
74 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
75 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
76 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
77 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
79 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
80 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
81 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
83 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
84 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
85 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
86 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
87 strings and with Unicode characters outside the basic multilingual
89 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
90 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
91 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
92 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
93 * testsuite/experimental/filesystem/path/native/string.cc: Test with
94 empty strings and with Unicode characters outside the basic
97 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
98 Jonathan Wakely <jwakely@redhat.com>
100 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
101 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
102 deallocate node if insertion fails.
103 (_Hashtable::_M_insert_multi_node): Likewise.
104 (_Hashtable::_M_reinsert_node): Pass additional key argument.
105 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
106 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
107 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
108 (_Hashtable::extract(const _Key&)): Likewise.
109 (_Hashtable::_M_merge_unique): Pass additional key argument.
110 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
112 (_Hashtable::_M_insert): Likewise.
113 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
114 (_Hashtable_alloc): Add comments to functions with misleading names.
116 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
118 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
120 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
121 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
122 header for std::allocator.
123 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
124 using-declaration for std::size_t.
125 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
127 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
129 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
130 * testsuite/experimental/map/erasure.cc: Include <string> for
132 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
134 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
136 * include/experimental/type_traits (experimental::nonesuch): Use
137 pragma to disable -Wctor-dtor-privacy warnings.
138 * include/std/type_traits (__is_convertible_helper<From, To, false>)
139 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
141 * include/std/version (__cpp_lib_bind_front): Add missing macro.
143 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
145 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
146 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
147 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
148 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
150 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
151 (variant::emplace): Change static_assert messages from "should be"
153 (hash<monostate>::operator()): Remove name of unused parameter.
155 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
158 * include/Makefile.am: Add new <bits/charconv.h> header.
159 * include/Makefile.in: Regenerate.
160 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
161 (to_string(long), to_string(unsigned long), to_string(long long))
162 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
163 * include/bits/charconv.h: New header.
164 (__detail::__to_chars_len): Move here from <charconv>.
165 (__detail::__to_chars_10_impl): New function extracted from
166 __detail::__to_chars_10.
167 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
168 (__to_chars_unsigned_type): New class template that reuses
169 __make_unsigned_selector_base::__select to pick a type.
170 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
171 (__detail::__to_chars_len): Move to new header.
172 (__detail::__to_chars_10): Add inline specifier. Move code doing the
173 output to __detail::__to_chars_10_impl and call that.
174 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
175 * testsuite/21_strings/basic_string/numeric_conversions/char/
176 to_string.cc: Fix reference in comment. Remove unused variable.
177 * testsuite/21_strings/basic_string/numeric_conversions/char/
178 to_string_int.cc: New test.
180 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
182 Fix ConstexprIterator requirements tests - No constexpr algorithms!
183 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
184 Replace copy with hand-rolled loop.
185 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
188 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
190 Test for C++20 p0858 - ConstexprIterator requirements.
191 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
193 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
196 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
198 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
200 * include/bits/c++config: Rename all macros of the form __PSTL* to
202 * include/std/algorithm: Likewise.
203 * include/std/execution: Likewise.
204 * include/std/numeric: Likewise.
205 * include/std/memory: Likewise.
206 * include/pstl/glue_memory_impl.h: Likewise.
207 * include/pstl/numeric_impl.h: Likewise.
208 * include/pstl/glue_memory_defs.h: Likewise.
209 * include/pstl/execution_defs.h: Likewise.
210 * include/pstl/utils.h: Likewise.
211 * include/pstl/algorithm_fwd.h: Likewise.
212 * include/pstl/unseq_backend_simd.h: Likewise.
213 * include/pstl/glue_execution_defs.h: Likewise.
214 * include/pstl/algorithm_impl.h: Likewise.
215 * include/pstl/parallel_impl.h: Likewise.
216 * include/pstl/memory_impl.h: Likewise.
217 * include/pstl/glue_numeric_defs.h: Likewise.
218 * include/pstl/parallel_backend_utils.h: Likewise.
219 * include/pstl/glue_algorithm_defs.h: Likewise.
220 * include/pstl/parallel_backend.h: Likewise.
221 * include/pstl/glue_numeric_impl.h: Likewise.
222 * include/pstl/parallel_backend_tbb.h: Likewise.
223 * include/pstl/numeric_fwd.h: Likewise.
224 * include/pstl/glue_algorithm_impl.h: Likewise.
225 * include/pstl/execution_impl.h: Likewise.
226 * include/pstl/pstl_config.h: Likewise.
227 * testsuite/util/pstl/pstl_test_config.h: Likewise.
228 * testsuite/util/pstl/test_utils.h: Likewise.
229 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
231 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
233 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
235 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
236 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
237 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
238 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
239 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
241 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
242 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
243 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
244 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
245 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
247 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
248 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
249 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
250 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
251 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
253 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
254 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
255 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
257 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
259 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
260 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
261 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
263 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
265 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
267 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
269 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
271 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
273 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
275 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
277 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
279 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
281 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
283 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
285 Rename header guards to be consistent with upstream project's
287 * include/pstl/glue_memory_impl.h: Rename all macros of the form
288 _PSTL_(.*)_H to _PSTL_\U\1_H.
289 * include/pstl/numeric_impl.h: Likewise.
290 * include/pstl/glue_memory_defs.h: Likewise.
291 * include/pstl/execution_defs.h: Likewise.
292 * include/pstl/utils.h: Likewise.
293 * include/pstl/algorithm_fwd.h: Likewise.
294 * include/pstl/unseq_backend_simd.h: Likewise.
295 * include/pstl/glue_execution_defs.h: Likewise.
296 * include/pstl/algorithm_impl.h: Likewise.
297 * include/pstl/parallel_impl.h: Likewise.
298 * include/pstl/memory_impl.h: Likewise.
299 * include/pstl/glue_numeric_defs.h: Likewise.
300 * include/pstl/parallel_backend_utils.h: Likewise.
301 * include/pstl/glue_algorithm_defs.h: Likewise.
302 * include/pstl/parallel_backend.h: Likewise.
303 * include/pstl/glue_numeric_impl.h: Likewise.
304 * include/pstl/parallel_backend_tbb.h: Likewise.
305 * include/pstl/numeric_fwd.h: Likewise.
306 * include/pstl/glue_algorithm_impl.h: Likewise.
307 * include/pstl/execution_impl.h: Likewise.
308 * include/pstl/pstl_config.h: Likewise.
309 * testsuite/util/pstl/pstl_test_config.h: Likewise.
311 Synchronize libstdc++ parallel algorithms with upstream
313 * include/pstl/algorithm_fwd.h: Synchronize with
314 upstream PSTL project.
315 * include/pstl/algorithm_impl.h: Likewise.
316 * include/pstl/execution_defs.h: Likewise.
317 * include/pstl/execution_impl.h: Likewise.
318 * include/pstl/glue_algorithm_impl.h: Likewise.
319 * include/pstl/glue_execution_defs.h: Likewise.
320 * include/pstl/numeric_fwd.h: Likewise.
321 * include/pstl/numeric_impl.h: Likewise.
322 * include/pstl/parallel_backend.h: Likewise.
323 * include/pstl/pstl_config.h: Likewise.
324 * include/pstl/unseq_backend_simd.h: Likewise.
325 * include/pstl/parallel_backend_serial.h: New file.
326 * include/Makefile.am (pstl_headers): Add
327 parallel_backend_serial.h.
328 * include/Makefile.in: Regenerate.
330 Clean up non-conforming names
331 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
332 Uglfiy copy_range1 and copy_range2
333 (__pattern_walk2_n): Rename local n to __n
334 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
335 Rename parameter _T to _Tp.
337 Integrate non-TBB serial backend support
338 * include/bits/c++config: Adjust TBB detection logic to select serial
339 PSTL backend if no TBB present.
340 * testsuite/utils/pstl/test_utils.h: Remove check for
341 _PSTL_USE_PAR_POLICIES
343 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
345 * testsuite/24_iterators/container_access.cc: Move dg-options before
346 dg-do directive so the target check uses the -std option.
349 * configure: Regenerate.
350 * src/Makefile.am (stamp-debug): Also test for missing makefile.
351 * src/Makefile.in: Regenerate.
353 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
355 * include/std/array: Do not include <stdexcept>.
356 * include/std/optional: Include <exception> and
357 <bits/exception_defines.h> instead of <stdexcept>.
358 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
360 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
362 * testsuite/23_containers/map/erasure.cc: Include <string>.
363 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
365 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
366 dg-prune-output for different C++98 diagnostic.
367 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
369 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
371 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
373 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
375 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
377 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
379 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
381 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
383 * testsuite/23_containers/vector/requirements/dr438/
384 constructor_1_neg.cc: Likewise.
385 * testsuite/23_containers/vector/requirements/dr438/
386 constructor_2_neg.cc: Likewise.
387 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
389 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
391 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
392 Do not test allocator rebinding extension for C++2a.
393 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
394 dg-do directive for C++17 and C++2a.
396 * testsuite/23_containers/deque/requirements/explicit_instantiation/
397 1_c++0x.cc: Remove redundant test.
398 * testsuite/23_containers/deque/requirements/explicit_instantiation/
399 2.cc: Use target selector instead of preprocessor condition.
400 * testsuite/23_containers/deque/requirements/explicit_instantiation/
401 3.cc: Do not run test for C++2a.
402 * testsuite/23_containers/forward_list/requirements/
403 explicit_instantiation/3.cc: Likewise.
404 * testsuite/23_containers/forward_list/requirements/
405 explicit_instantiation/5.cc: Do not test allocator rebinding extension
407 * testsuite/23_containers/list/requirements/explicit_instantiation/
408 1_c++0x.cc: Remove redundant test.
409 * testsuite/23_containers/list/requirements/explicit_instantiation/
410 2.cc: Use target selector instead of preprocessor condition.
411 * testsuite/23_containers/list/requirements/explicit_instantiation/
412 3.cc: Do not run test for C++2a.
413 * testsuite/23_containers/list/requirements/explicit_instantiation/
414 5.cc: Do not test allocator rebinding extension for C++2a.
415 * testsuite/23_containers/map/requirements/explicit_instantiation/
416 1_c++0x.cc: Remove redundant test.
417 * testsuite/23_containers/map/requirements/explicit_instantiation/
418 2.cc: Adjust comment.
419 * testsuite/23_containers/map/requirements/explicit_instantiation/
420 3.cc: Do not run test for C++2a.
421 * testsuite/23_containers/map/requirements/explicit_instantiation/
422 5.cc: Do not test allocator rebinding extension for C++2a.
423 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
424 1_c++0x.cc: Remove redundant test.
425 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
426 3.cc: Do not run test for C++2a.
427 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
428 5.cc: Do not test allocator rebinding extension for C++2a.
429 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
430 3.cc: Do not run test for C++2a.
431 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
432 5.cc: Do not test allocator rebinding extension for C++2a.
433 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
434 Do not run test for C++2a.
435 * testsuite/23_containers/set/requirements/explicit_instantiation/
436 1_c++0x.cc: Remove redundant test.
437 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
438 Do not test allocator rebinding extension for C++2a.
439 * testsuite/23_containers/unordered_map/requirements/
440 explicit_instantiation/3.cc: Likewise.
441 * testsuite/23_containers/unordered_map/requirements/
442 explicit_instantiation/5.cc: Do not test allocator rebinding extension
444 * testsuite/23_containers/unordered_multimap/requirements/
445 explicit_instantiation/3.cc: Do not run test for C++2a.
446 * testsuite/23_containers/unordered_multimap/requirements/
447 explicit_instantiation/5.cc: Do not test allocator rebinding extension
449 * testsuite/23_containers/unordered_multiset/requirements/
450 explicit_instantiation/3.cc: Do not run test for C++2a.
451 * testsuite/23_containers/unordered_multiset/requirements/
452 explicit_instantiation/5.cc: Do not test allocator rebinding extension
454 * testsuite/23_containers/unordered_set/requirements/
455 explicit_instantiation/3.cc: Do not run test for C++2a.
456 * testsuite/23_containers/unordered_set/requirements/
457 explicit_instantiation/5.cc: Do not test allocator rebinding extension
459 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
460 2.cc: Remove redundant test.
461 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
462 3.cc: Do not run test for C++2a.
463 * testsuite/23_containers/vector/requirements/explicit_instantiation/
466 * include/std/type_traits (is_empty, is_polymorphic, is_final)
467 (is_abstract, is_aggregate): Remove static_assert.
468 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
470 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
471 missing -std=gnu++17 option.
472 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
473 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
474 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
477 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
478 * testsuite/18_support/set_unexpected.cc: Likewise.
479 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
481 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
482 function to be valid in C++11.
483 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
484 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
485 include Library Fundamentals or Networking headers in C++11 mode.
486 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
488 * include/std/tuple (_TC): Replace with _TupleConstraints.
489 (_TupleConstraints): New helper for SFINAE constraints, with more
490 expressive member functions to reduce duplication when used.
491 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
492 (tuple::_TCC): Replace dummy type parameter with bool non-type
493 parameter that can be used to check the pack size.
494 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
495 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
496 checking constraints in constructors.
497 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
499 (tuple::tuple): Use new helpers to reduce repitition in constraints.
500 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
501 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
502 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
503 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
504 constraints in constructors.
505 (tuple::__is_alloc_arg()): New SFINAE helpers.
506 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
508 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
509 * testsuite/20_util/tuple/cons/90700.cc: New test.
510 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
511 to meet new constraint on allocator-extended default constructor.
513 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
515 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
516 * include/bits/stl_multimap.h (multimap): Likewise.
518 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
520 Rename variables and cleanup comments.
521 * include/bits/hashtable_policy.h
522 * include/bits/hashtable.h
524 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
526 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
527 Fix bgcolor for P0340R3.
528 * doc/html/*: Regenerate.
531 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
532 <experimental/memory_resource>.
533 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
534 P0339R6, P0340R3, P1164R1 and P1357R1.
535 * doc/html/*: Regenerate.
537 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
538 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
539 allocator::value_type assertion for C++2a.
540 * include/bits/hashtable.h: Likewise.
541 * include/bits/stl_deque.h: Likewise.
542 * include/bits/stl_list.h: Likewise.
543 * include/bits/stl_map.h: Likewise.
544 * include/bits/stl_multimap.h: Likewise.
545 * include/bits/stl_multiset.h: Likewise.
546 * include/bits/stl_set.h: Likewise.
547 * include/bits/stl_vector.h: Likewise.
548 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
549 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
550 * testsuite/23_containers/list/48101-3_neg.cc: New test.
551 * testsuite/23_containers/map/48101-3_neg.cc: New test.
552 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
553 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
554 * testsuite/23_containers/set/48101-3_neg.cc: New test.
555 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
556 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
557 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
558 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
559 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
561 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
563 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
565 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
567 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
569 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
571 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
573 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
575 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
578 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
579 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
580 * libsupc++/eh_term_handler.h: New header defining
581 _GLIBCXX_DEFAULT_TERM_HANDLER.
582 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
583 (set_terminate): Restore default handler when argument is null.
584 (set_unexpected): Likewise.
585 * testsuite/18_support/set_terminate.cc: New test.
586 * testsuite/18_support/set_unexpected.cc: New test.
588 * include/backward/hashtable.h (size_t, ptrdiff_t)
589 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
590 (distance, vector, pair, __iterator_category): Remove
591 using-declarations that add these names to namespace __gnu_cxx.
592 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
593 * include/ext/debug_allocator.h (size_t): Likewise.
594 * include/ext/functional (size_t, unary_function, binary_function)
595 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
597 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
598 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
599 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
600 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
601 * include/ext/numeric (iota): Fix outdated comment.
602 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
603 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
604 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
605 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
606 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
608 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
609 (allocator, __true_type, __false_type): Likewise.
611 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
614 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
615 New helpers for checking preconditions in traits.
616 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
617 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
618 (is_destructible, is_nothrow_destructible, is_constructible)
619 (is_default_constructible, is_copy_constructible)
620 (is_move_constructible, is_nothrow_default_constructible)
621 (is_nothrow_constructible, is_nothrow_copy_constructible)
622 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
623 (is_nothrow_assignable, is_nothrow_copy_assignable)
624 (is_nothrow_move_assignable, is_trivially_constructible)
625 (is_trivially_copy_constructible, is_trivially_move_constructible)
626 is_trivially_assignable, is_trivially_copy_assignable)
627 (is_trivially_move_assignable, is_trivially_destructible)
628 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
629 (is_invocable_r, is_nothrow_invocable)
630 (has_unique_object_representations, is_aggregate): Add static_asserts
631 to make sure that type traits are not misused with incomplete types.
632 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
633 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
634 base characteristics without assertions that can be reused in other
636 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
637 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
639 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
640 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
641 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
642 * testsuite/20_util/is_class/value.cc: Check incomplete type.
643 * testsuite/20_util/is_function/value.cc: Likewise.
644 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
645 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
647 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
648 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
649 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
650 * testsuite/20_util/is_union/value.cc: Likewise.
651 * testsuite/20_util/is_void/value.cc: Likewise.
652 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
654 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
656 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
657 Add new private member function.
658 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
659 (random_device::_M_init_pretr1(const string&)): Call new private
660 member with string data.
661 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
663 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
664 test using COW strings.
665 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
666 a value from the device.
667 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
668 Fix typo in token string.
670 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
672 LWG2788 basic_string spurious use of a default constructible allocator
673 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
674 (basic_string::_M_replace_dispatch): Construct temporary string with
675 the current allocator.
676 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
677 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
679 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
681 * doc/xml/manual/diagnostics.xml: Update list of headers that define
683 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
684 section about new/delete overloads. Improve section on verbose
686 * doc/html/*: Regenerate.
688 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
689 P0811R3. Change status of P1353R0.
690 * doc/html/*: Regenerate.
692 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
693 documentation of implementation-defined types for [thread.req.native].
694 * doc/xml/manual/status_cxx2017.xml: Update documentation of
695 implementation-defined strings for [variant.bad.access]. Fix typo in
696 documentation of implementation-defined support for [fs.conform.9945].
697 * doc/html/*: Regenerate.
699 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
702 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
703 that fails on mingw-w64.
706 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
707 (status(const path&, error_code&)): Use parent_path() to remove
709 (symlink_status(const path&, error_code&)): Duplicate workaround for
710 bug in _wstat for paths with trailing slash.
711 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
713 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
714 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
716 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
717 once instead of building it iteratively.
719 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
721 PR libstdc++/85494 use rdseed and rand_s in std::random_device
722 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
723 the assembler supports rdseed.
724 * config.h.in: Regenerate.
725 * configure: Regenerate.
726 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
727 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
728 * doc/html/*: Regenerate.
729 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
730 * include/bits/random.h (random_device::random_device()): Always call
731 _M_init rather than _M_init_pretr1.
732 (random_device::random_device(const string&)): Likewise.
733 (random_device::operator()()): Always call _M_getval().
734 (random_device::_M_file): Replace first member of union with an
735 anonymous struct, with _M_file as its first member.
736 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
737 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
738 (USE_MT19937): Define if none of the above are defined.
739 (USE_POSIX_FILE_IO): Define.
740 (_M_strtoul): Remove.
741 [USE_RDSEED] (__x86_rdseed): Define new function.
742 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
743 (random_device::_M_init(const string&)): Initialize new union members.
744 Add support for "rdseed" and "rand_s" tokens. Decide what the
745 "default" token does according to which USE_* macros are defined.
746 [USE_POSIX_FILE_IO]: Store a file descriptor.
747 [USE_MT19937]: Forward to _M_init_pretr1 instead.
748 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
749 code from _M_strtoul.
750 [!USE_MT19937]: Call _M_init, transforming the old default token or
751 numeric tokens to "default".
752 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
753 (random_device::_M_getval()): Use new union members to obtain a
754 random number from the stored function pointer or file descriptor.
755 [USE_MT19937]: Obtain a value from the mt19937 engine.
756 (random_device::_M_getval_pretr1()): Call _M_getval().
757 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
759 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
760 * testsuite/26_numerics/random/random_device/85494.cc: New test.
762 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
765 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
766 _M_split_cmpts() for a path with multiple components.
767 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
768 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
769 components and reserve space in vector. Return early when there is
771 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
772 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
774 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
775 form of std::equals for C++11 compatibility.
777 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
779 * doc/xml/manual/appendix_contributing.xml: Update pointer to
780 C++ standard at ansi.org.
782 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
784 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
785 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
788 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
789 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
791 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
793 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
795 * testsuite/20_util/function_objects/invoke/3.cc: New test.
796 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
797 "compile" test to "run".
799 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
800 * doc/html/*: Regenerate.
801 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
802 rvalue aliasing constructor.
803 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
804 (reinterpret_pointer_cast): Add overloads taking rvalues.
805 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
806 Add rvalue aliasing constructor.
807 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
808 "run" and check return values as well as types.
809 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
810 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
811 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
812 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
815 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
816 * doc/xml/manual/intro.xml: Likewise.
817 * include/std/future (__create_task_state): Add default arguments
818 to make providing an allocator optional.
819 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
820 instead of delegating to another constructor.
821 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
822 define allocator-extended constructors for C++17 and later.
823 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
825 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
826 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
827 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
829 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
831 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
832 Don't run the libstdc++/83237 part on simulator targets.
834 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
836 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
838 * doc/html/*: Regenerate.
840 * include/experimental/any (__any_caster): Use RTTI if comparing
841 addresses fails, to support non-unique addresses in shared libraries.
842 * include/std/any (__any_caster): Likewise.
845 * include/experimental/any (__any_caster): Constrain to only be
846 callable for object types. Use remove_cv_t instead of decay_t.
847 If the type decays or isn't copy constructible, compare the manager
848 function to a dummy specialization.
849 (__any_caster): Add overload constrained for non-object types.
850 (any::_Manager_internal<_Op>): Add dummy specialization.
851 * testsuite/experimental/any/misc/any_cast.cc: Test function types
854 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
857 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
858 reversed arguments to uninitialized_copy_n.
859 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
860 is unchanged by copy assignment.
861 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
862 compare path components.
865 * include/experimental/memory_resource: Add system header pragma and
866 do not define anything unless compiled as C++14 or later.
867 (__resource_adaptor_common::__guaranteed_alignment): Remove.
868 (__resource_adaptor_imp::do_allocate): If the requested alignment
869 is a fundamental alignment then either allocate directly from _M_alloc
870 or call the new _M_allocate function.
871 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
872 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
873 of the allocator rebound to a POD type with the specified alignment.
874 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
875 * testsuite/experimental/memory_resource/new_delete_resource.cc:
876 Adjust expected allocation sizes.
877 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
878 xfail for Solaris x86.
880 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
882 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
883 * include/pstl/execution_defs.h (__enable_if_execution_policy):
884 Use std::__remove_cvref_t when building with GCC.
886 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
889 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
890 Use "additional_flags" to pass -ltbb to v3_target_compile command.
891 Use check_v3_target_prop_cached to cache the result of the test.
893 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
895 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
898 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
899 Changed v3_target_compile check from preprocess to executable.
900 Added "-ltbb" to v3_target_compile flags.
902 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
904 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
905 Add check for Thread Building Blocks 2018 or later.
907 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
909 * testsuite/experimental/names.cc: Only include Networking TS headers
910 on targets with the necessary Gthreads support.
912 2019-05-20 Marek Polacek <polacek@redhat.com>
914 CWG 2094 - volatile scalars are trivially copyable.
916 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
917 result for volatile int.
919 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
921 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
922 * testsuite/experimental/names.cc: Include <experimental/filesystem>
925 PR c++/90532 Ensure __is_constructible(T[]) is false
926 * include/std/type_traits (__do_is_default_constructible_impl)
927 (__is_default_constructible_atom, __is_default_constructible_safe):
929 (is_default_constructible): Use is_constructible.
930 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
931 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
932 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
933 * testsuite/20_util/is_trivially_default_constructible/value.cc:
936 2019-05-20 Pádraig Brady <pbrady@fb.com>
938 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
939 to the deallocator with -fsized-deallocation.
941 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
943 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
944 test by passing correct alignment to deallocate function.
946 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
949 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
950 Raise exception if unique_ptr tuple member has unknown structure.
951 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
952 Adjust worker to support new __uniq_ptr_data base class. Do not
953 assume field called _M_head_impl is the first tuple element.
955 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
957 * include/bits/stl_deque.h
958 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
959 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
960 (_Deque_base::_Deque_impl_data): New.
961 (_Deque_base::_Deque_impl): Inherit latter.
962 (_Deque_base::_Deque_impl::_M_swap_data): Move...
963 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
964 (_Deque_base::_Deque_impl()): Add noexcept qualification.
965 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
966 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
967 (deque<>::deque()): Default.
968 (deque<>::deque(deque&&)): Default.
969 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
970 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
971 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
972 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
974 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
975 (deque<>::resize(size_type, const value_type&)): Share a single
977 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
979 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
980 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
981 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
982 * testsuite/23_containers/deque/allocator/default_init.cc: New.
984 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
987 * include/std/variant (holds_alternative, get, get_if): Improve
988 static assertion messages.
989 (bad_variant_access::bad_variant_access()): Change default message.
990 (__throw_bad_variant_access(bool)): New overload.
991 (get): Use new overload.
992 (visit, visit<R>): Improve exception message.
994 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
995 targets. Add more cases from P0608R3.
996 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
998 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
999 * include/experimental/type_traits (is_detected_exact)
1000 (is_detected_exact_v): Likewise.
1001 * include/pstl/execution_defs.h (is_execution_policy)
1002 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1003 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1004 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1005 * testsuite/experimental/names.cc: New test.
1008 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1009 assertions from the destructor.
1010 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1011 Move static_assert for hash function to here.
1012 (_Hash_table_base::_M_equals): Move static_assert for equality
1014 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1016 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1017 the value directly instead of calling _S_value.
1018 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1019 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1020 _S_key(_Const_Link_type).
1021 * testsuite/23_containers/set/85965.cc: Check construction,
1022 destruction, assignment and size() do not trigger the assertions.
1023 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1024 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1026 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1027 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1028 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1029 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1030 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1031 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1032 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1034 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1035 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1038 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1040 * doc/html/*: Regenerate.
1041 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1042 of decay_t (P0777R1).
1044 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1046 Move from state of allocators (LWG2593)
1047 * include/bits/stl_deque.h
1048 (_Deque_base(_Deque_base&&, false_type)): Remove.
1049 (_Deque_base(_Deque_base&&, true_type)): Remove.
1050 (_Deque_base(_Deque_base&&)): Adapt.
1051 (_Deque_base::_M_move_impl()): Remove.
1052 * testsuite/util/testsuite_allocator.h
1053 (propagating_allocator(propagating_allocator&&)): Preserve move from
1055 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1057 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1059 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1060 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1061 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1063 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1065 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1066 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1068 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1070 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1072 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1074 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1076 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1078 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1080 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1083 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1085 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1086 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1088 * include/std/variant (__overload_set): Remove.
1090 (_Build_FUN): New class template to define a single FUN overload,
1091 with specializations to prevent unwanted conversions, as per P0608R3.
1092 (_Build_FUNs): New class template to build an overload set of FUN.
1093 (_FUN_type): New alias template to perform overload resolution.
1094 (__accepted_type): Use integer_constant base for failure case. Use
1095 _FUN_type for successful case.
1096 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1097 (variant::variant(_Tp&&)): Likewise.
1098 (variant::operator=(_Tp&&)): Likewise.
1100 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1101 Replace raw visitation with a runtime check for the valueless state
1102 and a non-raw visitor.
1103 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1104 (variant::index()): Remove branch.
1105 (variant::swap(variant&)): Use valueless_by_exception() instead of
1106 comparing the index to variant_npos, and add likelihood attribute.
1108 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1109 (_Hashtable_base::_Equal_hash_code): Define new class template.
1110 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1113 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1114 Replace with _M_get non-static member function.
1115 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1117 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1118 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1120 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1121 _S_get accessors for members in EBO helpers.
1122 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1123 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1125 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1127 (_Hashtable_base::_M_eq()): Remove non-const overload.
1129 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1131 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1133 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1135 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1138 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1140 * config/os/solaris/solaris2.10: Move to ...
1141 * config/os/solaris: ... this.
1142 * configure.host (os_include_dir): Adapt.
1143 (abi_baseline_pair): Remove Solaris 10 handling.
1144 * config/abi/post/i386-solaris2.10: Remove.
1145 * config/abi/post/sparc-solaris2.10: Remove.
1146 * config/abi/post/i386-solaris2.11: Rename to ...
1147 * config/abi/post/i386-solaris: ... this.
1148 * config/abi/post/sparc-solaris2.11: Rename to ...
1149 * config/abi/post/sparc-solaris: ... this.
1151 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1154 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1157 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1159 * include/std/variant (__visit_with_index): Remove typedef.
1160 (__deduce_visit_result): New tag type.
1161 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1162 visitation of possibly-valueless variants, forwarding to __do_visit
1163 with the relevant tag type.
1164 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1165 and make lambda return void.
1166 (__variant_construct): Likewise.
1167 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1168 __raw_idx_visit and make lambda return void.
1169 (_Multi_array::__untag_result): Add metafunction to check the function
1170 pointer type for a tag type that dictates the kind of visitation.
1171 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1172 Use decltype(auto) instead of tagged function pointer type.
1173 (__gen_vtable_impl): Remove bool non-type parameter and unused
1174 _Variant_tuple parameter.
1175 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1176 (__gen_vtable_impl::__do_visit_invoke): Remove.
1177 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1178 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1179 for the visit<R> case, rather than dispatching to separate functions.
1180 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1182 (variant::swap): Likewise.
1183 (__do_visit): Replace two non-type template parameters with a single
1184 type parameter, so that the caller must specify the visitor's return
1185 type (or one of the tag types).
1186 (visit): Deduce a return type from the visitor and use the
1187 __deduce_visit_result tag to enforce that all overloads return the
1189 (visit<R>): Call __do_visit<R> with explicit result type.
1190 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1193 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1195 nonesuch is insufficiently useless (lwg2996)
1196 * include/std/type_traits (struct __nonesuch): Added private base
1197 class to make __nonesuch not an aggregate and removed deleted default
1199 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1200 (operator=(const pair&)): Use __nonesuch instead of
1201 __nonesuch_no_braces.
1202 (operator=(pair&&)): Likewise
1203 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1204 of __nonesuch_no_braces.
1205 (operator=(tuple&&)): Likewise
1206 * include/experimental/type_traits (struct nonesuch): Added private
1207 base class to make nonesuch not an aggregate and removed deleted
1208 default constructor.
1209 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1210 * testsuite/experimental/type_traits/nonesuch.cc: New.
1212 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1214 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1215 (_Function_handler): Remove partial specializations for void return
1216 types and pointers to member.
1217 (_Function_handler::_M_manager): Adapt to removal of
1218 _Simple_type_wrapper.
1219 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1220 * include/std/functional (_Bind_result::__enable_if_void)
1221 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1222 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1224 * include/std/future (__future_base::_Task_state::_M_run)
1225 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1226 change return type of lambda expressions.
1228 * include/bits/invoke.h (__invoke_r): Define new function implementing
1229 the INVOKE<R> pseudo-function.
1230 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1231 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1233 * include/std/type_traits (__is_nt_convertible_helper): Define it
1234 unconditionally, not only for C++20.
1235 (__is_nothrow_convertible): Define internal trait for use in C++11.
1236 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1237 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1238 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1239 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1240 that has nothrow explicit conversion but potentially-throwing implicit
1242 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1243 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1244 function to only consider implicit conversions.
1245 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1247 * include/std/iterator: Include <iosfwd> instead of <istream> and
1250 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1251 Remove unused, non-standard function.
1253 * include/bits/regex.h (match_results::max_size()): Adjust return
1254 value to account for prefix/suffix/unmatched subs.
1255 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1256 reset the contained sub matches.
1257 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1258 function to set result state following a failed match.
1259 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1260 sub_match states after _M_resize. Use _M_establish_failed_match.
1263 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1264 Replace single _Callable parameter with variadic _Args pack, to
1265 forward them directly to the tuple of decayed copies.
1266 * testsuite/30_threads/thread/cons/69724.cc: New test.
1268 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1270 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1271 * include/bits/basic_string.h: (operator=(const basic_string&):
1272 Move allocator decision to assign.
1273 (assign(const basic_string&)): Move allocator decision here.
1274 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1276 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1279 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1281 * testsuite/util/testsuite_allocator.h (memory_resource)
1282 (default_resource_mgr): Fix indentation.
1284 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1285 Use operator-> to access raw pointer member.
1286 * testsuite/23_containers/vector/59829.cc: Likewise.
1287 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1288 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1289 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1291 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1292 its constructors and equality operators. Change converting
1293 constructors to use operator-> to access private member of the other
1295 (PointerBase_void::operator->()): Add, for access to private member.
1296 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1297 (operator==(PointerBase, PointerBase)): Remove.
1298 (operator!=(PointerBase, PointerBase)): Remove.
1300 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1301 not assume field called _M_head_impl is the first tuple element.
1302 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1303 implementation more accurate.
1304 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1305 empty pointer type and non-empty deleter.
1307 LWG 2899 - Make is_move_constructible correct for unique_ptr
1308 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1309 move assignment operator.
1310 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1311 (__uniq_ptr_data): New class template with conditionally deleted
1313 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1314 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1315 constructor and move assignment operator as defaulted.
1316 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1317 __uniq_ptr_impl::release().
1318 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1319 to __uniq_ptr_impl::reset(pointer).
1320 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1321 Check for new __uniq_ptr_data type.
1322 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1324 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1326 PR libstdc++/90454.cc path construction from void*
1327 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1328 pointers to void are rejected as well as void.
1329 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1330 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1332 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1334 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1335 <remark> elements. Fix formatting of bibliography references.
1337 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1339 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1341 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1343 Remove Profile Mode, deprecated since 7.1.0
1344 * doc/Makefile.am: Remove XML file for profile mode docs.
1345 * doc/Makefile.in: Regenerate.
1346 * doc/xml/authors.xml: Remove authors of profile mode docs.
1347 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1349 * doc/xml/manual/debug.xml: Likewise.
1350 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1351 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1352 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1353 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1355 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1357 * doc/html/*: Regenerate.
1358 * include/Makefile.am: Remove profile mode headers.
1359 * include/Makefile.in: Regenerate.
1360 * include/bits/c++config (std::__profile): Remove namespace.
1361 [_GLIBCXX_PROFILE]: Remove checks for macro.
1362 * include/profile/array: Remove.
1363 * include/profile/base.h: Remove.
1364 * include/profile/bitset: Remove.
1365 * include/profile/deque: Remove.
1366 * include/profile/forward_list: Remove.
1367 * include/profile/impl/profiler.h: Remove.
1368 * include/profile/impl/profiler_algos.h: Remove.
1369 * include/profile/impl/profiler_container_size.h: Remove.
1370 * include/profile/impl/profiler_hash_func.h: Remove.
1371 * include/profile/impl/profiler_hashtable_size.h: Remove.
1372 * include/profile/impl/profiler_list_to_slist.h: Remove.
1373 * include/profile/impl/profiler_list_to_vector.h: Remove.
1374 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1375 * include/profile/impl/profiler_node.h: Remove.
1376 * include/profile/impl/profiler_state.h: Remove.
1377 * include/profile/impl/profiler_trace.h: Remove.
1378 * include/profile/impl/profiler_vector_size.h: Remove.
1379 * include/profile/impl/profiler_vector_to_list.h: Remove.
1380 * include/profile/iterator_tracker.h: Remove.
1381 * include/profile/list: Remove.
1382 * include/profile/map: Remove.
1383 * include/profile/map.h: Remove.
1384 * include/profile/multimap.h: Remove.
1385 * include/profile/multiset.h: Remove.
1386 * include/profile/ordered_base.h: Remove.
1387 * include/profile/set: Remove.
1388 * include/profile/set.h: Remove.
1389 * include/profile/unordered_base.h: Remove.
1390 * include/profile/unordered_map: Remove.
1391 * include/profile/unordered_set: Remove.
1392 * include/profile/vector: Remove.
1393 * scripts/run_doxygen: Do not process profile mode headers.
1394 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1396 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1397 Remove dg-skip-if for profile mode.
1398 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1399 preprocessor check for profile mode.
1400 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1401 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1403 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1405 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1406 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1407 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1408 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1409 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1411 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1413 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1415 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1417 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1418 preprocessor check for profile mode.
1419 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1421 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1422 Remove dg-skip-if for profile mode.
1423 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1424 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1425 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1426 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1427 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1428 * testsuite/Makefile.am: Remove profile_flags variable and
1429 * testsuite/Makefile.am: Remove profile_flags variable and
1430 check-profile target.
1431 * testsuite/Makefile.in: Regenerate.
1432 * testsuite/ext/profile/all.cc: Remove.
1433 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1434 * testsuite/ext/profile/profiler_algos.cc: Remove.
1435 * testsuite/ext/profile/replace_new.cc: Remove.
1436 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1437 preprocessor check for profile mode.
1438 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1439 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1440 (check_v3_target_normal_mode): Do not check for profile mode macro.
1441 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1443 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1444 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1445 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1446 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1447 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1448 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1449 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1450 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1451 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1452 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1454 Remove array_allocator extension, deprecated since 4.9.0
1455 * doc/xml/manual/allocator.xml: Remove documentation for
1457 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1458 * doc/xml/manual/using.xml: Remove header from documentation.
1459 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1460 * include/Makefile.in: Regenerate.
1461 * include/ext/array_allocator.h: Remove.
1462 * include/precompiled/extc++.h: Do not include removed header.
1463 * testsuite/ext/array_allocator/1.cc: Remove.
1464 * testsuite/ext/array_allocator/2.cc: Remove.
1465 * testsuite/ext/array_allocator/26875.cc: Remove.
1466 * testsuite/ext/array_allocator/3.cc: Remove.
1467 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1468 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1469 * testsuite/ext/array_allocator/check_new.cc: Remove.
1470 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1471 * testsuite/ext/headers.cc: Do not include removed header.
1473 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1475 * include/bits/stl_bvector.h
1476 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1478 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1480 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1482 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1484 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1486 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1488 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1490 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1492 (_Bit_iterator::operator-(difference_type)): Likewise.
1493 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1494 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1496 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1497 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1499 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1502 * testsuite/util/thread/all.h: Do not use remove_pointer for
1503 std::thread::native_handle_type.
1506 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1507 (_Variant_storage<true, Types...>::_M_reset()))
1508 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1509 (__get_storage): Likewise.
1510 (variant): Add noexcept to friend declarations for __get and
1514 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1515 Use _Require for constraints.
1516 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1518 (__uniq_ptr_hash): New base class with conditionally-disabled call
1520 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1521 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1522 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1524 * include/bits/shared_ptr.h: Improve docs.
1525 * include/bits/shared_ptr_base.h: Likewise.
1526 * include/bits/stl_uninitialized.h: Likewise.
1527 * include/bits/unique_ptr.h: Likewise.
1528 * libsupc++/new: Likewise.
1530 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1532 * include/bits/stl_deque.h
1533 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1535 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1537 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1539 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1541 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1543 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1545 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1547 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1549 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1552 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1553 (test01): Reserve for number of insertions to avoid rehash during test.
1554 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1556 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1561 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1563 * include/experimental/bits/fs_path.h: Improve docs.
1564 * include/experimental/bits/net.h: Fix wrong header name in comment.
1565 Do not document implementation details.
1566 * include/experimental/netfwd: Fix doxygen grouping.
1568 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1570 * include/bits/stl_pair.h: Improve docs.
1571 * include/std/tuple: Likewise.
1573 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1575 * include/std/chrono: Improve docs.
1576 * include/std/ratio: Do not document implementation details.
1577 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1579 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1582 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1583 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1584 (__duration_common_type): New helper.
1585 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1586 __duration_common_type.
1587 (__timepoint_common_type_wrapper): Replace with ...
1588 (__timepoint_common_type): New helper.
1589 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1590 Use __time_point_common_type.
1591 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1592 (__common_type_impl): If either argument is transformed by decay,
1593 use the common_type of the decayed types.
1594 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1595 decayed, use __do_common_type_impl to get the common_type.
1596 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1597 (__do_member_type_wrapper, __member_type_wrapper)
1598 (__expanded_common_type_wrapper): Remove.
1599 (__common_type_pack, __common_type_fold): New helpers.
1600 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1601 __member_type_wrapper and __expanded_common_type_wrapper.
1602 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1603 Test zero-length template argument list.
1604 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1605 Test single argument cases and argument types that should decay.
1606 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1607 Adjust expected error.
1608 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1610 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1611 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1612 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1614 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1616 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1618 Make allocator propagation more consistent for
1619 operator+(basic_string) (P1165R1)
1620 * include/bits/basic_string.h
1621 (operator+(basic_string&&, basic_string&&): Changed resulting
1622 allocator to always be the one from the first parameter.
1623 * include/bits/basic_string.tcc
1624 (operator+(const _CharT*, const basic_string&)): Changed
1625 resulting allocator to be SOCCC on the second parameter's allocator.
1626 (operator+(_CharT, const basic_string&)): Likewise.
1627 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1629 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1632 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1634 * include/bits/regex.h: Improve docs.
1635 * include/bits/regex.tcc: Do not document implementation details.
1637 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1639 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1641 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1642 Add type printer for container types in std::__debug namespace.
1643 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1644 (gdb-tests): Use distinct parameters for the type of test and use of
1646 (gdb-test): Check for regex test even if 'whatis' test.
1647 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1649 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1650 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1651 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1652 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1653 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1654 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1655 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1657 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1659 * include/std/system_error (error_category): Fix comment.
1662 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1663 argument is an empty path.
1664 (absolute(const path&, error_code&)): Use invalid_argument as error
1665 code instead of no_such_file_or_directory.
1666 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1667 of non-existent paths and empty paths with both overloads of absolute.
1669 * include/std/system_error (error_category, error_code)
1670 (error_condition): Improve docs.
1671 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1672 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1673 to class documentation. Suppress documentation for implementation
1675 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1676 Suppress documentation for implementation details.
1678 * include/std/system_error (error_code): Remove friend declaration
1679 for hash<error_code>.
1680 (hash<error_code>::operator()): Use public member functions to access
1682 (hash<error_condition>::operator()): Use address of category, not
1683 its object representation.
1684 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1685 Use public member functions to access value and category.
1686 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1688 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1690 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1691 * include/bits/hashtable_policy.h
1692 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1693 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1694 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1695 smaller than input value rather than always greater. Preserve
1696 _M_next_resize if called with 0 input. Use __builtin_floorl.
1697 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1698 elements + number of insertions is greater than _M_next_resize. Start
1699 with 11 buckets if not told otherwise. Use __builtin_floorl.
1700 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1701 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1702 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1703 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1704 told otherwise. Use __builtin_floorl.
1705 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1706 to also validate _Power2_rehash_policy.
1707 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1710 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1713 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1717 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1718 overflow warning with -Wpedantic -Wsystem-headers.
1720 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1723 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1724 * include/bits/move.h (swap): Remove extra parentheses.
1726 * include/experimental/bits/lfts_config.h: Improve doc markup.
1727 * include/experimental/optional: Improve docs.
1728 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1729 (__constexpr_addressof): Remove.
1730 (optional::operator->()): Use std::__addressof().
1731 * include/std/optional (optional::operator->()): Adjust whitespace.
1732 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1733 that operator-> is still constexpr with overloaded operator&. Change
1734 to compile-only test.
1735 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1738 * include/bits/shared_ptr.h: Improve docs.
1739 * include/bits/shared_ptr_atomic.h: Likewise.
1740 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1742 * include/bits/basic_string.h: Fix iterator/index confusion in
1744 * include/bits/range_access.h: Fix Doxygen warnings.
1745 * include/bits/refwrap.h: Do not document implementation details.
1746 (ref, cref): Group docs with reference_wrapper.
1747 * include/std/fstream: Fix Doxygen markup.
1748 * libsupc++/initializer_list (begin, end): Group docs with
1751 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1753 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1754 * include/std/mutex: Likewise.
1755 * include/std/shared_mutex: Likewise.
1757 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1758 * include/bits/fs_fwd.h: Likewise.
1759 * include/bits/fs_ops.h: Likewise.
1760 * include/bits/fs_path.h: Likewise.
1761 * include/std/filesystem: Likewise.
1763 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1764 * include/experimental/buffer: Likewise.
1765 * include/experimental/executor: Likewise.
1766 * include/experimental/internet: Likewise.
1767 * include/experimental/io_context: Likewise.
1768 * include/experimental/net: Likewise.
1769 * include/experimental/netfwd: Likewise.
1770 * include/experimental/socket: Likewise.
1771 * include/experimental/timer: Likewise.
1773 * doc/doxygen/doxygroups.cc: Move description of experimental group
1775 * include/experimental/algorithm: Add to libfund-ts doc group.
1776 * include/experimental/any: Likewise. Do not document implementation
1778 * include/experimental/array: Add to libfund-ts doc group.
1779 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1780 for Library Fundamentals.
1781 * include/experimental/chrono: Add to libfund-ts doc group.
1782 * include/experimental/deque: Likewise.
1783 * include/experimental/forward_list: Likewise.
1784 * include/experimental/functional: Likewise.
1785 * include/experimental/iterator: Likewise.
1786 * include/experimental/list: Likewise.
1787 * include/experimental/map: Likewise.
1788 * include/experimental/memory: Likewise.
1789 * include/experimental/memory_resource: Likewise. Improve docs.
1791 * include/experimental/numeric: Add to libfund-ts doc group.
1792 * include/experimental/optional: Likewise.
1793 * include/experimental/propagate_const: Likewise.
1794 * include/experimental/random: Likewise.
1795 * include/experimental/ratio: Likewise.
1796 * include/experimental/regex: Likewise.
1797 * include/experimental/set: Likewise.
1798 * include/experimental/source_location: Likewise.
1799 * include/experimental/string: Likewise.
1800 * include/experimental/string_view: Likewise.
1801 * include/experimental/system_error: Likewise.
1802 * include/experimental/tuple: Likewise.
1803 * include/experimental/type_traits: Likewise.
1804 * include/experimental/unordered_map: Likewise.
1805 * include/experimental/unordered_set: Likewise.
1806 * include/experimental/utility: Likewise.
1807 * include/experimental/vector: Likewise.
1808 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1809 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1810 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1812 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1813 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1814 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1815 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1816 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1818 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1819 * include/experimental/bits/fs_fwd.h: Improve docs.
1820 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1821 * include/experimental/bits/fs_path.h: Likewise.
1822 (path, filesystem_error, u8path): Improve docs.
1823 * include/experimental/filesystem: Link to docs for TS.
1825 * config/allocator/new_allocator_base.h (__allocator_base): Add
1826 workaround for Doxygen bug #6945.
1827 * include/std/memory: Improve docs. Define group for pointer safety.
1828 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1829 conditional to suppress documentation for implementation details.
1831 * include/bits/specfun.h: Improve docs.
1832 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1835 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1836 (std::experimental): Add docs.
1837 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1838 namespace to nothing when generating docs.
1839 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1840 * include/std/chrono (std::chrono): Likewise.
1841 * include/std/functional (std::placeholders): Likewise.
1842 * include/std/thread (std::this_thread): Likewise.
1844 * include/parallel/settings.h: Fix Doxygen markup.
1846 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1847 anything unless PB_DS_CLASS_C_DEC is defined.
1848 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1849 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1850 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1851 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1852 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1853 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1854 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1856 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1857 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1858 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1859 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1860 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1861 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1862 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1863 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1864 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1865 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1866 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1868 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1869 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1871 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1874 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1875 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1876 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1879 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1881 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1882 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1883 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1884 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1885 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1886 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1888 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1889 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1892 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1895 * include/std/complex (__complex_proj): Return parameter unchanged.
1896 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1897 floating-point types to take std::complex arguments.
1898 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1899 floating-point types.
1900 * testsuite/26_numerics/complex/proj.cc: New test.
1902 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1904 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1905 to _Lock_policyE[012].
1906 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1908 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1910 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1911 macros accidentally left in.
1912 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1913 unnecessary -lstdc++fs option. Fix test for mingw.
1914 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1917 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1919 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1921 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1923 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1925 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1926 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1929 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1931 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1934 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1935 class template and partial specialization.
1938 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1940 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1941 functions to convert a value to an integral type.
1942 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1943 (fill_n): Convert _Size parameter to an integral type.
1944 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1945 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1946 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1947 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1948 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1949 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1951 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1953 Adding noexcept-specification on tuple constructors (LWG 2899)
1954 * libstdc++-v3/include/std/tuple:
1955 (tuple()): Add noexcept-specification.
1956 (tuple(const _Elements&...)): Likewise
1957 (tuple(_UElements&&...)): Likewise
1958 (tuple(const tuple<_UElements...>&)): Likewise
1959 (tuple(tuple<_UElements...>&&)): Likewise
1960 (tuple(const _T1&, const _T2&)): Likewise
1961 (tuple(_U1&&, _U2&&)): Likewise
1962 (tuple(const tuple<_U1, _U2>&): Likewise
1963 (tuple(tuple<_U1, _U2>&&): Likewise
1964 (tuple(const pair<_U1, _U2>&): Likewise
1965 (tuple(pair<_U1, _U2>&&): Likewise
1966 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1968 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1971 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1972 arguments with __restrict.
1974 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1976 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1978 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1980 * include/experimental/bits/fs_path.h
1981 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1982 avoid redundant call to _S_convert_loc with non-const pointers.
1984 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1985 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1986 * testsuite/21_strings/basic_string/hash/hash.cc
1987 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1988 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1989 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1991 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1992 wstring::_M_replace_dispatch with more specific patterns.
1993 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1994 Create const std::string to avoid redundant call to _S_convert_loc
1995 with non-const pointers.
1996 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1997 avoid unnecessary basic_string::assign instantiations.
1999 * include/std/memory (__uses_alloc_args): Add string-literal to
2000 static_assert, to match the one in __uses_alloc.
2001 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2002 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2003 for recursive uses-allocator construction of nested pairs.
2004 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2007 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2009 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2010 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2011 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2012 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2014 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2015 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2016 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2017 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2018 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2019 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2020 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2022 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2025 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2026 * include/std/scoped_allocator [__cplusplus > 201703L]
2027 (scoped_allocator_adaptor::construct): Define in terms of
2028 uses_allocator_construction_args, as per P0591R4.
2029 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2030 * testsuite/util/testsuite_allocator.h: Remove name of unused
2033 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2035 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2036 * doc/html/*: Regenerate.
2038 * include/bits/fs_path.h (operator<, operator<=, operator>)
2039 (operator>=, operator==, operator!=): Make hidden friends, as per
2041 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2042 string type in test.
2043 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2045 * include/std/any (any::any(ValueType&&)): Use __and_v.
2046 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2049 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2051 * include/std/type_traits (__result_of_memfun): Use remove_reference
2052 instead of __remove_cvref_t and remove redundant is_same check.
2053 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2055 * include/experimental/string_view (basic_string_view::pointer)
2056 (basic_string_view::reference): Fix to refer to non-const value_type.
2057 * include/bits/basic_string.h (basic_string): Use __sv_check and
2058 __sv_limit instead of basic_string_view::_M_check and
2059 basic_string_view::_M_limit.
2060 * include/std/string_view (__sv_check, __sv_limit): New
2061 helper functions to replace basic_string_view::_M_check and
2062 basic_string_view::_M_limit.
2063 (basic_string_view): Add static assertions to enforce ill-formed
2064 requirement for traits_type::char_type from P1148R0, and to enforce
2065 required properties of char-like types.
2066 (basic_string_view::pointer, basic_string_view::reference): Fix to
2067 refer to non-const value_type.
2068 (basic_string_view::operator[], basic_string_view::at)
2069 (basic_string_view::front, basic_string_view::back)
2070 (basic_string_view::data): Use const_reference and const_pointer
2071 typedefs for return types.
2072 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2073 (hash<wstring_view>): Fix argument_type typedef.
2074 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2075 char/1.cc: Fix expected return type of basic_string_view::data().
2076 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2077 wchar_t/1.cc: Likewise.
2078 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2079 char/1.cc: Likewise.
2080 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2081 wchar_t/1.cc: Likewise.
2082 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2084 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2085 Check reference and pointer typedefs.
2086 * testsuite/experimental/string_view/requirements/typedefs.cc:
2088 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2089 Fix expected return type of basic_string_view::data().
2090 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2092 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2094 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2098 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2099 Avoid a runtime check for types that can never be stored in std::any.
2100 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2103 PR libstdc++/90220 (partial)
2104 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2105 not attempt ill-formed static_cast to pointers to non-object types.
2106 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2109 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2110 prevent -Wcatch-value warning.
2112 * include/std/variant (__variant_construct): Use template parameter
2113 type instead of equivalent decltype-specifier.
2114 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2115 Replace forward with move.
2116 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2117 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2118 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2119 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2120 index after construction succeeds.
2121 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2122 if-constexpr checks that are always true. Use __remove_cvref_t instead
2123 of remove_reference so that is_nothrow_move_constructible check
2124 doesn't use a const rvalue parameter. In the potentially-throwing case
2125 construct a temporary and move assign it, as per LWG 2904.
2126 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2127 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2128 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2129 construct a temporary and move assign from it, as per LWG 2904.
2130 * testsuite/20_util/variant/exception_safety.cc: Check that
2131 assignment operators have strong exception safety guarantee.
2133 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2135 Document PSTL linker flags
2137 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2139 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2141 * include/std/variant (__detail::__variant::_Traits): Make
2142 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2143 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2145 (__detail::__variant::_Copy_assign_alias): Only depend on
2146 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2147 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2148 move assignment operators.
2151 * include/std/variant (variant::__not_self): New helper for the
2152 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2153 (variant::__to_type_impl): Remove.
2154 (variant::__to_type): Add default argument to check pack size, instead
2155 of using __to_type_impl.
2156 (variant::__accepted_type): Add default argument using __not_self.
2157 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2158 for variant(T&&) constructor constraint.
2159 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2160 Extract __accepted_type into a named template parameter for reuse in
2161 other constraints and in the exception specification.
2162 (variant::variant(in_place_type_t<T>, Args&&...))
2163 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2164 (variant::variant(in_place_index_t<T>, Args&&...))
2165 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2166 (variant::operator=T&&)): Remove redundant && from trait arguments.
2167 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2168 isn't used for in_place_type or in_place_index arguments.
2170 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2171 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2172 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2174 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2175 Bernd Edlinger <bernd.edlinger@hotmail.de>
2176 Jakub Jelinek <jakub@redhat.com>
2179 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2180 general-regs-only target attribute for ARM.
2182 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2185 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2186 specialization also depend on is_nothrow_move_constructible.
2187 * include/std/variant (__detail::__variant::__never_valueless()):
2188 Only true if the variant would have a move assignment operator.
2189 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2190 Check __never_valueless<T...>().
2191 (variant::emplace): Only perform non-throwing move assignments
2192 for never-valueless alternatives if the variant has a move assignment
2194 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2195 types can be emplaced into non-assignable variants.
2196 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2197 don't get copied when emplaced into non-assignable variants.
2199 * include/std/variant (__detail::__variant::__ref_cast): Remove
2201 (__detail::__variant::_Uninitialized::_M_get)
2202 (__detail::__variant::__get)
2203 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2205 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2207 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2209 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2210 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2211 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2212 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2214 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2216 Delegate PSTL configuration to pstl/pstl_config.h
2218 * include/bits/c++config: Remove explicit PSTL configuration
2219 macros and use definitions from <pstl/pstl_config.h>.
2221 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2223 Cleanup algorithm implementations
2224 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2226 (mismatch): Forward execution policy.
2227 (equal): Qualify call to std::equal().
2228 (partial_sort): Forward execution policy.
2229 (inplace_merge): Forward execution policy.
2231 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2233 Improve implementation of parallel equal()
2234 * include/pstl/algorithm_impl.h
2235 (__internal::__brick_equal): use "4 iterator" version of
2237 (__internal::__brick_equal): use simd for random access
2238 iterators on unsequenced execution policies.
2239 (__internal::__pattern_equal): add "4 iterator" version
2240 (__internal::__pattern_equal): dispatch to simd __brick_equal
2241 for vector-only execution policies.
2242 (__internal::__pattern_equal): dispatch to __parallel_or for
2243 parallel execution policies.
2244 * include/pstl/glue_algorithm_impl.h
2245 (std::equal): dispatch to "4 iterator" version of
2246 __internal::__pattern_equal().
2248 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2251 * include/bits/forward_list.h (operator==): Do not use operator!= to
2253 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2254 earlier in the list, so that sort is stable.
2255 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2256 * testsuite/23_containers/forward_list/comparable.cc: Test with
2257 types that meet the minimum EqualityComparable and LessThanComparable
2258 requirements. Remove irrelevant comment.
2260 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2261 Do not depend on whether all alternative types are move constructible.
2262 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2263 from the operand when deciding whether to perform the assignment.
2264 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2265 with deleted move constructor and deleted move assignment operator.
2266 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2267 behaviour of variants with DeletedMoves as an alternative.
2268 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2269 (move_ctor, move_assign): Check that moving a variant with a
2270 DeletedMoves alternative falls back to copying instead of moving.
2272 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2273 from static_assert declarations.
2275 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2276 actually match its name.
2277 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2278 (test_swap()): Fix result for MoveCtorOnly and check
2279 MoveCtorAndSwapOnly.
2281 * include/std/optional (optional::value_or(U&&) &&): Add missing
2282 constexpr specifier.
2283 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2284 for disengaged optionals and rvalue optionals.
2285 * testsuite/20_util/optional/observers/4.cc: Likewise.
2287 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2289 * include/pstl/algorithm_impl.h: Uglify identfiers.
2290 * include/pstl/numeric_impl.h: Uglify identfiers.
2291 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2293 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2295 * include/bits/c++config:
2296 Add definition for __PSTL_ASSERT.
2297 Add definition for __PSTL_ASSERT_MSG.
2298 * include/pstl/algorithm_impl.h: Replace use of assert().
2299 * include/pstl/numeric_impl.h: Replace use of assert().
2300 * include/pstl/parallel_backend_tbb.h:
2301 Replace use of assert().
2302 Replace use of __TBB_ASSERT().
2303 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2305 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2308 * src/c++17/memory_resource.cc
2309 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2310 needed to allow placing a _Chunk at the end of the buffer.
2311 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2313 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2315 * doc/xml/faq.xml: Add information about emergency EH pool.
2316 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2317 Move outdated information on mt_allocator to a separate section.
2318 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2319 doesn't affect the default allocator.
2321 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2325 * testsuite/20_util/variant/89851.cc: New test.
2327 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2329 * include/std/variant: Adjust whitespace. Add comments.
2330 (_Multi_array): Leave primary template undefined.
2331 (_Multi_array<_Tp>): Define partial specialization for base case of
2333 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2334 which is always a reference.
2335 (__gen_vtable::_S_apply()): Remove function, inline body into
2336 default member initializer.
2337 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2339 * include/std/variant (__variant_idx_cookie): Add member type.
2340 (__visitor_result_type): Remove.
2341 (__do_visit): Use invoke_result instead of __visitor_result_type.
2342 * testsuite/20_util/variant/visit.cc: New test.
2345 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2347 * testsuite/20_util/variant/90008.cc: New test.
2349 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2351 * include/pstl/algorithm_impl.h: Add namespace qualification.
2352 * include/pstl/execution_defs.h: Add namespace qualification.
2353 * include/pstl/execution_impl.h: Add namespace qualification.
2354 * include/pstl/numeric_impl.h: Add namespace qualification.
2355 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2356 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2357 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2359 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2361 Fix visit<R> for variant.
2362 * include/std/variant (__do_visit): Add a template parameter
2363 for enforcing same return types for visit.
2364 (__gen_vtable_impl): Likewise.
2365 (_S_apply_single_alt): Adjust.
2366 (__visit_invoke_impl): New. Handle casting to void.
2367 (__do_visit_invoke): New. Enforces same return types.
2368 (__do_visit_invoke_r): New. Converts return types.
2369 (__visit_invoke): Adjust.
2370 (__gen_vtable): Add a template parameter for enforcing
2371 same return types for visit.
2372 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2373 different return types.
2374 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2375 visitors with different return types don't accidentally
2376 compile with regular visitation.
2378 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2380 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2381 dg-require-filesystem-ts.
2383 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2385 * doc/xml/manual/status_cxx2020.xml: Update status.
2386 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2387 * testsuite/20_util/variant/visit_r.cc: New test.
2389 * include/bits/fs_dir.h (directory_iterator::operator*)
2390 (directory_iterator::operator->): Add noexcept.
2391 (operator==, operator!=): Replace namespace-scope equality operators
2392 for directory iterators with hidden friends.
2395 * config/abi/pre/gnu.ver: Add missing exports.
2396 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2399 * config/abi/pre/gnu.ver: Export new symbols.
2400 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2401 (recursive_directory_iterator::recursion_pending())
2402 (recursive_directory_iterator::disable_recursion_pending()): Remove
2403 inline definitions. Make noexcept.
2404 (recursive_directory_iterator::depth())
2405 (recursive_directory_iterator::operator*())
2406 (recursive_directory_iterator::operator->()): Make noexcept.
2407 (recursive_directory_iterator::_M_options)
2408 (recursive_directory_iterator::_M_pending): Remove data members.
2409 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2410 (recursive_directory_iterator::recursive_directory_iterator): Remove
2411 ctor-initializer. Use new constructor for _Dir_stack.
2412 (recursive_directory_iterator::options())
2413 (recursive_directory_iterator::recursion_pending())
2414 (recursive_directory_iterator::disable_recursion_pending()): Add
2415 non-inline definitions.
2416 (recursive_directory_iterator::depth()): Make noexcept.
2417 (recursive_directory_iterator::increment(error_code&))
2418 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2419 location of options and recursion_pending members.
2420 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2421 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2422 user-declared move constructor and assignment operator, to make the
2425 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2426 d_type == DT_UNKNOWN immediately.
2427 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2429 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2431 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2433 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2434 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2437 PR libstdc++/87431 (again)
2438 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2439 Define partial specialization for basic_string.
2440 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2441 shared_ptr and weak_ptr.
2442 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2444 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2446 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2448 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2450 * include/std/any (_Never_valueless_alt): Define explicit
2451 specialization for any.
2452 * include/std/variant (_Never_valueless_alt): Define primary template.
2453 (__never_valueless): Use _Never_valueless_alt instead of
2454 is_trivially_copyable.
2455 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2456 initializations to avoid try-catch overhead. Add special case for
2457 scalars produced by potentially-throwing conversions. Use
2458 _Never_valueless_alt instead of is_trivially_copyable for the
2459 remaining strong exception-safety cases.
2460 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2461 * testsuite/20_util/variant/87431.cc: Run both test functions.
2462 * testsuite/20_util/variant/exception_safety.cc: New test.
2463 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2464 so the variant becomes valueless.
2466 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2469 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2471 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2473 * include/std/string (__hash_string_base): New class template defining
2474 operator() for hashing strings.
2475 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2476 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2477 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2478 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2480 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2482 Use single-visitation in variant assignment and swap and relops.
2483 Also use indices instead of types when checking whether
2484 variants hold the same thing.
2485 * include/std/variant (__do_visit): Add a template parameter
2486 for index visitation, invoke with indices if index visitation
2488 (__variant_idx_cookie): New.
2489 (__visit_with_index): Likewise.
2490 (_Copy_assign_base::operator=): Do single-visitation with
2492 (_Move_assign_base::operator=): Likewise.
2493 (_Extra_visit_slot_needed): Adjust.
2494 (__visit_invoke): Call with indices if it's an index visitor.
2495 (relops): Do single-visitation with an index visitor.
2497 (__visitor_result_type): New.
2499 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2501 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2503 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2505 Don't revisit a variant we are already visiting.
2506 * include/std/variant (__variant_construct_single): New.
2507 (__variant_construct): Use it.
2508 (_M_destructive_move): Likewise.
2509 (_M_destructive_copy): Likewise.
2510 (_Copy_assign_base::operator=): Adjust.
2511 (_Move_assign_base::operator=): Likewise.
2514 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2517 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2518 destructor so they are not evaluated until the _Key type is complete.
2519 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2520 * testsuite/23_containers/set/85965.cc: New test.
2521 * testsuite/23_containers/unordered_set/85965.cc: New test.
2522 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2523 with regexp matching the corresponding _Rb_tree specialization.
2524 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2525 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2526 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2527 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2528 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2529 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2530 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2532 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2535 Fix based on a suggestion by Antony Polukhin.
2536 * include/std/variant (__never_valueless): New.
2538 (_Extra_visit_slot_needed): New.
2539 (_Multi_array): Use it.
2540 (_S_apply_all_alts): Likewise.
2542 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2545 Fix based on a suggestion by Antony Polukhin.
2546 * include/std/variant (__gen_vtable): Don't reserve an
2547 additional table slot, _Multi_array already does that.
2549 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2552 Fix based on a suggestion by Antony Polukhin.
2553 * include/std/variant (__variant_construct): Capture a pointer
2554 to the storage and visit just one variant.
2556 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2558 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2559 Doxygen-generated pages with unstable URL.
2560 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2561 * doc/xml/manual/extensions.xml: Likewise.
2562 * doc/xml/manual/parallel_mode.xml: Likewise.
2563 * doc/xml/manual/support.xml: Likewise.
2565 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2566 avoid -Wconversion warnings.
2568 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2570 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2571 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2572 (allstamped): Add stamp-pstl.
2573 (install-headers): Add ptsl_builddir.
2574 * include/Makefile.in: Regenerate.
2575 * include/bits/c++config: Add pstl configuration.
2576 * include/pstl/LICENSE.txt: New file.
2577 * include/pstl/algorithm_fwd.h: New file.
2578 * include/pstl/algorithm_impl.h: New file.
2579 * include/pstl/execution_defs.h: New file.
2580 * include/pstl/execution_impl.h: New file.
2581 * include/pstl/glue_algorithm_defs.h: New file.
2582 * include/pstl/glue_algorithm_impl.h: New file.
2583 * include/pstl/glue_execution_defs.h: New file.
2584 * include/pstl/glue_memory_defs.h: New file.
2585 * include/pstl/glue_memory_impl.h: New file.
2586 * include/pstl/glue_numeric_defs.h: New file.
2587 * include/pstl/glue_numeric_impl.h: New file.
2588 * include/pstl/memory_impl.h: New file.
2589 * include/pstl/numeric_fwd.h: New file.
2590 * include/pstl/numeric_impl.h: New file.
2591 * include/pstl/parallel_backend.h: New file.
2592 * include/pstl/parallel_backend_tbb.h: New file.
2593 * include/pstl/parallel_backend_utils.h: New file.
2594 * include/pstl/parallel_impl.h: New file.
2595 * include/pstl/pstl_config.h: New file.
2596 * include/pstl/unseq_backend_simd.h: New file.
2597 * include/pstl/utils.h: New file.
2598 * include/std/algorithm: Include parallel algorithm implementations.
2599 * include/std/execution: New file.
2600 * include/std/memory: Include parallel algorithm implementations.
2601 * include/std/numeric: Include parallel algorithm implementations.
2602 * include/std/version: Add parallel algorithms feature test macro.
2603 * testsuite/util/pstl/pstl_test_config.h: New file.
2604 * testsuite/util/pstl/test_utils.h: New file.
2605 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2606 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2607 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2608 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2609 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2610 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2611 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2612 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2613 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2614 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2615 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2616 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2617 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2618 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2619 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2620 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2621 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2622 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2623 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2624 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2625 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2626 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2627 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2628 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2629 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2630 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2631 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2632 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2633 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2634 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2635 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2636 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2637 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2638 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2639 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2640 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2641 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2642 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2643 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2644 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2645 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2646 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2647 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2648 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2649 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2650 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2651 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2652 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2653 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2654 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2655 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2656 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2657 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2658 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2659 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2660 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2661 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2662 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2663 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2664 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2665 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2666 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2667 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2668 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2669 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2670 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2671 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2672 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2673 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2674 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2675 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2676 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2677 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2678 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2679 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2680 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2681 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2682 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2683 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2684 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2685 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2686 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2687 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2688 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2689 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2690 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2691 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2692 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2693 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2694 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2695 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2696 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2697 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2698 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2699 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2700 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2701 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2702 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2703 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2704 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2705 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2706 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2707 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2708 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2709 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2710 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2712 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2714 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2715 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2716 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2717 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2718 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2719 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2720 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2721 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2722 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2723 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2724 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2725 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2726 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2727 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2728 when the special functions IS is enabled, not for C++17.
2729 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2731 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2732 without checks for special functions in C++17.
2733 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2737 * include/backward/hash_map: Use <> for includes not "".
2738 * include/backward/hash_set: Likewise.
2739 * include/backward/strstream: Likewise.
2740 * include/tr1/bessel_function.tcc: Likewise.
2741 * include/tr1/exp_integral.tcc: Likewise.
2742 * include/tr1/legendre_function.tcc: Likewise.
2743 * include/tr1/modified_bessel_func.tcc: Likewise.
2744 * include/tr1/riemann_zeta.tcc: Likewise.
2746 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2748 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2749 of extension allocators.
2750 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2751 Document new headers in 7.2, 8.1 and 9.1 releases.
2752 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2753 * doc/html/*: Regenerate.
2755 2019-03-12 John David Anglin <dave.anglin@bell.net>
2758 * testsuite/lib/libstdc++.exp: Locate libatomic.
2759 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2760 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2762 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2763 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2764 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2765 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2767 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2770 * configure.ac: Check for sockatmark.
2771 * crossconfig.m4: Check for sockatmark.
2772 * config.h.in: Regenerate.
2773 * configure: Regenerate.
2774 * include/experimental/internet (address_v4::_S_hton): Rename
2775 overloaded functions to _S_hton_16 and _S_ntoh_16.
2776 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2777 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2778 * include/experimental/socket (basic_socket::at_mark): Check
2779 _GLIBCXX_HAVE_SOCKATMARK.
2781 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2782 const variables instead of macros.
2785 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2786 Use correct type for len_aligned.
2787 * testsuite/20_util/hash/89629.cc: New test.
2789 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2792 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2793 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2794 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2795 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2796 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2797 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2798 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2799 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2800 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2801 memory_order_seq_cst to int.
2803 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2805 * doc/xml/manual/using.xml: Use link element instead of xref.
2806 * doc/html/*: Regenerate.
2808 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2810 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2813 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2814 parameters in deduction guides.
2815 * include/debug/multimap.h (multimap): Likewise.
2816 * include/debug/set.h (multimap): Likewise.
2817 * include/debug/multiset.h (multimap): Likewise.
2818 * include/debug/unordered_map (unordered_map): Likewise.
2819 (unordered_multimap): Likewise.
2820 * include/debug/unordered_set (unordered_set): Likewise.
2821 (unordered_multiset): Likewise.
2824 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2825 Invalidate all iterators in case of rehash.
2826 (unordered_multimap<>::_M_check_rehashed): Likewise.
2827 * include/debug/unordered_set
2828 (unordered_set<>::_M_check_rehashed): Likewise.
2829 (unordered_multiset<>::_M_check_rehashed): Likewise.
2830 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2832 2019-03-07 Andreas Schwab <schwab@suse.de>
2834 * config/abi/post/riscv64-linux-gnu: New directory.
2835 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2837 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2839 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2840 compile test to run. Fix typo.
2842 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2843 * doc/html/*: Regenerate.
2845 P0356R5 Simplified partial function application
2846 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2847 helpers for bind_front.
2848 (bind_front, __cpp_lib_bind_front): Define.
2849 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2851 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2853 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2854 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2855 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2856 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2858 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2860 PR libstdc++/86655 - std::assoc_legendre should not constrain
2861 the value of m (or x).
2862 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2863 __sph_legendre): If degree > order Don't throw, return 0.
2864 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2865 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2866 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2867 * testsuite/tr1/5_numerical_facilities/special_functions/
2868 02_assoc_legendre/pr86655.cc: New test.
2869 * testsuite/tr1/5_numerical_facilities/special_functions/
2870 22_sph_legendre/pr86655.cc: New test.
2872 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2875 Also PR libstdc++/85517
2876 * include/std/variant (__do_visit): New.
2877 (__variant_cast): Likewise.
2878 (__variant_cookie): Likewise.
2879 (__erased_*): Remove.
2880 (_Variant_storage::_S_vtable): Likewise.
2881 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2882 (_Variant_storage::__M_reset): Adjust.
2883 (__variant_construct): New.
2884 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2885 __variant_construct.
2886 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2887 (_Move_ctor_base::__M_destructive_copy): New.
2888 (_Move_ctor_base::__M_destructive_move): Adjust to use
2889 __variant_construct.
2890 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2891 (_Copy_assign_alias): Adjust to check both copy assignment
2892 and copy construction for triviality.
2893 (_Move_assign_base::operator=): Adjust to use __do_visit.
2894 (_Multi_array): Add support for visitors that accept and return
2896 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2897 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2898 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2899 a __variant_cookie temporary for a variant that is valueless and..
2900 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2901 (__gen_vtable::_Array_type): Conditionally make space for
2902 the __variant_cookie visitor case.
2903 (__variant_construct_by_index): New.
2904 (get_if): Adjust to use std::addressof.
2905 (relops): Adjust to use __do_visit.
2906 (variant): Add __variant_cast and __variant_construct_by_index
2908 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2909 instead of self-destruction.
2910 (variant::swap): Adjust to use __do_visit.
2911 (visit): Reimplement in terms of __do_visit.
2912 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2913 * testsuite/20_util/variant/compile.cc: Adjust.
2914 * testsuite/20_util/variant/run.cc: Likewise.
2916 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2918 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2920 * testsuite/experimental/feat-char8_t.cc: Likewise.
2922 * include/std/type_traits [C++20] (is_bounded_array)
2923 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2925 * testsuite/20_util/is_bounded_array/requirements/
2926 explicit_instantiation.cc: New test.
2927 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2929 * testsuite/20_util/is_bounded_array/value.cc: New test.
2930 * testsuite/20_util/is_unbounded_array/requirements/
2931 explicit_instantiation.cc: New test.
2932 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2934 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2936 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2938 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2940 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2942 * include/c_compatibility/math.h [C++20] (lerp): Add using
2944 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2945 (__lerp): Define function template to implement lerp.
2946 (lerp(float, float, float), lerp(double, double, double))
2947 (lerp(long double, long double, long double)): Define for C++20.
2948 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2949 (midpoint(T, T), midpoint(T*, T*)): Define.
2950 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2951 * testsuite/26_numerics/lerp.cc: New test.
2952 * testsuite/26_numerics/midpoint/floating.cc: New test.
2953 * testsuite/26_numerics/midpoint/integral.cc: New test.
2954 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2956 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2958 PR libstdc++/88996 Implement P0439R0
2959 Make std::memory_order a scoped enumeration.
2960 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2961 add variables for the old enumerators. Adjust calls.
2962 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2963 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2965 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2967 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2970 * include/std/memory_resource (polymorphic_allocator): Add default
2971 template argument for C++20.
2972 (polymorphic_allocator::allocate_bytes)
2973 (polymorphic_allocator::deallocate_bytes)
2974 (polymorphic_allocator::allocate_object)
2975 (polymorphic_allocator::deallocate_object)
2976 (polymorphic_allocator::new_object)
2977 (polymorphic_allocator::delete_object): New member functions for
2979 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2982 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2985 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2988 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2990 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2991 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2993 * include/std/memory (uses_allocator_construction_args): New set of
2994 overloaded functions.
2995 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2997 * include/std/memory_resource (polymorphic_allocator::construct)
2998 [__cplusplus > 201703l]: Replace all overloads with a single function
2999 using uses_allocator_construction_args.
3000 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3002 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3004 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3007 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3008 stylesheet directories before check for xsltproc. Try to use
3009 xmlcatalog to find local stylesheet directory before trying hardcoded
3010 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3011 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3012 use xsltproc if xmlcatalog fails to find a local stylesheet.
3013 * configure.ac: Check for xmlcatalog.
3014 * Makefile.in: Regenerate.
3015 * configure: Likewise.
3016 * doc/Makefile.in: Likewise.
3017 * include/Makefile.in: Likewise.
3018 * libsupc++/Makefile.in: Likewise.
3019 * po/Makefile.in: Likewise.
3020 * python/Makefile.in: Likewise.
3021 * src/Makefile.in: Likewise.
3022 * src/c++11/Makefile.in: Likewise.
3023 * src/c++17/Makefile.in: Likewise.
3024 * src/c++98/Makefile.in: Likewise.
3025 * src/filesystem/Makefile.in: Likewise.
3026 * testsuite/Makefile.in: Likewise.
3028 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3031 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3032 container deduction guides.
3033 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3034 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3035 parameters in deduction guides.
3036 * include/bits/stl_multimap.h (multimap): Likewise.
3037 * include/bits/stl_multiset.h (multiset): Likewise.
3038 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3039 * include/bits/stl_set.h (set): Likewise.
3040 * include/bits/stl_stack.h (stack): Likewise.
3041 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3042 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3043 constrain parameters in deduction guides.
3044 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3046 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3048 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3049 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3050 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3051 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3053 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3055 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3058 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3059 to class template and partial specialization using void_t.
3060 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3062 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3065 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3066 copy and move members public.
3068 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3070 * include/std/type_traits (__underlying_type_impl): New helper to
3071 make underlying_type SFINAE-friendly.
3072 (underlying_type): Derive from __underlying_type_impl.
3073 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3077 * include/bits/char_traits.h (__constant_char_array): Check index is
3078 in range before dereferencing.
3079 (char_traits<char>::compare, char_traits<char>::find)
3080 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3081 immediately if n is zero.
3082 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3083 Remove workarounds for PR 67026.
3084 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3086 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3089 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3091 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3092 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3094 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3097 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3098 type to std::size_t and argument to type to long double.
3100 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3102 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3103 * config/abi/post/sparc64-linux-gnu: New directory.
3104 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3105 * config/abi/post/sparc64-linux-gnu/32: New directory.
3106 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3108 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3110 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3111 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3114 2019-02-22 Tom Honermann <tom@honermann.net>
3116 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3117 printers for u8string and u8string_view.
3119 2019-02-22 Tom Honermann <tom@honermann.net>
3121 * testsuite/18_support/byte/ops.cc: Validate
3122 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3123 std::to_integer<char32_t>.
3124 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3125 std::numeric_limits<char8_t>.
3126 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3127 std::numeric_limits<char8_t>::lowest().
3128 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3129 std::numeric_limits<char8_t>::max_digits10.
3130 * testsuite/18_support/type_info/fundamental.cc: Validate
3131 typeinfo for char8_t.
3132 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3133 std::from_chars with char8_t.
3134 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3135 Validate explicit instantiation of std::hash<char8_t>.
3136 * testsuite/20_util/is_integral/value.cc: Validate
3137 std::is_integral<char8_t>.
3138 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3139 Validate std::make_signed<char8_t>.
3140 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3141 Validate u8string construction from char8_t sources.
3142 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3144 * testsuite/21_strings/basic_string_view/operations/compare/
3145 char/70483.cc: Validate substr operations on u8string_view.
3146 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3147 the u8string_view typedef is defined.
3148 * testsuite/21_strings/char_traits/requirements/
3149 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3151 * testsuite/21_strings/char_traits/requirements/
3152 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3153 constexpr member functions.
3154 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3155 that the u8string typedef is defined.
3156 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3157 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3158 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3159 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3161 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3162 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3164 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3165 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3166 Validate std::atomic<char8_t>::is_always_lock_free
3167 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3168 Update line numbers.
3169 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3171 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3173 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3174 Validate std::experimental::pmr::u8string.
3175 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3176 u8string_view typedef is defined.
3177 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3178 char32_t to the typelists.
3180 2019-02-22 Tom Honermann <tom@honermann.net>
3182 * include/ext/typelist.h: Constrain a partial specialization of
3183 typelist::detail::append_ to only match chain<T1,T2>.
3185 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3188 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3189 class template with class. Replace move and copy member types with
3190 member alias templates, so they are only instantiated when needed.
3191 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3192 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3193 test for C++11/14/17 as well.
3194 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3197 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3200 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3201 _GLIBCXX_PURE to the alias declaration.
3203 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3205 * testsuite/21_strings/basic_string/literals/types.cc
3206 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3207 * testsuite/21_strings/basic_string/literals/values.cc
3208 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3209 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3210 potentially having different type.
3211 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3212 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3214 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3215 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3216 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3217 string literals only using basic character set.
3218 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3219 u8 literals to char.
3220 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3221 Test ATOMIC_CHAR8_T_LOCK_FREE.
3222 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3223 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3224 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3225 * testsuite/experimental/string_view/literals/types.cc
3226 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3228 * testsuite/experimental/string_view/literals/values.cc
3229 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3231 2019-02-19 Tom Honermann <tom@honermann.net>
3233 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3234 from char16_32_t.cc; validates numeric_limits<char8_t>.
3235 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3236 test cloned from types.cc; validates operator""s for char8_t
3238 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3239 test cloned from values.cc; validates construction and comparison
3241 * testsuite/21_strings/basic_string/requirements/
3242 /explicit_instantiation/char8_t/1.cc: New test cloned from
3243 char16_t/1.cc; validates explicit instantiation of
3244 basic_string<char8_t>.
3245 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3246 New test cloned from types.cc; validates operator""sv for char8_t
3247 returns u8string_view.
3248 * testsuite/21_strings/basic_string_view/literals/
3249 values-char8_t.cc: New test cloned from values.cc; validates
3250 construction and comparison of u8string_view values.
3251 * testsuite/21_strings/basic_string_view/requirements/
3252 explicit_instantiation/char8_t/1.cc: New test cloned from
3253 char16_t/1.cc; validates explicit instantiation of
3254 basic_string_view<char8_t>.
3255 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3256 New test cloned from char16_t/65049.cc; validates that
3257 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3258 * testsuite/21_strings/char_traits/requirements/char8_t/
3259 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3260 that char_traits<char8_t> member typedefs are present and correct.
3261 * testsuite/21_strings/char_traits/requirements/
3262 explicit_instantiation/char8_t/1.cc: New test cloned from
3263 char16_t/1.cc; validates explicit instantiation of
3264 char_traits<char8_t>.
3265 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3266 from char16_t.cc: validates
3267 codecvt<char16_t, char8_t, mbstate_t>.
3268 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3269 from char32_t.cc: validates
3270 codecvt<char32_t, char8_t, mbstate_t>.
3271 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3272 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3273 codecvt<char32_t, char8_t, std::mbstate_t>.
3274 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3275 test cloned from string.cc; validates filesystem::path construction
3277 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3278 the __cpp_lib_char8_t feature test macro is defined with the
3280 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3281 New test cloned from string.cc; validates filesystem::path
3282 construction from char8_t input.
3283 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3284 test cloned from types.cc; validates operator""sv for char8_t
3285 returns u8string_view.
3286 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3287 New test cloned from values.cc; validates construction and
3288 comparison of u8string_view values.
3289 * testsuite/experimental/string_view/requirements/
3290 explicit_instantiation/char8_t/1.cc: New test cloned from
3291 char16_t/1.cc; validates explicit instantiation of
3292 basic_string_view<char8_t>.
3293 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3294 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3297 2019-02-19 Tom Honermann <tom@honermann.net>
3299 P0482R5 char8_t: Standard library support
3300 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3301 typeinfo symbols for char8_t.
3302 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3303 (GLIBCXX_3.4.26): Add symbols for specializations of
3304 numeric_limits and codecvt that involve char8_t.
3305 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3306 * include/bits/atomic_base.h: Add atomic_char8_t.
3307 * include/bits/basic_string.h: Add std::hash<u8string> and
3308 operator""s(const char8_t*, size_t).
3309 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3311 * include/bits/char_traits.h: Add char_traits<char8_t>.
3312 * include/bits/codecvt.h: Add
3313 codecvt<char16_t, char8_t, mbstate_t>,
3314 codecvt<char32_t, char8_t, mbstate_t>,
3315 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3316 codecvt_byname<char32_t, char8_t, mbstate_t>.
3317 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3318 recognize char8_t as an integral type.
3319 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3321 (path::u8string): Return std::u8string when char8_t support is
3323 (path::generic_u8string): Likewise.
3324 (path::_S_convert): Handle conversion from char8_t input.
3325 (path::_S_str_convert): Likewise.
3326 * include/bits/functional_hash.h: Add hash<char8_t>.
3327 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3329 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3330 for new char8_t specializations.
3331 * include/bits/localefwd.h: Add missing declarations of
3332 codecvt<char16_t, char, mbstate_t> and
3333 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3334 codecvt<char16_t, char8_t, mbstate_t> and
3335 codecvt<char32_t, char8_t, mbstate_t>.
3336 * include/bits/postypes.h: Add u8streampos
3337 * include/bits/stringfwd.h: Add declarations of
3338 char_traits<char8_t> and u8string.
3339 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3340 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3342 (path::u8string): Return std::u8string when char8_t support is
3344 (path::generic_u8string): Likewise.
3345 (path::_S_convert): Handle conversion from char8_t input.
3346 (path::_S_str_convert): Likewise.
3347 * include/experimental/string: Add u8string.
3348 * include/experimental/string_view: Add u8string_view,
3349 hash<experimental::u8string_view>, and
3350 operator""sv(const char8_t*, size_t).
3351 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3352 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3353 as a character type.
3354 * include/std/limits: Add numeric_limits<char8_t>.
3355 * include/std/string_view: Add u8string_view,
3356 hash<experimental::u8string_view>, and
3357 operator""sv(const char8_t*, size_t).
3358 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3359 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3360 * libsupc++/atomic_lockfree_defines.h: Define
3361 ATOMIC_CHAR8_T_LOCK_FREE.
3362 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3363 codecvt.cc and limits.cc so that char8_t specializations of
3364 numeric_limits and codecvt and emitted.
3365 * src/c++11/Makefile.in: Likewise.
3366 * src/c++11/codecvt.cc: Define members of
3367 codecvt<char16_t, char8_t, mbstate_t>,
3368 codecvt<char32_t, char8_t, mbstate_t>,
3369 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3370 codecvt_byname<char32_t, char8_t, mbstate_t>.
3371 * src/c++11/limits.cc: Define members of
3372 numeric_limits<char8_t>.
3373 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3374 locale_init.cc and localename.cc.
3375 * src/c++98/Makefile.in: Likewise.
3376 * src/c++98/locale_init.cc: Add initialization for the
3377 codecvt<char16_t, char8_t, mbstate_t> and
3378 codecvt<char32_t, char8_t, mbstate_t> facets.
3379 * src/c++98/localename.cc: Likewise.
3380 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3382 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3384 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3385 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3386 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3388 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3390 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3391 * doc/html/*: Regenerate.
3393 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3394 * doc/html/*: Regenerate.
3396 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3397 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3398 allocator type in is_constructible checks.
3399 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3400 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3401 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3402 problematic type from LWG 2586 discussion.
3403 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3404 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3406 * configure.ac: Check for C11 timespec_get function.
3407 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3409 * config.h.in: Regenerate.
3410 * configure: Regenerate.
3411 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3412 std for C++17 and up.
3414 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3415 * include/bits/stl_queue.h
3416 (priority_queue(const Compare&, const Container&, const Alloc&))
3417 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3419 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3421 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3422 * include/bits/stl_queue.h (queue, priority_queue): Add static
3423 assertions to enforce LWG 2566 requirement on value_type.
3424 * include/bits/stl_stack.h (stack): Likewise.
3427 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3429 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3430 * include/bits/std_abs.h: Add comment about LWG 2735.
3431 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3433 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3436 * include/std/version [__cpp_impl_destroying_delete]
3437 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3438 * libsupc++/new [__cpp_impl_destroying_delete]
3439 (__cpp_lib_destroying_delete): Likewise.
3440 (destroying_delete_t, destroying_delete): Likewise, but define even
3441 when __cpp_impl_destroying_delete is not defined.
3442 * testsuite/18_support/destroying_delete.cc: New test.
3444 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3447 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3448 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3449 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3450 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3452 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3455 * include/bits/fs_path.h (path::has_root_name)
3456 (path::has_root_directory, path::has_root_path)
3457 (path::has_relative_path, path::has_parent_path)
3458 (path::has_filename, path::has_stem, path::has_extension)
3459 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3461 * src/c++17/fs_path.cc (path::has_root_name)
3462 (path::has_root_directory, path::has_root_path)
3463 (path::has_relative_path, path::has_parent_path)
3464 (path::has_filename, path::_M_find_extension): Add noexcept.
3466 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3468 PR libstdc++/89102 (partial)
3469 * include/std/type_traits (common_type<>): Define.
3470 (common_type<T>): Derive from common_type<T, T>.
3471 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3472 Test zero-length template argument list.
3473 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3474 Test additional single argument cases.
3475 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3476 Adjust expected error.
3478 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3481 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3483 * include/bits/stl_stack.h (stack): Likewise.
3484 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3485 * testsuite/23_containers/queue/deduction.cc: New test.
3486 * testsuite/23_containers/stack/deduction.cc: New test.
3489 * include/std/type_traits (__is_convertible_helper)
3490 (__is_convertible_helper<_From, _To, false>): Revert changes to
3491 support is_nothrow_convertible.
3492 (__is_nt_convertible_helper): New helper.
3493 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3495 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3496 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3499 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3500 __is_alloc_insertable_impl. Replace single type member with two
3501 members, one for each of copy and move insertable.
3502 (__is_move_insertable): New trait for internal use.
3503 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3504 (vector::_S_nothrow_relocate(true_type)): New functions to
3505 conditionally check if __relocate_a can throw.
3506 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3507 on __is_move_insertable.
3508 (vector::_S_do_relocate): New overloaded functions to conditionally
3510 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3511 based on _S_use_relocate.
3512 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3513 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3514 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3517 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3518 parameter unnamed. Add message to static assertion.
3519 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3520 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3523 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3526 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3528 (__is_bitwise_relocatable): ... to this.
3529 (__relocate_a_1): Adapt.
3530 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3531 (__is_bitwise_relocatable): ... to this.
3533 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3536 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3537 final component as well as from _M_pathname. Append the dot using
3538 operator+= instead of only to _M_pathname.
3539 (path::_M_find_extension): Reformat slightly.
3540 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3541 Add more test cases.
3543 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3545 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3547 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3549 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3550 constexpr specifiers from arg and proj.
3552 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3553 __shared_ptr instantiations used by gcc4-compatible ABI.
3555 * include/experimental/forward_list (experimental::erase): Qualify
3557 * include/experimental/list (experimental::erase): Likewise.
3558 * include/std/forward_list (std::erase): Likewise.
3559 * include/std/list (std::erase): Likewise.
3561 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3563 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3564 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3565 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3566 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3567 * testsuite/ext/array_allocator/26875.cc: Likewise.
3568 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3569 * testsuite/util/replacement_memory_operators.h: Likewise.
3570 * testsuite/util/testsuite_allocator.h: Likewise.
3572 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3573 normal mode vector, even for debug mode.
3574 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3575 Define alias template for normal mode vector.
3577 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3580 * config/locale/generic/c_locale.h (__convert_from_v)
3581 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3582 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3583 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3584 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3586 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3589 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3590 data member with static member function _S_use_relocate().
3591 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3592 (vector::_M_default_append): Use _S_use_relocate() instead of
3595 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3598 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3601 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3602 write to stderr instead of using printf.
3604 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3607 * include/bits/char_traits.h (__constant_string_p,
3608 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3611 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3613 Implement C++20 P0600r1.
3614 * include/backward/hash_map: Add nodiscard attribute to empty.
3615 * include/backward/hash_set: Likewise.
3616 * backward/hashtable.h: Likewise.
3617 * include/bits/basic_string.h: Likewise.
3618 * include/bits/forward_list.h: Likewise.
3619 * include/bits/hashtable.h: Likewise.
3620 * include/bits/regex.h: Likewise.
3621 * include/bits/stl_deque.h: Likewise.
3622 * include/bits/stl_list.h: Likewise.
3623 * include/bits/stl_map.h: Likewise.
3624 * include/bits/stl_multimap.h: Likewise.
3625 * include/bits/stl_multiset.h: Likewise.
3626 * include/bits/stl_queue.h: Likewise.
3627 * include/bits/stl_set.h: Likewise.
3628 * include/bits/stl_stack.h: Likewise.
3629 * include/bits/stl_tree.h: Likewise.
3630 * include/bits/stl_vector.h: Likewise.
3631 * include/bits/unordered_map.h: Likewise.
3632 * include/bits/unordered_set.h: Likewise.
3633 * include/debug/array: Likewise.
3634 * include/experimental/any: Likewise.
3635 * include/experimental/bits/fs_path.h: Likewise.
3636 * include/experimental/internet: Likewise.
3637 * include/experimental/string_view: Likewise.
3638 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3640 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3642 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3644 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3646 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3648 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3650 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3652 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3654 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3655 info_fn_imps.hpp: Likewise.
3656 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3657 left_child_next_sibling_heap_.hpp: Likewise.
3658 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3660 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3662 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3664 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3666 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3668 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3670 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3672 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3673 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3674 * include/ext/rope: Likewise.
3675 * include/ext/slist: Likewise.
3676 * include/ext/vstring.h: Likewise.
3677 * include/profile/array: Likewise.
3678 * include/std/array: Likewise.
3679 * include/tr1/array: Likewise.
3680 * include/tr1/hashtable.h: Likewise.
3681 * include/tr1/regex: Likewise.
3682 * include/tr2/dynamic_bitset: Likewise.
3683 * include/bits/alloc_traits.h: Add nodiscard attribute to
3685 * include/experimental/memory_resource: Likewise.
3686 * include/ext/alloc_traits.h: Likewise.
3687 * include/ext/array_allocator.h: Likewise.
3688 * include/ext/bitmap_allocator.h: Likewise.
3689 * include/ext/debug_allocator.h: Likewise.
3690 * include/ext/extptr_allocator.h: Likewise.
3691 * include/ext/mt_allocator.h: Likewise.
3692 * include/ext/new_allocator.h: Likewise.
3693 * include/ext/pool_allocator.h: Likewise.
3694 * include/ext/throw_allocator.h: Likewise.
3695 * include/std/scoped_allocator: Likewise.
3696 * libsupc++/eh_alloc.cc: Likewise.
3697 * include/std/future: Add nodiscard attribute to async.
3698 * libsupc++/new: Add nodiscard attribute to new.
3700 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3705 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3706 * include/bits/shared_ptr.h
3707 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3708 (allocate_shared): Change to use new tag type.
3709 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3710 Declare new member function.
3711 (_Sp_alloc_shared_tag): Define new type.
3712 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3713 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3714 _Sp_make_shared_tag::_S_eq to check type_info.
3715 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3716 Constrain to prevent being called with _Sp_alloc_shared_tag.
3717 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3718 Replace constructor with ...
3719 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3720 reference parameter so address of the new object can be returned to
3721 the caller. Obtain the allocator from the tag type.
3722 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3723 constructor with ...
3724 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3725 to the __shared_count constructor.
3726 (__allocate_shared): Change to use new tag type.
3727 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3729 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3731 * src/c++17/fs_ops.cc
3732 (equivalent(const path&, const path&, error_code&))
3733 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3734 compare files instead of relying on incomplete info returned by stat.
3737 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3738 if the path is already absolute.
3739 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3740 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3743 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3744 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3745 of filesystem::exists.
3746 (create_directories(const path&, error_code&)): Add assertions.
3747 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3748 Add workaround for bug in _wstat for paths with trailing slash.
3749 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3750 for expected behaviour on mingw.
3751 * testsuite/experimental/filesystem/operations/create_directories.cc:
3753 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3754 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3755 not test permissions on mingw targets.
3757 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3759 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3760 constructors and open members taking wide strings. Fix patterns for
3761 filesystem::path members to match wstring_view parameters. Add
3762 exports for shared_ptr members used by directory iterators.
3763 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3764 error code parameter if the file doesn't exist.
3765 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3767 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3768 values for mingw targets, where "/" is not an absolute path. Do not
3769 test symlinks on mingw targets.
3770 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3771 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3773 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3774 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3775 that each component of the path is created.
3776 * testsuite/experimental/filesystem/operations/create_directories.cc:
3778 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3779 permissions on mingw targets.
3780 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3781 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3782 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3783 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3785 * testsuite/experimental/filesystem/operations/permissions.cc:
3787 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3788 symlinks or permissions on mingw targets.
3789 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3790 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3791 symlinks on mingw targets.
3792 * testsuite/experimental/filesystem/operations/remove_all.cc:
3794 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3795 permissions on mingw targets.
3796 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3797 test symlinks on mingw targets.
3798 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3801 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3804 Warn about unused comparisons of shared_ptr/unique_ptr
3805 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3806 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3807 <, <=, >, >= for shared_ptr.
3808 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3810 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3812 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3813 as 201611L, because P0497R0 changes are supported.
3814 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3816 * include/bits/erase_if.h [__cplusplus > 201703L]
3817 (__cpp_lib_erase_if): Only define for C++2a.
3818 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3819 (__cpp_lib_null_iterators): Define.
3820 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3821 (__cpp_lib_null_iterators): Define.
3822 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3824 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3826 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3828 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3829 changes are supported.
3830 * include/std/optional (__cpp_lib_optional): Likewise.
3831 * include/std/variant (__cpp_lib_variant): Likewise.
3832 * include/std/version [!__STRICT_ANSI__]
3833 (__cpp_lib_uncaught_exceptions): Define as long integer.
3834 [__cplusplus >= 201703L] (__cpp_lib_any)
3835 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3836 (__cpp_lib_variant): Define for C++17.
3837 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3839 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3842 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3844 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3848 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3850 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3853 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3855 * doc/xml/manual/intro.xml: Include new section.
3856 * doc/xml/manual/status_cxx2017.xml: Document more
3857 implementation-defined properties of the library.
3858 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3859 * doc/html/*: Regenerate.
3861 * include/bits/refwrap.h [__cplusplus > 201703L]
3862 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3863 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3864 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3866 (reference_wrapper::operator()): Add static assertion.
3867 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3869 * include/std/chrono (duration_values::zero(), duration_values::min())
3870 (duration_values::max()): Add noexcept.
3871 (duration::zero(), duration::min(), duration::max()): Likewise.
3872 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3873 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3874 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3876 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3878 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3880 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3881 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3883 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3886 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3887 specialization for C++17 (P0513R0, LWG 2817).
3888 * testsuite/20_util/hash/nullptr.cc: New test.
3891 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3892 pattern for std::basic_stringbuf::str().
3894 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3895 basic_ostream::operator<< patterns.
3897 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3899 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3900 test failures on targets with 32-bit time_t.
3902 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3903 * include/std/deque: Likewise.
3904 * include/std/forward_list: Likewise.
3905 * include/std/list: Likewise.
3906 * include/std/string: Likewise.
3907 * include/std/vector: Likewise.
3908 * include/std/version: Likewise.
3909 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3910 * testsuite/23_containers/deque/erasure.cc: Likewise.
3911 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3912 * testsuite/23_containers/list/erasure.cc: Likewise.
3913 * testsuite/23_containers/map/erasure.cc: Likewise.
3914 * testsuite/23_containers/set/erasure.cc: Likewise.
3915 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3916 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3917 * testsuite/23_containers/vector/erasure.cc: Likewise.
3919 * include/experimental/internet [AI_NUMERICSERV]
3920 (resolver_base::numeric_service): Define conditionally.
3921 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3923 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3926 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3927 Jonathan Wakely <jwakely@redhat.com>
3930 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3931 (GLIBCXX_3.4.26): Add new exports.
3932 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3933 correct list of sources.
3934 * include/Makefile.in: Regenerate.
3935 * include/std/ostream (operator<<(nullptr_t)): New member function.
3936 * src/c++17/ostream-inst.cc: New file.
3937 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3940 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3942 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3943 of the source file containing the caller.
3944 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3945 directories created by test.
3946 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3948 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3950 * testsuite/experimental/filesystem/iterators/
3951 recursive_directory_iterator.cc: Likewise.
3953 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3955 PR tree-optimization/88775
3956 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3957 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3958 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3959 instead of __builtin_constant_p if available. Don't bother with
3960 the pointer comparison in C++11 and earlier.
3962 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3966 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3969 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3971 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3972 for filesystem::path. Give variables more distinctive names.
3974 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3975 member function to perform non-trivial assignment.
3976 (_Optional_payload_base::_M_move_assign): Likewise.
3977 (_Optional_payload<T, true, false, true>::operator=)
3978 (_Optional_payload<T, true, true, false>::operator=)
3979 (_Optional_payload<T, true, false, false>::operator=): Call
3980 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3983 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3984 test std::complex<long double> if long double format is IBM128.
3985 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3988 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3990 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3991 for old std::unique_ptr layout.
3992 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3993 to become valueless. Add filesystem::path tests.
3996 * include/std/optional (_Optional_payload_base): New class template
3997 for common code hoisted from _Optional_payload specializations. Use
3998 a template for the union, to allow a partial specialization for
3999 types with non-trivial destructors. Add constructors for in-place
4000 initialization to the union.
4001 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4002 to perform non-trivial copy construction, instead of relying on
4003 non-standard copy elision in a delegating constructor.
4004 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4005 non-trivial move construction.
4006 (_Optional_payload): Derive from _Optional_payload_base and use it
4007 for everything except the non-trivial assignment operators, which are
4009 (_Optional_payload<false, C, M>): Derive from the specialization
4010 _Optional_payload<true, false, false> and add a destructor.
4011 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4012 Forward to corresponding members of _Optional_payload.
4013 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4014 Hoist common members from _Optional_base.
4015 (_Optional_base): Make all members and base class public.
4016 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4017 _Optional_base_impl.
4018 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4019 support for new std::optional layout.
4020 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4023 * include/bits/locale_conv.h: Use <> for includes not "".
4024 * include/ext/random: Likewise.
4025 * include/ext/vstring.h: Likewise.
4027 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4029 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4030 (GLIBCXX_3.4.21): Likewise.
4032 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4035 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4036 to match the one that controls whether utimbuf and utime are declared.
4038 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4041 * include/bits/char_traits.h (char_traits::move): Do not pass null
4042 pointers to memmove.
4043 * include/bits/locale_facets.h
4044 (ctype<char>::widen(const char*, const char*, char*)): Do not
4045 pass null pointers to memcpy.
4046 (ctype<char>::narrow(const char*, const char*, char, char*)):
4048 (ctype<char>::do_widen(const char*, const char*, char*)):
4050 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4053 * doc/xml/manual/spine.xml: Update copyright years.
4054 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4055 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4056 for C++17 filesystem library.
4057 * doc/html/*: Regenerate.
4059 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4060 * config.h.in: Regenerate.
4061 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4062 alphabetically and add missing entries for copy_symlink,
4063 hard_link_count, rename, and resize_file.
4064 * configure: Regenerate.
4065 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4066 used unconditionally.
4067 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4068 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4069 supports truncating to zero length.
4070 * testsuite/27_io/filesystem/operations/all.cc: New test.
4071 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4073 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4076 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4077 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4078 * config.h.in: Regenerate.
4079 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4080 remaining std::filesystem types and functions.
4081 * configure: Regenerate.
4082 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4083 * src/c++17/Makefile.in: Regenerate.
4084 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4085 here, and change name of included file.
4086 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4087 here, and change name of included file.
4088 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4089 path to dir-common.h.
4090 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4091 path to ops-common.h. Disable -Wunused-parameter warnings.
4092 (internal_file_clock): Define unconditionally.
4093 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4095 (do_copy_file, do_space): Move definitions to ops.common.h.
4096 (copy, file_size, hard_link_count, last_write_time, space): Only
4097 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4099 (last_write_time, read_symlink): Remove unused attributes from
4101 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4102 * src/filesystem/Makefile.in: Regenerate.
4103 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4104 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4105 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4106 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4107 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4108 dummy types and functions instead of using #error.
4109 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4110 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4112 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4113 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4114 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4115 to account for new namespace.
4116 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4117 -lstdc++fs from dg-options.
4118 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4119 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4120 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4121 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4122 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4124 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4125 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4127 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4128 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4129 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4130 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4131 * testsuite/27_io/filesystem/operations/create_directories.cc:
4133 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4134 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4135 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4136 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4137 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4138 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4139 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4140 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4141 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4142 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4143 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4144 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4145 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4146 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4147 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4148 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4149 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4150 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4152 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4156 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4157 typeinfo and vtables less greedy.
4158 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4159 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4160 * src/c++17/Makefile.in: Regenerate.
4161 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4162 here, and change name of included file.
4163 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4164 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4166 * src/filesystem/Makefile.in: Regenerate.
4167 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4168 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4169 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4170 from dg-options and remove dg-require-filesystem-ts.
4171 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4172 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4173 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4174 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4175 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4176 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4177 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4178 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4179 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4180 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4181 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4182 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4183 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4184 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4185 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4186 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4187 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4188 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4189 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4190 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4191 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4193 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4194 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4195 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4196 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4197 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4198 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4199 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4200 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4201 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4202 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4203 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4204 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4206 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4208 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4210 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4212 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4213 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4214 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4215 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4216 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4217 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4218 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4219 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4220 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4221 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4223 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4224 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4225 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4226 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4227 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4230 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4231 Check is_trivially_copyable instead of is_scalar.
4232 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4233 contained value can throw and its type is trivially copyable then
4234 construct into a temporary variant and move from it, to provide the
4235 strong exception safety guarantee.
4236 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4238 * testsuite/20_util/variant/87431.cc: New test.
4239 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4240 conversion causes valueless state.
4243 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4244 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4245 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4246 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4247 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4249 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4251 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4252 (file_time_type): Redefine in terms of __file_clock.
4253 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4255 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4257 (internal_file_lock): New helper type for accessing __file_clock.
4258 (do_copy_file): Use internal_file_lock to convert system time to
4260 (last_write_time(const path&, error_code&)): Likewise.
4261 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4263 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4265 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4266 for const member functions of std::basic_string.
4267 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4269 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4270 Make non-standard constructor private.
4271 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4273 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4274 explicit instantiations for C++17 as well as earlier dialects.
4275 * src/c++17/Makefile.am: Add new source files.
4276 * src/c++17/Makefile.in: Regenerate.
4277 * src/c++17/cow-string-inst.cc: New file defining explicit
4278 instantiations for basic_string member functions added in C++17.
4279 * src/c++17/string-inst.cc: Likewise.
4281 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4282 copy/move constructors for old std::basic_string.
4283 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4284 (basic_string::reference, basic_string::const_reference): Define
4285 as plain references for C++11 and later.
4286 (basic_string::basic_string()): Put constructor body outside
4287 preprocessor conditional groups.
4288 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4289 instead of copying it.
4290 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4292 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4294 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4295 cases for old basic_string.
4296 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4297 allocator-extended constructors unconditionally. Add extra members to
4298 allocator type when using old string ABI.
4299 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4301 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4303 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4304 -fno-inline added to test flags.
4306 * testsuite/21_strings/basic_string/requirements/
4307 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4309 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4310 assertion failures with old std::string ABI.
4312 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4314 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4315 functions that will only erase elements at the end.
4316 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4317 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4318 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4320 (path::_List::pop_back()): Define.
4321 (path::_List::_M_erase_from(const_iterator)): Define.
4322 (path::operator/=(const path&)): Use pop_back to remove last component
4323 and _M_erase_from to remove multiple components.
4324 (path::_M_append(basic_string_view<value_type>)): Likewise.
4325 (path::operator+=(const path&)): Likewise.
4326 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4327 (path::remove_filename()): Likewise.
4328 (path::lexically_normal()): Use _List::_Impl iterators instead of
4329 path::iterator. Use pop_back to remove components from the end. Clear
4330 trailing filename, instead of using erase(const_iterator) to remove
4331 a non-final component.
4332 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4334 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4336 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4337 incorrect treatment of empty filename after trailing slash.
4338 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4340 * testsuite/21_strings/basic_string/modifiers/assign/char/
4341 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4343 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4344 move_assign_optim.cc: Likewise.
4346 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4347 Jakub Jelinek <jakub@redhat.com>
4350 * include/experimental/memory: Replace UTF-8 quote characters.
4351 * include/std/future: Replace UTF-8 "em dash" characters.
4353 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4356 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4357 * include/debug/forward_list: Likewise.
4358 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4360 * include/experimental/chrono: Likewise.
4361 * include/experimental/functional: Likewise.
4362 * include/experimental/ratio: Likewise.
4363 * include/experimental/system_error: Likewise.
4364 * include/experimental/tuple: Likewise.
4365 * include/experimental/type_traits: Likewise.
4366 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4367 * include/parallel/multiseq_selection.h: Likewise.
4370 * config/abi/pre/gnu.ver: Add missing exports.
4371 * testsuite/22_locale/collate_byname/88681.cc: New test.
4372 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4373 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4375 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4377 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4378 initializer_list<value_type> and from input iterator ranges.
4379 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4381 * testsuite/experimental/string_view/element_access/char/empty.cc:
4382 Fix year range in copyright header.
4384 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4386 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4387 Fix year range in copyright header.
4389 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4391 Update copyright years.
4393 Copyright (C) 2019 Free Software Foundation, Inc.
4395 Copying and distribution of this file, with or without modification,
4396 are permitted in any medium without royalty provided the copyright
4397 notice and this notice are preserved.