1 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
4 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
5 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
6 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
8 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
10 * include/std/numeric (midpoint(T, T)): Change implementation for
11 floating-point types to avoid incorrect rounding of denormals.
12 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
13 rounding with denormals.
14 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
15 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
17 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
19 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
21 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
23 * configure: Regenerate.
25 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
26 Qualify calls to __never_valueless.
28 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
31 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
32 vector<bool> for test.
33 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
35 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
37 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
39 (istream_iterator::_M_read()): Do not check stream state before
40 attempting extraction. Set stream pointer to null when extraction
42 (operator==(const istream_iterator&, const istream_iterator&)): Change
43 to be a hidden friend of istream_iterator.
44 (operator!=(const istream_iterator&, const istream_iterator&)):
46 (ostream_iterator::ostream_iterator()): Add default constructor.
47 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
49 * testsuite/24_iterators/istream_iterator/1.cc: New test.
50 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
51 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
52 constructor taking a string.
53 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
56 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
57 Jonathan Wakely <jwakely@redhat.com>
60 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
61 values of type bool for vector<bool> elements.
62 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
63 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
65 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
67 PR libstdc++/90920 partially revert r263433
68 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
69 (rotate): Remove checks.
70 * testsuite/25_algorithms/rotate/90920.cc: New test.
72 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
73 category used in invocable check.
74 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
75 * testsuite/26_numerics/reduce/2.cc: New test.
77 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
79 * include/bits/algorithmfwd.h: Change title of doc group.
80 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
82 * include/bits/stl_numeric.h: Define doc group and add algos to it.
83 * include/std/numeric (__is_random_access_iter): New internal trait.
84 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
85 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
86 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
87 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
88 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
89 * testsuite/26_numerics/reduce/1.cc: New test.
90 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
91 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
92 * testsuite/26_numerics/transform_reduce/1.cc: New test.
93 * testsuite/util/testsuite_iterators.h (test_container::size()): New
96 * include/c_global/cstddef (std::byte): Perform arithmetic operations
97 in unsigned int to avoid promotion (LWG 2950).
99 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
101 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
104 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
106 PR libstdc++/90281 Fix string conversions for filesystem::path
107 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
108 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
109 __str_codecvt_in_all to fail for partial conversions and throw on
111 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
112 (path::_Cvt<char8_t>): Add explicit specialization.
113 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
115 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
116 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
117 instead of codecvt_utf8. Use __str_codecvt_in_all and
118 __str_codecvt_out_all.
119 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
120 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
121 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
122 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
123 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
124 after converting to UTF-8.
125 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
126 __str_codecvt_in_all.
127 (path::string): Fix initialization of string types with different
129 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
130 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
131 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
133 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
134 return false for partial conversions.
135 * include/experimental/bits/fs_path.h (u8path):
136 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
137 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
138 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
139 instead of codecvt_utf8. Use __str_codecvt_in_all and
140 __str_codecvt_out_all.
141 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
142 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
143 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
144 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
145 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
146 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
147 __str_codecvt_in_all.
148 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
149 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
150 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
151 __str_codecvt_in_all.
152 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
153 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
154 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
155 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
156 strings and with Unicode characters outside the basic multilingual
158 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
159 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
160 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
161 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
162 * testsuite/experimental/filesystem/path/native/string.cc: Test with
163 empty strings and with Unicode characters outside the basic
166 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
167 Jonathan Wakely <jwakely@redhat.com>
169 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
170 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
171 deallocate node if insertion fails.
172 (_Hashtable::_M_insert_multi_node): Likewise.
173 (_Hashtable::_M_reinsert_node): Pass additional key argument.
174 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
175 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
176 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
177 (_Hashtable::extract(const _Key&)): Likewise.
178 (_Hashtable::_M_merge_unique): Pass additional key argument.
179 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
181 (_Hashtable::_M_insert): Likewise.
182 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
183 (_Hashtable_alloc): Add comments to functions with misleading names.
185 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
187 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
189 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
190 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
191 header for std::allocator.
192 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
193 using-declaration for std::size_t.
194 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
196 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
198 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
199 * testsuite/experimental/map/erasure.cc: Include <string> for
201 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
203 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
205 * include/experimental/type_traits (experimental::nonesuch): Use
206 pragma to disable -Wctor-dtor-privacy warnings.
207 * include/std/type_traits (__is_convertible_helper<From, To, false>)
208 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
210 * include/std/version (__cpp_lib_bind_front): Add missing macro.
212 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
214 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
215 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
216 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
217 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
219 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
220 (variant::emplace): Change static_assert messages from "should be"
222 (hash<monostate>::operator()): Remove name of unused parameter.
224 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
227 * include/Makefile.am: Add new <bits/charconv.h> header.
228 * include/Makefile.in: Regenerate.
229 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
230 (to_string(long), to_string(unsigned long), to_string(long long))
231 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
232 * include/bits/charconv.h: New header.
233 (__detail::__to_chars_len): Move here from <charconv>.
234 (__detail::__to_chars_10_impl): New function extracted from
235 __detail::__to_chars_10.
236 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
237 (__to_chars_unsigned_type): New class template that reuses
238 __make_unsigned_selector_base::__select to pick a type.
239 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
240 (__detail::__to_chars_len): Move to new header.
241 (__detail::__to_chars_10): Add inline specifier. Move code doing the
242 output to __detail::__to_chars_10_impl and call that.
243 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
244 * testsuite/21_strings/basic_string/numeric_conversions/char/
245 to_string.cc: Fix reference in comment. Remove unused variable.
246 * testsuite/21_strings/basic_string/numeric_conversions/char/
247 to_string_int.cc: New test.
249 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
251 Fix ConstexprIterator requirements tests - No constexpr algorithms!
252 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
253 Replace copy with hand-rolled loop.
254 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
257 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
259 Test for C++20 p0858 - ConstexprIterator requirements.
260 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
262 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
265 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
267 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
269 * include/bits/c++config: Rename all macros of the form __PSTL* to
271 * include/std/algorithm: Likewise.
272 * include/std/execution: Likewise.
273 * include/std/numeric: Likewise.
274 * include/std/memory: Likewise.
275 * include/pstl/glue_memory_impl.h: Likewise.
276 * include/pstl/numeric_impl.h: Likewise.
277 * include/pstl/glue_memory_defs.h: Likewise.
278 * include/pstl/execution_defs.h: Likewise.
279 * include/pstl/utils.h: Likewise.
280 * include/pstl/algorithm_fwd.h: Likewise.
281 * include/pstl/unseq_backend_simd.h: Likewise.
282 * include/pstl/glue_execution_defs.h: Likewise.
283 * include/pstl/algorithm_impl.h: Likewise.
284 * include/pstl/parallel_impl.h: Likewise.
285 * include/pstl/memory_impl.h: Likewise.
286 * include/pstl/glue_numeric_defs.h: Likewise.
287 * include/pstl/parallel_backend_utils.h: Likewise.
288 * include/pstl/glue_algorithm_defs.h: Likewise.
289 * include/pstl/parallel_backend.h: Likewise.
290 * include/pstl/glue_numeric_impl.h: Likewise.
291 * include/pstl/parallel_backend_tbb.h: Likewise.
292 * include/pstl/numeric_fwd.h: Likewise.
293 * include/pstl/glue_algorithm_impl.h: Likewise.
294 * include/pstl/execution_impl.h: Likewise.
295 * include/pstl/pstl_config.h: Likewise.
296 * testsuite/util/pstl/pstl_test_config.h: Likewise.
297 * testsuite/util/pstl/test_utils.h: Likewise.
298 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
300 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
302 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
304 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
305 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
306 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
307 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
308 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
310 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
311 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
312 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
313 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
314 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
316 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
317 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
318 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
319 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
320 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
322 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
323 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
324 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
326 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
328 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
329 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
330 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
332 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
334 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
336 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
338 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
340 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
342 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
344 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
346 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
348 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
350 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
352 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
354 Rename header guards to be consistent with upstream project's
356 * include/pstl/glue_memory_impl.h: Rename all macros of the form
357 _PSTL_(.*)_H to _PSTL_\U\1_H.
358 * include/pstl/numeric_impl.h: Likewise.
359 * include/pstl/glue_memory_defs.h: Likewise.
360 * include/pstl/execution_defs.h: Likewise.
361 * include/pstl/utils.h: Likewise.
362 * include/pstl/algorithm_fwd.h: Likewise.
363 * include/pstl/unseq_backend_simd.h: Likewise.
364 * include/pstl/glue_execution_defs.h: Likewise.
365 * include/pstl/algorithm_impl.h: Likewise.
366 * include/pstl/parallel_impl.h: Likewise.
367 * include/pstl/memory_impl.h: Likewise.
368 * include/pstl/glue_numeric_defs.h: Likewise.
369 * include/pstl/parallel_backend_utils.h: Likewise.
370 * include/pstl/glue_algorithm_defs.h: Likewise.
371 * include/pstl/parallel_backend.h: Likewise.
372 * include/pstl/glue_numeric_impl.h: Likewise.
373 * include/pstl/parallel_backend_tbb.h: Likewise.
374 * include/pstl/numeric_fwd.h: Likewise.
375 * include/pstl/glue_algorithm_impl.h: Likewise.
376 * include/pstl/execution_impl.h: Likewise.
377 * include/pstl/pstl_config.h: Likewise.
378 * testsuite/util/pstl/pstl_test_config.h: Likewise.
380 Synchronize libstdc++ parallel algorithms with upstream
382 * include/pstl/algorithm_fwd.h: Synchronize with
383 upstream PSTL project.
384 * include/pstl/algorithm_impl.h: Likewise.
385 * include/pstl/execution_defs.h: Likewise.
386 * include/pstl/execution_impl.h: Likewise.
387 * include/pstl/glue_algorithm_impl.h: Likewise.
388 * include/pstl/glue_execution_defs.h: Likewise.
389 * include/pstl/numeric_fwd.h: Likewise.
390 * include/pstl/numeric_impl.h: Likewise.
391 * include/pstl/parallel_backend.h: Likewise.
392 * include/pstl/pstl_config.h: Likewise.
393 * include/pstl/unseq_backend_simd.h: Likewise.
394 * include/pstl/parallel_backend_serial.h: New file.
395 * include/Makefile.am (pstl_headers): Add
396 parallel_backend_serial.h.
397 * include/Makefile.in: Regenerate.
399 Clean up non-conforming names
400 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
401 Uglfiy copy_range1 and copy_range2
402 (__pattern_walk2_n): Rename local n to __n
403 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
404 Rename parameter _T to _Tp.
406 Integrate non-TBB serial backend support
407 * include/bits/c++config: Adjust TBB detection logic to select serial
408 PSTL backend if no TBB present.
409 * testsuite/utils/pstl/test_utils.h: Remove check for
410 _PSTL_USE_PAR_POLICIES
412 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
414 * testsuite/24_iterators/container_access.cc: Move dg-options before
415 dg-do directive so the target check uses the -std option.
418 * configure: Regenerate.
419 * src/Makefile.am (stamp-debug): Also test for missing makefile.
420 * src/Makefile.in: Regenerate.
422 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
424 * include/std/array: Do not include <stdexcept>.
425 * include/std/optional: Include <exception> and
426 <bits/exception_defines.h> instead of <stdexcept>.
427 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
429 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
431 * testsuite/23_containers/map/erasure.cc: Include <string>.
432 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
434 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
435 dg-prune-output for different C++98 diagnostic.
436 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
438 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
440 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
442 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
444 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
446 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
448 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
450 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
452 * testsuite/23_containers/vector/requirements/dr438/
453 constructor_1_neg.cc: Likewise.
454 * testsuite/23_containers/vector/requirements/dr438/
455 constructor_2_neg.cc: Likewise.
456 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
458 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
460 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
461 Do not test allocator rebinding extension for C++2a.
462 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
463 dg-do directive for C++17 and C++2a.
465 * testsuite/23_containers/deque/requirements/explicit_instantiation/
466 1_c++0x.cc: Remove redundant test.
467 * testsuite/23_containers/deque/requirements/explicit_instantiation/
468 2.cc: Use target selector instead of preprocessor condition.
469 * testsuite/23_containers/deque/requirements/explicit_instantiation/
470 3.cc: Do not run test for C++2a.
471 * testsuite/23_containers/forward_list/requirements/
472 explicit_instantiation/3.cc: Likewise.
473 * testsuite/23_containers/forward_list/requirements/
474 explicit_instantiation/5.cc: Do not test allocator rebinding extension
476 * testsuite/23_containers/list/requirements/explicit_instantiation/
477 1_c++0x.cc: Remove redundant test.
478 * testsuite/23_containers/list/requirements/explicit_instantiation/
479 2.cc: Use target selector instead of preprocessor condition.
480 * testsuite/23_containers/list/requirements/explicit_instantiation/
481 3.cc: Do not run test for C++2a.
482 * testsuite/23_containers/list/requirements/explicit_instantiation/
483 5.cc: Do not test allocator rebinding extension for C++2a.
484 * testsuite/23_containers/map/requirements/explicit_instantiation/
485 1_c++0x.cc: Remove redundant test.
486 * testsuite/23_containers/map/requirements/explicit_instantiation/
487 2.cc: Adjust comment.
488 * testsuite/23_containers/map/requirements/explicit_instantiation/
489 3.cc: Do not run test for C++2a.
490 * testsuite/23_containers/map/requirements/explicit_instantiation/
491 5.cc: Do not test allocator rebinding extension for C++2a.
492 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
493 1_c++0x.cc: Remove redundant test.
494 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
495 3.cc: Do not run test for C++2a.
496 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
497 5.cc: Do not test allocator rebinding extension for C++2a.
498 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
499 3.cc: Do not run test for C++2a.
500 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
501 5.cc: Do not test allocator rebinding extension for C++2a.
502 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
503 Do not run test for C++2a.
504 * testsuite/23_containers/set/requirements/explicit_instantiation/
505 1_c++0x.cc: Remove redundant test.
506 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
507 Do not test allocator rebinding extension for C++2a.
508 * testsuite/23_containers/unordered_map/requirements/
509 explicit_instantiation/3.cc: Likewise.
510 * testsuite/23_containers/unordered_map/requirements/
511 explicit_instantiation/5.cc: Do not test allocator rebinding extension
513 * testsuite/23_containers/unordered_multimap/requirements/
514 explicit_instantiation/3.cc: Do not run test for C++2a.
515 * testsuite/23_containers/unordered_multimap/requirements/
516 explicit_instantiation/5.cc: Do not test allocator rebinding extension
518 * testsuite/23_containers/unordered_multiset/requirements/
519 explicit_instantiation/3.cc: Do not run test for C++2a.
520 * testsuite/23_containers/unordered_multiset/requirements/
521 explicit_instantiation/5.cc: Do not test allocator rebinding extension
523 * testsuite/23_containers/unordered_set/requirements/
524 explicit_instantiation/3.cc: Do not run test for C++2a.
525 * testsuite/23_containers/unordered_set/requirements/
526 explicit_instantiation/5.cc: Do not test allocator rebinding extension
528 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
529 2.cc: Remove redundant test.
530 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
531 3.cc: Do not run test for C++2a.
532 * testsuite/23_containers/vector/requirements/explicit_instantiation/
535 * include/std/type_traits (is_empty, is_polymorphic, is_final)
536 (is_abstract, is_aggregate): Remove static_assert.
537 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
539 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
540 missing -std=gnu++17 option.
541 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
542 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
543 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
546 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
547 * testsuite/18_support/set_unexpected.cc: Likewise.
548 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
550 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
551 function to be valid in C++11.
552 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
553 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
554 include Library Fundamentals or Networking headers in C++11 mode.
555 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
557 * include/std/tuple (_TC): Replace with _TupleConstraints.
558 (_TupleConstraints): New helper for SFINAE constraints, with more
559 expressive member functions to reduce duplication when used.
560 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
561 (tuple::_TCC): Replace dummy type parameter with bool non-type
562 parameter that can be used to check the pack size.
563 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
564 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
565 checking constraints in constructors.
566 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
568 (tuple::tuple): Use new helpers to reduce repitition in constraints.
569 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
570 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
571 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
572 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
573 constraints in constructors.
574 (tuple::__is_alloc_arg()): New SFINAE helpers.
575 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
577 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
578 * testsuite/20_util/tuple/cons/90700.cc: New test.
579 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
580 to meet new constraint on allocator-extended default constructor.
582 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
584 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
585 * include/bits/stl_multimap.h (multimap): Likewise.
587 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
589 Rename variables and cleanup comments.
590 * include/bits/hashtable_policy.h
591 * include/bits/hashtable.h
593 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
595 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
596 Fix bgcolor for P0340R3.
597 * doc/html/*: Regenerate.
600 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
601 <experimental/memory_resource>.
602 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
603 P0339R6, P0340R3, P1164R1 and P1357R1.
604 * doc/html/*: Regenerate.
606 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
607 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
608 allocator::value_type assertion for C++2a.
609 * include/bits/hashtable.h: Likewise.
610 * include/bits/stl_deque.h: Likewise.
611 * include/bits/stl_list.h: Likewise.
612 * include/bits/stl_map.h: Likewise.
613 * include/bits/stl_multimap.h: Likewise.
614 * include/bits/stl_multiset.h: Likewise.
615 * include/bits/stl_set.h: Likewise.
616 * include/bits/stl_vector.h: Likewise.
617 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
618 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
619 * testsuite/23_containers/list/48101-3_neg.cc: New test.
620 * testsuite/23_containers/map/48101-3_neg.cc: New test.
621 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
622 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
623 * testsuite/23_containers/set/48101-3_neg.cc: New test.
624 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
625 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
626 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
627 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
628 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
630 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
632 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
634 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
636 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
638 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
640 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
642 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
644 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
647 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
648 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
649 * libsupc++/eh_term_handler.h: New header defining
650 _GLIBCXX_DEFAULT_TERM_HANDLER.
651 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
652 (set_terminate): Restore default handler when argument is null.
653 (set_unexpected): Likewise.
654 * testsuite/18_support/set_terminate.cc: New test.
655 * testsuite/18_support/set_unexpected.cc: New test.
657 * include/backward/hashtable.h (size_t, ptrdiff_t)
658 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
659 (distance, vector, pair, __iterator_category): Remove
660 using-declarations that add these names to namespace __gnu_cxx.
661 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
662 * include/ext/debug_allocator.h (size_t): Likewise.
663 * include/ext/functional (size_t, unary_function, binary_function)
664 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
666 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
667 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
668 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
669 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
670 * include/ext/numeric (iota): Fix outdated comment.
671 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
672 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
673 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
674 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
675 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
677 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
678 (allocator, __true_type, __false_type): Likewise.
680 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
683 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
684 New helpers for checking preconditions in traits.
685 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
686 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
687 (is_destructible, is_nothrow_destructible, is_constructible)
688 (is_default_constructible, is_copy_constructible)
689 (is_move_constructible, is_nothrow_default_constructible)
690 (is_nothrow_constructible, is_nothrow_copy_constructible)
691 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
692 (is_nothrow_assignable, is_nothrow_copy_assignable)
693 (is_nothrow_move_assignable, is_trivially_constructible)
694 (is_trivially_copy_constructible, is_trivially_move_constructible)
695 is_trivially_assignable, is_trivially_copy_assignable)
696 (is_trivially_move_assignable, is_trivially_destructible)
697 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
698 (is_invocable_r, is_nothrow_invocable)
699 (has_unique_object_representations, is_aggregate): Add static_asserts
700 to make sure that type traits are not misused with incomplete types.
701 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
702 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
703 base characteristics without assertions that can be reused in other
705 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
706 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
708 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
709 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
710 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
711 * testsuite/20_util/is_class/value.cc: Check incomplete type.
712 * testsuite/20_util/is_function/value.cc: Likewise.
713 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
714 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
716 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
717 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
718 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
719 * testsuite/20_util/is_union/value.cc: Likewise.
720 * testsuite/20_util/is_void/value.cc: Likewise.
721 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
723 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
725 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
726 Add new private member function.
727 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
728 (random_device::_M_init_pretr1(const string&)): Call new private
729 member with string data.
730 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
732 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
733 test using COW strings.
734 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
735 a value from the device.
736 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
737 Fix typo in token string.
739 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
741 LWG2788 basic_string spurious use of a default constructible allocator
742 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
743 (basic_string::_M_replace_dispatch): Construct temporary string with
744 the current allocator.
745 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
746 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
748 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
750 * doc/xml/manual/diagnostics.xml: Update list of headers that define
752 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
753 section about new/delete overloads. Improve section on verbose
755 * doc/html/*: Regenerate.
757 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
758 P0811R3. Change status of P1353R0.
759 * doc/html/*: Regenerate.
761 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
762 documentation of implementation-defined types for [thread.req.native].
763 * doc/xml/manual/status_cxx2017.xml: Update documentation of
764 implementation-defined strings for [variant.bad.access]. Fix typo in
765 documentation of implementation-defined support for [fs.conform.9945].
766 * doc/html/*: Regenerate.
768 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
771 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
772 that fails on mingw-w64.
775 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
776 (status(const path&, error_code&)): Use parent_path() to remove
778 (symlink_status(const path&, error_code&)): Duplicate workaround for
779 bug in _wstat for paths with trailing slash.
780 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
782 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
783 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
785 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
786 once instead of building it iteratively.
788 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
790 PR libstdc++/85494 use rdseed and rand_s in std::random_device
791 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
792 the assembler supports rdseed.
793 * config.h.in: Regenerate.
794 * configure: Regenerate.
795 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
796 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
797 * doc/html/*: Regenerate.
798 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
799 * include/bits/random.h (random_device::random_device()): Always call
800 _M_init rather than _M_init_pretr1.
801 (random_device::random_device(const string&)): Likewise.
802 (random_device::operator()()): Always call _M_getval().
803 (random_device::_M_file): Replace first member of union with an
804 anonymous struct, with _M_file as its first member.
805 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
806 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
807 (USE_MT19937): Define if none of the above are defined.
808 (USE_POSIX_FILE_IO): Define.
809 (_M_strtoul): Remove.
810 [USE_RDSEED] (__x86_rdseed): Define new function.
811 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
812 (random_device::_M_init(const string&)): Initialize new union members.
813 Add support for "rdseed" and "rand_s" tokens. Decide what the
814 "default" token does according to which USE_* macros are defined.
815 [USE_POSIX_FILE_IO]: Store a file descriptor.
816 [USE_MT19937]: Forward to _M_init_pretr1 instead.
817 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
818 code from _M_strtoul.
819 [!USE_MT19937]: Call _M_init, transforming the old default token or
820 numeric tokens to "default".
821 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
822 (random_device::_M_getval()): Use new union members to obtain a
823 random number from the stored function pointer or file descriptor.
824 [USE_MT19937]: Obtain a value from the mt19937 engine.
825 (random_device::_M_getval_pretr1()): Call _M_getval().
826 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
828 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
829 * testsuite/26_numerics/random/random_device/85494.cc: New test.
831 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
834 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
835 _M_split_cmpts() for a path with multiple components.
836 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
837 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
838 components and reserve space in vector. Return early when there is
840 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
841 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
843 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
844 form of std::equals for C++11 compatibility.
846 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
848 * doc/xml/manual/appendix_contributing.xml: Update pointer to
849 C++ standard at ansi.org.
851 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
853 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
854 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
857 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
858 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
860 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
862 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
864 * testsuite/20_util/function_objects/invoke/3.cc: New test.
865 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
866 "compile" test to "run".
868 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
869 * doc/html/*: Regenerate.
870 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
871 rvalue aliasing constructor.
872 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
873 (reinterpret_pointer_cast): Add overloads taking rvalues.
874 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
875 Add rvalue aliasing constructor.
876 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
877 "run" and check return values as well as types.
878 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
879 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
880 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
881 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
884 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
885 * doc/xml/manual/intro.xml: Likewise.
886 * include/std/future (__create_task_state): Add default arguments
887 to make providing an allocator optional.
888 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
889 instead of delegating to another constructor.
890 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
891 define allocator-extended constructors for C++17 and later.
892 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
894 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
895 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
896 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
898 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
900 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
901 Don't run the libstdc++/83237 part on simulator targets.
903 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
905 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
907 * doc/html/*: Regenerate.
909 * include/experimental/any (__any_caster): Use RTTI if comparing
910 addresses fails, to support non-unique addresses in shared libraries.
911 * include/std/any (__any_caster): Likewise.
914 * include/experimental/any (__any_caster): Constrain to only be
915 callable for object types. Use remove_cv_t instead of decay_t.
916 If the type decays or isn't copy constructible, compare the manager
917 function to a dummy specialization.
918 (__any_caster): Add overload constrained for non-object types.
919 (any::_Manager_internal<_Op>): Add dummy specialization.
920 * testsuite/experimental/any/misc/any_cast.cc: Test function types
923 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
926 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
927 reversed arguments to uninitialized_copy_n.
928 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
929 is unchanged by copy assignment.
930 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
931 compare path components.
934 * include/experimental/memory_resource: Add system header pragma and
935 do not define anything unless compiled as C++14 or later.
936 (__resource_adaptor_common::__guaranteed_alignment): Remove.
937 (__resource_adaptor_imp::do_allocate): If the requested alignment
938 is a fundamental alignment then either allocate directly from _M_alloc
939 or call the new _M_allocate function.
940 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
941 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
942 of the allocator rebound to a POD type with the specified alignment.
943 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
944 * testsuite/experimental/memory_resource/new_delete_resource.cc:
945 Adjust expected allocation sizes.
946 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
947 xfail for Solaris x86.
949 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
951 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
952 * include/pstl/execution_defs.h (__enable_if_execution_policy):
953 Use std::__remove_cvref_t when building with GCC.
955 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
958 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
959 Use "additional_flags" to pass -ltbb to v3_target_compile command.
960 Use check_v3_target_prop_cached to cache the result of the test.
962 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
964 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
967 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
968 Changed v3_target_compile check from preprocess to executable.
969 Added "-ltbb" to v3_target_compile flags.
971 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
973 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
974 Add check for Thread Building Blocks 2018 or later.
976 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
978 * testsuite/experimental/names.cc: Only include Networking TS headers
979 on targets with the necessary Gthreads support.
981 2019-05-20 Marek Polacek <polacek@redhat.com>
983 CWG 2094 - volatile scalars are trivially copyable.
985 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
986 result for volatile int.
988 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
990 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
991 * testsuite/experimental/names.cc: Include <experimental/filesystem>
994 PR c++/90532 Ensure __is_constructible(T[]) is false
995 * include/std/type_traits (__do_is_default_constructible_impl)
996 (__is_default_constructible_atom, __is_default_constructible_safe):
998 (is_default_constructible): Use is_constructible.
999 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1000 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1001 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1002 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1005 2019-05-20 Pádraig Brady <pbrady@fb.com>
1007 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1008 to the deallocator with -fsized-deallocation.
1010 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1012 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1013 test by passing correct alignment to deallocate function.
1015 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1018 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1019 Raise exception if unique_ptr tuple member has unknown structure.
1020 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1021 Adjust worker to support new __uniq_ptr_data base class. Do not
1022 assume field called _M_head_impl is the first tuple element.
1024 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1026 * include/bits/stl_deque.h
1027 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1028 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1029 (_Deque_base::_Deque_impl_data): New.
1030 (_Deque_base::_Deque_impl): Inherit latter.
1031 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1032 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1033 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1034 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1035 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1036 (deque<>::deque()): Default.
1037 (deque<>::deque(deque&&)): Default.
1038 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1039 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1040 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1041 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1042 _M_range_initialize.
1043 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1044 (deque<>::resize(size_type, const value_type&)): Share a single
1046 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1047 _M_range_insert_aux.
1048 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1049 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1050 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1051 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1053 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1056 * include/std/variant (holds_alternative, get, get_if): Improve
1057 static assertion messages.
1058 (bad_variant_access::bad_variant_access()): Change default message.
1059 (__throw_bad_variant_access(bool)): New overload.
1060 (get): Use new overload.
1061 (visit, visit<R>): Improve exception message.
1063 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1064 targets. Add more cases from P0608R3.
1065 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1067 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1068 * include/experimental/type_traits (is_detected_exact)
1069 (is_detected_exact_v): Likewise.
1070 * include/pstl/execution_defs.h (is_execution_policy)
1071 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1072 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1073 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1074 * testsuite/experimental/names.cc: New test.
1077 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1078 assertions from the destructor.
1079 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1080 Move static_assert for hash function to here.
1081 (_Hash_table_base::_M_equals): Move static_assert for equality
1083 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1085 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1086 the value directly instead of calling _S_value.
1087 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1088 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1089 _S_key(_Const_Link_type).
1090 * testsuite/23_containers/set/85965.cc: Check construction,
1091 destruction, assignment and size() do not trigger the assertions.
1092 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1093 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1095 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1096 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1097 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1098 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1099 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1100 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1101 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1103 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1104 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1107 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1109 * doc/html/*: Regenerate.
1110 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1111 of decay_t (P0777R1).
1113 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1115 Move from state of allocators (LWG2593)
1116 * include/bits/stl_deque.h
1117 (_Deque_base(_Deque_base&&, false_type)): Remove.
1118 (_Deque_base(_Deque_base&&, true_type)): Remove.
1119 (_Deque_base(_Deque_base&&)): Adapt.
1120 (_Deque_base::_M_move_impl()): Remove.
1121 * testsuite/util/testsuite_allocator.h
1122 (propagating_allocator(propagating_allocator&&)): Preserve move from
1124 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1126 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1128 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1129 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1130 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1132 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1134 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1135 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1137 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1139 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1141 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1143 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1145 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1147 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1149 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1152 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1154 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1155 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1157 * include/std/variant (__overload_set): Remove.
1159 (_Build_FUN): New class template to define a single FUN overload,
1160 with specializations to prevent unwanted conversions, as per P0608R3.
1161 (_Build_FUNs): New class template to build an overload set of FUN.
1162 (_FUN_type): New alias template to perform overload resolution.
1163 (__accepted_type): Use integer_constant base for failure case. Use
1164 _FUN_type for successful case.
1165 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1166 (variant::variant(_Tp&&)): Likewise.
1167 (variant::operator=(_Tp&&)): Likewise.
1169 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1170 Replace raw visitation with a runtime check for the valueless state
1171 and a non-raw visitor.
1172 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1173 (variant::index()): Remove branch.
1174 (variant::swap(variant&)): Use valueless_by_exception() instead of
1175 comparing the index to variant_npos, and add likelihood attribute.
1177 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1178 (_Hashtable_base::_Equal_hash_code): Define new class template.
1179 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1182 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1183 Replace with _M_get non-static member function.
1184 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1186 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1187 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1189 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1190 _S_get accessors for members in EBO helpers.
1191 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1192 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1194 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1196 (_Hashtable_base::_M_eq()): Remove non-const overload.
1198 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1200 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1202 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1204 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1207 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1209 * config/os/solaris/solaris2.10: Move to ...
1210 * config/os/solaris: ... this.
1211 * configure.host (os_include_dir): Adapt.
1212 (abi_baseline_pair): Remove Solaris 10 handling.
1213 * config/abi/post/i386-solaris2.10: Remove.
1214 * config/abi/post/sparc-solaris2.10: Remove.
1215 * config/abi/post/i386-solaris2.11: Rename to ...
1216 * config/abi/post/i386-solaris: ... this.
1217 * config/abi/post/sparc-solaris2.11: Rename to ...
1218 * config/abi/post/sparc-solaris: ... this.
1220 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1223 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1226 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1228 * include/std/variant (__visit_with_index): Remove typedef.
1229 (__deduce_visit_result): New tag type.
1230 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1231 visitation of possibly-valueless variants, forwarding to __do_visit
1232 with the relevant tag type.
1233 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1234 and make lambda return void.
1235 (__variant_construct): Likewise.
1236 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1237 __raw_idx_visit and make lambda return void.
1238 (_Multi_array::__untag_result): Add metafunction to check the function
1239 pointer type for a tag type that dictates the kind of visitation.
1240 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1241 Use decltype(auto) instead of tagged function pointer type.
1242 (__gen_vtable_impl): Remove bool non-type parameter and unused
1243 _Variant_tuple parameter.
1244 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1245 (__gen_vtable_impl::__do_visit_invoke): Remove.
1246 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1247 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1248 for the visit<R> case, rather than dispatching to separate functions.
1249 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1251 (variant::swap): Likewise.
1252 (__do_visit): Replace two non-type template parameters with a single
1253 type parameter, so that the caller must specify the visitor's return
1254 type (or one of the tag types).
1255 (visit): Deduce a return type from the visitor and use the
1256 __deduce_visit_result tag to enforce that all overloads return the
1258 (visit<R>): Call __do_visit<R> with explicit result type.
1259 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1262 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1264 nonesuch is insufficiently useless (lwg2996)
1265 * include/std/type_traits (struct __nonesuch): Added private base
1266 class to make __nonesuch not an aggregate and removed deleted default
1268 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1269 (operator=(const pair&)): Use __nonesuch instead of
1270 __nonesuch_no_braces.
1271 (operator=(pair&&)): Likewise
1272 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1273 of __nonesuch_no_braces.
1274 (operator=(tuple&&)): Likewise
1275 * include/experimental/type_traits (struct nonesuch): Added private
1276 base class to make nonesuch not an aggregate and removed deleted
1277 default constructor.
1278 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1279 * testsuite/experimental/type_traits/nonesuch.cc: New.
1281 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1283 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1284 (_Function_handler): Remove partial specializations for void return
1285 types and pointers to member.
1286 (_Function_handler::_M_manager): Adapt to removal of
1287 _Simple_type_wrapper.
1288 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1289 * include/std/functional (_Bind_result::__enable_if_void)
1290 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1291 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1293 * include/std/future (__future_base::_Task_state::_M_run)
1294 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1295 change return type of lambda expressions.
1297 * include/bits/invoke.h (__invoke_r): Define new function implementing
1298 the INVOKE<R> pseudo-function.
1299 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1300 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1302 * include/std/type_traits (__is_nt_convertible_helper): Define it
1303 unconditionally, not only for C++20.
1304 (__is_nothrow_convertible): Define internal trait for use in C++11.
1305 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1306 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1307 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1308 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1309 that has nothrow explicit conversion but potentially-throwing implicit
1311 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1312 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1313 function to only consider implicit conversions.
1314 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1316 * include/std/iterator: Include <iosfwd> instead of <istream> and
1319 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1320 Remove unused, non-standard function.
1322 * include/bits/regex.h (match_results::max_size()): Adjust return
1323 value to account for prefix/suffix/unmatched subs.
1324 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1325 reset the contained sub matches.
1326 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1327 function to set result state following a failed match.
1328 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1329 sub_match states after _M_resize. Use _M_establish_failed_match.
1332 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1333 Replace single _Callable parameter with variadic _Args pack, to
1334 forward them directly to the tuple of decayed copies.
1335 * testsuite/30_threads/thread/cons/69724.cc: New test.
1337 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1339 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1340 * include/bits/basic_string.h: (operator=(const basic_string&):
1341 Move allocator decision to assign.
1342 (assign(const basic_string&)): Move allocator decision here.
1343 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1345 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1348 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1350 * testsuite/util/testsuite_allocator.h (memory_resource)
1351 (default_resource_mgr): Fix indentation.
1353 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1354 Use operator-> to access raw pointer member.
1355 * testsuite/23_containers/vector/59829.cc: Likewise.
1356 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1357 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1358 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1360 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1361 its constructors and equality operators. Change converting
1362 constructors to use operator-> to access private member of the other
1364 (PointerBase_void::operator->()): Add, for access to private member.
1365 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1366 (operator==(PointerBase, PointerBase)): Remove.
1367 (operator!=(PointerBase, PointerBase)): Remove.
1369 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1370 not assume field called _M_head_impl is the first tuple element.
1371 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1372 implementation more accurate.
1373 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1374 empty pointer type and non-empty deleter.
1376 LWG 2899 - Make is_move_constructible correct for unique_ptr
1377 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1378 move assignment operator.
1379 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1380 (__uniq_ptr_data): New class template with conditionally deleted
1382 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1383 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1384 constructor and move assignment operator as defaulted.
1385 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1386 __uniq_ptr_impl::release().
1387 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1388 to __uniq_ptr_impl::reset(pointer).
1389 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1390 Check for new __uniq_ptr_data type.
1391 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1393 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1395 PR libstdc++/90454.cc path construction from void*
1396 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1397 pointers to void are rejected as well as void.
1398 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1399 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1401 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1403 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1404 <remark> elements. Fix formatting of bibliography references.
1406 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1408 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1410 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1412 Remove Profile Mode, deprecated since 7.1.0
1413 * doc/Makefile.am: Remove XML file for profile mode docs.
1414 * doc/Makefile.in: Regenerate.
1415 * doc/xml/authors.xml: Remove authors of profile mode docs.
1416 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1418 * doc/xml/manual/debug.xml: Likewise.
1419 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1420 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1421 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1422 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1424 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1426 * doc/html/*: Regenerate.
1427 * include/Makefile.am: Remove profile mode headers.
1428 * include/Makefile.in: Regenerate.
1429 * include/bits/c++config (std::__profile): Remove namespace.
1430 [_GLIBCXX_PROFILE]: Remove checks for macro.
1431 * include/profile/array: Remove.
1432 * include/profile/base.h: Remove.
1433 * include/profile/bitset: Remove.
1434 * include/profile/deque: Remove.
1435 * include/profile/forward_list: Remove.
1436 * include/profile/impl/profiler.h: Remove.
1437 * include/profile/impl/profiler_algos.h: Remove.
1438 * include/profile/impl/profiler_container_size.h: Remove.
1439 * include/profile/impl/profiler_hash_func.h: Remove.
1440 * include/profile/impl/profiler_hashtable_size.h: Remove.
1441 * include/profile/impl/profiler_list_to_slist.h: Remove.
1442 * include/profile/impl/profiler_list_to_vector.h: Remove.
1443 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1444 * include/profile/impl/profiler_node.h: Remove.
1445 * include/profile/impl/profiler_state.h: Remove.
1446 * include/profile/impl/profiler_trace.h: Remove.
1447 * include/profile/impl/profiler_vector_size.h: Remove.
1448 * include/profile/impl/profiler_vector_to_list.h: Remove.
1449 * include/profile/iterator_tracker.h: Remove.
1450 * include/profile/list: Remove.
1451 * include/profile/map: Remove.
1452 * include/profile/map.h: Remove.
1453 * include/profile/multimap.h: Remove.
1454 * include/profile/multiset.h: Remove.
1455 * include/profile/ordered_base.h: Remove.
1456 * include/profile/set: Remove.
1457 * include/profile/set.h: Remove.
1458 * include/profile/unordered_base.h: Remove.
1459 * include/profile/unordered_map: Remove.
1460 * include/profile/unordered_set: Remove.
1461 * include/profile/vector: Remove.
1462 * scripts/run_doxygen: Do not process profile mode headers.
1463 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1465 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1466 Remove dg-skip-if for profile mode.
1467 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1468 preprocessor check for profile mode.
1469 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1470 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1472 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1474 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1475 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1476 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1477 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1478 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1480 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1482 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1484 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1486 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1487 preprocessor check for profile mode.
1488 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1490 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1491 Remove dg-skip-if for profile mode.
1492 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1493 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1494 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1495 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1496 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1497 * testsuite/Makefile.am: Remove profile_flags variable and
1498 * testsuite/Makefile.am: Remove profile_flags variable and
1499 check-profile target.
1500 * testsuite/Makefile.in: Regenerate.
1501 * testsuite/ext/profile/all.cc: Remove.
1502 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1503 * testsuite/ext/profile/profiler_algos.cc: Remove.
1504 * testsuite/ext/profile/replace_new.cc: Remove.
1505 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1506 preprocessor check for profile mode.
1507 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1508 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1509 (check_v3_target_normal_mode): Do not check for profile mode macro.
1510 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1512 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1513 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1514 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1515 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1516 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1517 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1518 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1519 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1520 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1521 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1523 Remove array_allocator extension, deprecated since 4.9.0
1524 * doc/xml/manual/allocator.xml: Remove documentation for
1526 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1527 * doc/xml/manual/using.xml: Remove header from documentation.
1528 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1529 * include/Makefile.in: Regenerate.
1530 * include/ext/array_allocator.h: Remove.
1531 * include/precompiled/extc++.h: Do not include removed header.
1532 * testsuite/ext/array_allocator/1.cc: Remove.
1533 * testsuite/ext/array_allocator/2.cc: Remove.
1534 * testsuite/ext/array_allocator/26875.cc: Remove.
1535 * testsuite/ext/array_allocator/3.cc: Remove.
1536 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1537 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1538 * testsuite/ext/array_allocator/check_new.cc: Remove.
1539 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1540 * testsuite/ext/headers.cc: Do not include removed header.
1542 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1544 * include/bits/stl_bvector.h
1545 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1547 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1549 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1551 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1553 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1555 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1557 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1559 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1561 (_Bit_iterator::operator-(difference_type)): Likewise.
1562 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1563 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1565 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1566 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1568 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1571 * testsuite/util/thread/all.h: Do not use remove_pointer for
1572 std::thread::native_handle_type.
1575 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1576 (_Variant_storage<true, Types...>::_M_reset()))
1577 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1578 (__get_storage): Likewise.
1579 (variant): Add noexcept to friend declarations for __get and
1583 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1584 Use _Require for constraints.
1585 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1587 (__uniq_ptr_hash): New base class with conditionally-disabled call
1589 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1590 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1591 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1593 * include/bits/shared_ptr.h: Improve docs.
1594 * include/bits/shared_ptr_base.h: Likewise.
1595 * include/bits/stl_uninitialized.h: Likewise.
1596 * include/bits/unique_ptr.h: Likewise.
1597 * libsupc++/new: Likewise.
1599 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1601 * include/bits/stl_deque.h
1602 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1604 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1606 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1608 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1610 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1612 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1614 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1616 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1618 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1621 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1622 (test01): Reserve for number of insertions to avoid rehash during test.
1623 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1625 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1630 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1632 * include/experimental/bits/fs_path.h: Improve docs.
1633 * include/experimental/bits/net.h: Fix wrong header name in comment.
1634 Do not document implementation details.
1635 * include/experimental/netfwd: Fix doxygen grouping.
1637 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1639 * include/bits/stl_pair.h: Improve docs.
1640 * include/std/tuple: Likewise.
1642 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1644 * include/std/chrono: Improve docs.
1645 * include/std/ratio: Do not document implementation details.
1646 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1648 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1651 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1652 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1653 (__duration_common_type): New helper.
1654 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1655 __duration_common_type.
1656 (__timepoint_common_type_wrapper): Replace with ...
1657 (__timepoint_common_type): New helper.
1658 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1659 Use __time_point_common_type.
1660 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1661 (__common_type_impl): If either argument is transformed by decay,
1662 use the common_type of the decayed types.
1663 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1664 decayed, use __do_common_type_impl to get the common_type.
1665 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1666 (__do_member_type_wrapper, __member_type_wrapper)
1667 (__expanded_common_type_wrapper): Remove.
1668 (__common_type_pack, __common_type_fold): New helpers.
1669 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1670 __member_type_wrapper and __expanded_common_type_wrapper.
1671 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1672 Test zero-length template argument list.
1673 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1674 Test single argument cases and argument types that should decay.
1675 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1676 Adjust expected error.
1677 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1679 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1680 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1681 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1683 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1685 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1687 Make allocator propagation more consistent for
1688 operator+(basic_string) (P1165R1)
1689 * include/bits/basic_string.h
1690 (operator+(basic_string&&, basic_string&&): Changed resulting
1691 allocator to always be the one from the first parameter.
1692 * include/bits/basic_string.tcc
1693 (operator+(const _CharT*, const basic_string&)): Changed
1694 resulting allocator to be SOCCC on the second parameter's allocator.
1695 (operator+(_CharT, const basic_string&)): Likewise.
1696 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1698 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1701 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1703 * include/bits/regex.h: Improve docs.
1704 * include/bits/regex.tcc: Do not document implementation details.
1706 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1708 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1710 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1711 Add type printer for container types in std::__debug namespace.
1712 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1713 (gdb-tests): Use distinct parameters for the type of test and use of
1715 (gdb-test): Check for regex test even if 'whatis' test.
1716 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1718 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1719 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1720 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1721 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1722 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1723 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1724 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1726 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1728 * include/std/system_error (error_category): Fix comment.
1731 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1732 argument is an empty path.
1733 (absolute(const path&, error_code&)): Use invalid_argument as error
1734 code instead of no_such_file_or_directory.
1735 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1736 of non-existent paths and empty paths with both overloads of absolute.
1738 * include/std/system_error (error_category, error_code)
1739 (error_condition): Improve docs.
1740 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1741 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1742 to class documentation. Suppress documentation for implementation
1744 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1745 Suppress documentation for implementation details.
1747 * include/std/system_error (error_code): Remove friend declaration
1748 for hash<error_code>.
1749 (hash<error_code>::operator()): Use public member functions to access
1751 (hash<error_condition>::operator()): Use address of category, not
1752 its object representation.
1753 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1754 Use public member functions to access value and category.
1755 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1757 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1759 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1760 * include/bits/hashtable_policy.h
1761 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1762 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1763 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1764 smaller than input value rather than always greater. Preserve
1765 _M_next_resize if called with 0 input. Use __builtin_floorl.
1766 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1767 elements + number of insertions is greater than _M_next_resize. Start
1768 with 11 buckets if not told otherwise. Use __builtin_floorl.
1769 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1770 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1771 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1772 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1773 told otherwise. Use __builtin_floorl.
1774 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1775 to also validate _Power2_rehash_policy.
1776 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1779 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1782 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1786 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1787 overflow warning with -Wpedantic -Wsystem-headers.
1789 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1792 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1793 * include/bits/move.h (swap): Remove extra parentheses.
1795 * include/experimental/bits/lfts_config.h: Improve doc markup.
1796 * include/experimental/optional: Improve docs.
1797 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1798 (__constexpr_addressof): Remove.
1799 (optional::operator->()): Use std::__addressof().
1800 * include/std/optional (optional::operator->()): Adjust whitespace.
1801 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1802 that operator-> is still constexpr with overloaded operator&. Change
1803 to compile-only test.
1804 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1807 * include/bits/shared_ptr.h: Improve docs.
1808 * include/bits/shared_ptr_atomic.h: Likewise.
1809 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1811 * include/bits/basic_string.h: Fix iterator/index confusion in
1813 * include/bits/range_access.h: Fix Doxygen warnings.
1814 * include/bits/refwrap.h: Do not document implementation details.
1815 (ref, cref): Group docs with reference_wrapper.
1816 * include/std/fstream: Fix Doxygen markup.
1817 * libsupc++/initializer_list (begin, end): Group docs with
1820 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1822 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1823 * include/std/mutex: Likewise.
1824 * include/std/shared_mutex: Likewise.
1826 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1827 * include/bits/fs_fwd.h: Likewise.
1828 * include/bits/fs_ops.h: Likewise.
1829 * include/bits/fs_path.h: Likewise.
1830 * include/std/filesystem: Likewise.
1832 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1833 * include/experimental/buffer: Likewise.
1834 * include/experimental/executor: Likewise.
1835 * include/experimental/internet: Likewise.
1836 * include/experimental/io_context: Likewise.
1837 * include/experimental/net: Likewise.
1838 * include/experimental/netfwd: Likewise.
1839 * include/experimental/socket: Likewise.
1840 * include/experimental/timer: Likewise.
1842 * doc/doxygen/doxygroups.cc: Move description of experimental group
1844 * include/experimental/algorithm: Add to libfund-ts doc group.
1845 * include/experimental/any: Likewise. Do not document implementation
1847 * include/experimental/array: Add to libfund-ts doc group.
1848 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1849 for Library Fundamentals.
1850 * include/experimental/chrono: Add to libfund-ts doc group.
1851 * include/experimental/deque: Likewise.
1852 * include/experimental/forward_list: Likewise.
1853 * include/experimental/functional: Likewise.
1854 * include/experimental/iterator: Likewise.
1855 * include/experimental/list: Likewise.
1856 * include/experimental/map: Likewise.
1857 * include/experimental/memory: Likewise.
1858 * include/experimental/memory_resource: Likewise. Improve docs.
1860 * include/experimental/numeric: Add to libfund-ts doc group.
1861 * include/experimental/optional: Likewise.
1862 * include/experimental/propagate_const: Likewise.
1863 * include/experimental/random: Likewise.
1864 * include/experimental/ratio: Likewise.
1865 * include/experimental/regex: Likewise.
1866 * include/experimental/set: Likewise.
1867 * include/experimental/source_location: Likewise.
1868 * include/experimental/string: Likewise.
1869 * include/experimental/string_view: Likewise.
1870 * include/experimental/system_error: Likewise.
1871 * include/experimental/tuple: Likewise.
1872 * include/experimental/type_traits: Likewise.
1873 * include/experimental/unordered_map: Likewise.
1874 * include/experimental/unordered_set: Likewise.
1875 * include/experimental/utility: Likewise.
1876 * include/experimental/vector: Likewise.
1877 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1878 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1879 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1881 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1882 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1883 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1884 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1885 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1887 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1888 * include/experimental/bits/fs_fwd.h: Improve docs.
1889 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1890 * include/experimental/bits/fs_path.h: Likewise.
1891 (path, filesystem_error, u8path): Improve docs.
1892 * include/experimental/filesystem: Link to docs for TS.
1894 * config/allocator/new_allocator_base.h (__allocator_base): Add
1895 workaround for Doxygen bug #6945.
1896 * include/std/memory: Improve docs. Define group for pointer safety.
1897 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1898 conditional to suppress documentation for implementation details.
1900 * include/bits/specfun.h: Improve docs.
1901 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1904 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1905 (std::experimental): Add docs.
1906 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1907 namespace to nothing when generating docs.
1908 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1909 * include/std/chrono (std::chrono): Likewise.
1910 * include/std/functional (std::placeholders): Likewise.
1911 * include/std/thread (std::this_thread): Likewise.
1913 * include/parallel/settings.h: Fix Doxygen markup.
1915 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1916 anything unless PB_DS_CLASS_C_DEC is defined.
1917 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1918 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1919 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1920 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1921 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1922 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1923 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1925 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1926 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1927 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1928 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1929 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1930 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1931 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1932 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1933 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1934 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1935 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1937 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1938 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1940 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1943 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1944 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1945 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1948 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1950 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1951 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1952 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1953 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1954 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1955 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1957 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1958 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1961 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1964 * include/std/complex (__complex_proj): Return parameter unchanged.
1965 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1966 floating-point types to take std::complex arguments.
1967 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1968 floating-point types.
1969 * testsuite/26_numerics/complex/proj.cc: New test.
1971 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1973 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1974 to _Lock_policyE[012].
1975 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1977 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1979 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1980 macros accidentally left in.
1981 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1982 unnecessary -lstdc++fs option. Fix test for mingw.
1983 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1986 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1988 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1990 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1992 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1994 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1995 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1998 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2000 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2003 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2004 class template and partial specialization.
2007 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2009 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2010 functions to convert a value to an integral type.
2011 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2012 (fill_n): Convert _Size parameter to an integral type.
2013 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2014 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2015 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2016 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2017 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2018 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2020 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2022 Adding noexcept-specification on tuple constructors (LWG 2899)
2023 * libstdc++-v3/include/std/tuple:
2024 (tuple()): Add noexcept-specification.
2025 (tuple(const _Elements&...)): Likewise
2026 (tuple(_UElements&&...)): Likewise
2027 (tuple(const tuple<_UElements...>&)): Likewise
2028 (tuple(tuple<_UElements...>&&)): Likewise
2029 (tuple(const _T1&, const _T2&)): Likewise
2030 (tuple(_U1&&, _U2&&)): Likewise
2031 (tuple(const tuple<_U1, _U2>&): Likewise
2032 (tuple(tuple<_U1, _U2>&&): Likewise
2033 (tuple(const pair<_U1, _U2>&): Likewise
2034 (tuple(pair<_U1, _U2>&&): Likewise
2035 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2037 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2040 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2041 arguments with __restrict.
2043 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2045 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2047 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2049 * include/experimental/bits/fs_path.h
2050 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2051 avoid redundant call to _S_convert_loc with non-const pointers.
2053 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2054 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2055 * testsuite/21_strings/basic_string/hash/hash.cc
2056 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2057 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2058 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2060 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2061 wstring::_M_replace_dispatch with more specific patterns.
2062 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2063 Create const std::string to avoid redundant call to _S_convert_loc
2064 with non-const pointers.
2065 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2066 avoid unnecessary basic_string::assign instantiations.
2068 * include/std/memory (__uses_alloc_args): Add string-literal to
2069 static_assert, to match the one in __uses_alloc.
2070 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2071 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2072 for recursive uses-allocator construction of nested pairs.
2073 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2076 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2078 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2079 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2080 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2081 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2083 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2084 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2085 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2086 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2087 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2088 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2089 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2091 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2094 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2095 * include/std/scoped_allocator [__cplusplus > 201703L]
2096 (scoped_allocator_adaptor::construct): Define in terms of
2097 uses_allocator_construction_args, as per P0591R4.
2098 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2099 * testsuite/util/testsuite_allocator.h: Remove name of unused
2102 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2104 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2105 * doc/html/*: Regenerate.
2107 * include/bits/fs_path.h (operator<, operator<=, operator>)
2108 (operator>=, operator==, operator!=): Make hidden friends, as per
2110 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2111 string type in test.
2112 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2114 * include/std/any (any::any(ValueType&&)): Use __and_v.
2115 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2118 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2120 * include/std/type_traits (__result_of_memfun): Use remove_reference
2121 instead of __remove_cvref_t and remove redundant is_same check.
2122 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2124 * include/experimental/string_view (basic_string_view::pointer)
2125 (basic_string_view::reference): Fix to refer to non-const value_type.
2126 * include/bits/basic_string.h (basic_string): Use __sv_check and
2127 __sv_limit instead of basic_string_view::_M_check and
2128 basic_string_view::_M_limit.
2129 * include/std/string_view (__sv_check, __sv_limit): New
2130 helper functions to replace basic_string_view::_M_check and
2131 basic_string_view::_M_limit.
2132 (basic_string_view): Add static assertions to enforce ill-formed
2133 requirement for traits_type::char_type from P1148R0, and to enforce
2134 required properties of char-like types.
2135 (basic_string_view::pointer, basic_string_view::reference): Fix to
2136 refer to non-const value_type.
2137 (basic_string_view::operator[], basic_string_view::at)
2138 (basic_string_view::front, basic_string_view::back)
2139 (basic_string_view::data): Use const_reference and const_pointer
2140 typedefs for return types.
2141 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2142 (hash<wstring_view>): Fix argument_type typedef.
2143 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2144 char/1.cc: Fix expected return type of basic_string_view::data().
2145 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2146 wchar_t/1.cc: Likewise.
2147 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2148 char/1.cc: Likewise.
2149 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2150 wchar_t/1.cc: Likewise.
2151 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2153 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2154 Check reference and pointer typedefs.
2155 * testsuite/experimental/string_view/requirements/typedefs.cc:
2157 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2158 Fix expected return type of basic_string_view::data().
2159 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2161 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2163 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2167 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2168 Avoid a runtime check for types that can never be stored in std::any.
2169 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2172 PR libstdc++/90220 (partial)
2173 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2174 not attempt ill-formed static_cast to pointers to non-object types.
2175 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2178 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2179 prevent -Wcatch-value warning.
2181 * include/std/variant (__variant_construct): Use template parameter
2182 type instead of equivalent decltype-specifier.
2183 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2184 Replace forward with move.
2185 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2186 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2187 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2188 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2189 index after construction succeeds.
2190 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2191 if-constexpr checks that are always true. Use __remove_cvref_t instead
2192 of remove_reference so that is_nothrow_move_constructible check
2193 doesn't use a const rvalue parameter. In the potentially-throwing case
2194 construct a temporary and move assign it, as per LWG 2904.
2195 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2196 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2197 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2198 construct a temporary and move assign from it, as per LWG 2904.
2199 * testsuite/20_util/variant/exception_safety.cc: Check that
2200 assignment operators have strong exception safety guarantee.
2202 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2204 Document PSTL linker flags
2206 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2208 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2210 * include/std/variant (__detail::__variant::_Traits): Make
2211 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2212 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2214 (__detail::__variant::_Copy_assign_alias): Only depend on
2215 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2216 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2217 move assignment operators.
2220 * include/std/variant (variant::__not_self): New helper for the
2221 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2222 (variant::__to_type_impl): Remove.
2223 (variant::__to_type): Add default argument to check pack size, instead
2224 of using __to_type_impl.
2225 (variant::__accepted_type): Add default argument using __not_self.
2226 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2227 for variant(T&&) constructor constraint.
2228 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2229 Extract __accepted_type into a named template parameter for reuse in
2230 other constraints and in the exception specification.
2231 (variant::variant(in_place_type_t<T>, Args&&...))
2232 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2233 (variant::variant(in_place_index_t<T>, Args&&...))
2234 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2235 (variant::operator=T&&)): Remove redundant && from trait arguments.
2236 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2237 isn't used for in_place_type or in_place_index arguments.
2239 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2240 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2241 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2243 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2244 Bernd Edlinger <bernd.edlinger@hotmail.de>
2245 Jakub Jelinek <jakub@redhat.com>
2248 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2249 general-regs-only target attribute for ARM.
2251 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2254 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2255 specialization also depend on is_nothrow_move_constructible.
2256 * include/std/variant (__detail::__variant::__never_valueless()):
2257 Only true if the variant would have a move assignment operator.
2258 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2259 Check __never_valueless<T...>().
2260 (variant::emplace): Only perform non-throwing move assignments
2261 for never-valueless alternatives if the variant has a move assignment
2263 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2264 types can be emplaced into non-assignable variants.
2265 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2266 don't get copied when emplaced into non-assignable variants.
2268 * include/std/variant (__detail::__variant::__ref_cast): Remove
2270 (__detail::__variant::_Uninitialized::_M_get)
2271 (__detail::__variant::__get)
2272 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2274 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2276 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2278 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2279 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2280 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2281 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2283 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2285 Delegate PSTL configuration to pstl/pstl_config.h
2287 * include/bits/c++config: Remove explicit PSTL configuration
2288 macros and use definitions from <pstl/pstl_config.h>.
2290 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2292 Cleanup algorithm implementations
2293 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2295 (mismatch): Forward execution policy.
2296 (equal): Qualify call to std::equal().
2297 (partial_sort): Forward execution policy.
2298 (inplace_merge): Forward execution policy.
2300 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2302 Improve implementation of parallel equal()
2303 * include/pstl/algorithm_impl.h
2304 (__internal::__brick_equal): use "4 iterator" version of
2306 (__internal::__brick_equal): use simd for random access
2307 iterators on unsequenced execution policies.
2308 (__internal::__pattern_equal): add "4 iterator" version
2309 (__internal::__pattern_equal): dispatch to simd __brick_equal
2310 for vector-only execution policies.
2311 (__internal::__pattern_equal): dispatch to __parallel_or for
2312 parallel execution policies.
2313 * include/pstl/glue_algorithm_impl.h
2314 (std::equal): dispatch to "4 iterator" version of
2315 __internal::__pattern_equal().
2317 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2320 * include/bits/forward_list.h (operator==): Do not use operator!= to
2322 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2323 earlier in the list, so that sort is stable.
2324 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2325 * testsuite/23_containers/forward_list/comparable.cc: Test with
2326 types that meet the minimum EqualityComparable and LessThanComparable
2327 requirements. Remove irrelevant comment.
2329 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2330 Do not depend on whether all alternative types are move constructible.
2331 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2332 from the operand when deciding whether to perform the assignment.
2333 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2334 with deleted move constructor and deleted move assignment operator.
2335 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2336 behaviour of variants with DeletedMoves as an alternative.
2337 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2338 (move_ctor, move_assign): Check that moving a variant with a
2339 DeletedMoves alternative falls back to copying instead of moving.
2341 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2342 from static_assert declarations.
2344 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2345 actually match its name.
2346 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2347 (test_swap()): Fix result for MoveCtorOnly and check
2348 MoveCtorAndSwapOnly.
2350 * include/std/optional (optional::value_or(U&&) &&): Add missing
2351 constexpr specifier.
2352 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2353 for disengaged optionals and rvalue optionals.
2354 * testsuite/20_util/optional/observers/4.cc: Likewise.
2356 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2358 * include/pstl/algorithm_impl.h: Uglify identfiers.
2359 * include/pstl/numeric_impl.h: Uglify identfiers.
2360 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2362 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2364 * include/bits/c++config:
2365 Add definition for __PSTL_ASSERT.
2366 Add definition for __PSTL_ASSERT_MSG.
2367 * include/pstl/algorithm_impl.h: Replace use of assert().
2368 * include/pstl/numeric_impl.h: Replace use of assert().
2369 * include/pstl/parallel_backend_tbb.h:
2370 Replace use of assert().
2371 Replace use of __TBB_ASSERT().
2372 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2374 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2377 * src/c++17/memory_resource.cc
2378 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2379 needed to allow placing a _Chunk at the end of the buffer.
2380 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2382 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2384 * doc/xml/faq.xml: Add information about emergency EH pool.
2385 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2386 Move outdated information on mt_allocator to a separate section.
2387 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2388 doesn't affect the default allocator.
2390 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2394 * testsuite/20_util/variant/89851.cc: New test.
2396 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2398 * include/std/variant: Adjust whitespace. Add comments.
2399 (_Multi_array): Leave primary template undefined.
2400 (_Multi_array<_Tp>): Define partial specialization for base case of
2402 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2403 which is always a reference.
2404 (__gen_vtable::_S_apply()): Remove function, inline body into
2405 default member initializer.
2406 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2408 * include/std/variant (__variant_idx_cookie): Add member type.
2409 (__visitor_result_type): Remove.
2410 (__do_visit): Use invoke_result instead of __visitor_result_type.
2411 * testsuite/20_util/variant/visit.cc: New test.
2414 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2416 * testsuite/20_util/variant/90008.cc: New test.
2418 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2420 * include/pstl/algorithm_impl.h: Add namespace qualification.
2421 * include/pstl/execution_defs.h: Add namespace qualification.
2422 * include/pstl/execution_impl.h: Add namespace qualification.
2423 * include/pstl/numeric_impl.h: Add namespace qualification.
2424 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2425 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2426 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2428 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2430 Fix visit<R> for variant.
2431 * include/std/variant (__do_visit): Add a template parameter
2432 for enforcing same return types for visit.
2433 (__gen_vtable_impl): Likewise.
2434 (_S_apply_single_alt): Adjust.
2435 (__visit_invoke_impl): New. Handle casting to void.
2436 (__do_visit_invoke): New. Enforces same return types.
2437 (__do_visit_invoke_r): New. Converts return types.
2438 (__visit_invoke): Adjust.
2439 (__gen_vtable): Add a template parameter for enforcing
2440 same return types for visit.
2441 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2442 different return types.
2443 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2444 visitors with different return types don't accidentally
2445 compile with regular visitation.
2447 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2449 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2450 dg-require-filesystem-ts.
2452 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2454 * doc/xml/manual/status_cxx2020.xml: Update status.
2455 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2456 * testsuite/20_util/variant/visit_r.cc: New test.
2458 * include/bits/fs_dir.h (directory_iterator::operator*)
2459 (directory_iterator::operator->): Add noexcept.
2460 (operator==, operator!=): Replace namespace-scope equality operators
2461 for directory iterators with hidden friends.
2464 * config/abi/pre/gnu.ver: Add missing exports.
2465 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2468 * config/abi/pre/gnu.ver: Export new symbols.
2469 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2470 (recursive_directory_iterator::recursion_pending())
2471 (recursive_directory_iterator::disable_recursion_pending()): Remove
2472 inline definitions. Make noexcept.
2473 (recursive_directory_iterator::depth())
2474 (recursive_directory_iterator::operator*())
2475 (recursive_directory_iterator::operator->()): Make noexcept.
2476 (recursive_directory_iterator::_M_options)
2477 (recursive_directory_iterator::_M_pending): Remove data members.
2478 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2479 (recursive_directory_iterator::recursive_directory_iterator): Remove
2480 ctor-initializer. Use new constructor for _Dir_stack.
2481 (recursive_directory_iterator::options())
2482 (recursive_directory_iterator::recursion_pending())
2483 (recursive_directory_iterator::disable_recursion_pending()): Add
2484 non-inline definitions.
2485 (recursive_directory_iterator::depth()): Make noexcept.
2486 (recursive_directory_iterator::increment(error_code&))
2487 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2488 location of options and recursion_pending members.
2489 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2490 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2491 user-declared move constructor and assignment operator, to make the
2494 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2495 d_type == DT_UNKNOWN immediately.
2496 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2498 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2500 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2502 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2503 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2506 PR libstdc++/87431 (again)
2507 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2508 Define partial specialization for basic_string.
2509 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2510 shared_ptr and weak_ptr.
2511 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2513 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2515 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2517 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2519 * include/std/any (_Never_valueless_alt): Define explicit
2520 specialization for any.
2521 * include/std/variant (_Never_valueless_alt): Define primary template.
2522 (__never_valueless): Use _Never_valueless_alt instead of
2523 is_trivially_copyable.
2524 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2525 initializations to avoid try-catch overhead. Add special case for
2526 scalars produced by potentially-throwing conversions. Use
2527 _Never_valueless_alt instead of is_trivially_copyable for the
2528 remaining strong exception-safety cases.
2529 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2530 * testsuite/20_util/variant/87431.cc: Run both test functions.
2531 * testsuite/20_util/variant/exception_safety.cc: New test.
2532 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2533 so the variant becomes valueless.
2535 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2538 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2540 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2542 * include/std/string (__hash_string_base): New class template defining
2543 operator() for hashing strings.
2544 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2545 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2546 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2547 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2549 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2551 Use single-visitation in variant assignment and swap and relops.
2552 Also use indices instead of types when checking whether
2553 variants hold the same thing.
2554 * include/std/variant (__do_visit): Add a template parameter
2555 for index visitation, invoke with indices if index visitation
2557 (__variant_idx_cookie): New.
2558 (__visit_with_index): Likewise.
2559 (_Copy_assign_base::operator=): Do single-visitation with
2561 (_Move_assign_base::operator=): Likewise.
2562 (_Extra_visit_slot_needed): Adjust.
2563 (__visit_invoke): Call with indices if it's an index visitor.
2564 (relops): Do single-visitation with an index visitor.
2566 (__visitor_result_type): New.
2568 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2570 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2572 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2574 Don't revisit a variant we are already visiting.
2575 * include/std/variant (__variant_construct_single): New.
2576 (__variant_construct): Use it.
2577 (_M_destructive_move): Likewise.
2578 (_M_destructive_copy): Likewise.
2579 (_Copy_assign_base::operator=): Adjust.
2580 (_Move_assign_base::operator=): Likewise.
2583 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2586 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2587 destructor so they are not evaluated until the _Key type is complete.
2588 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2589 * testsuite/23_containers/set/85965.cc: New test.
2590 * testsuite/23_containers/unordered_set/85965.cc: New test.
2591 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2592 with regexp matching the corresponding _Rb_tree specialization.
2593 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2594 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2595 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2596 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2597 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2598 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2599 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2601 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2604 Fix based on a suggestion by Antony Polukhin.
2605 * include/std/variant (__never_valueless): New.
2607 (_Extra_visit_slot_needed): New.
2608 (_Multi_array): Use it.
2609 (_S_apply_all_alts): Likewise.
2611 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2614 Fix based on a suggestion by Antony Polukhin.
2615 * include/std/variant (__gen_vtable): Don't reserve an
2616 additional table slot, _Multi_array already does that.
2618 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2621 Fix based on a suggestion by Antony Polukhin.
2622 * include/std/variant (__variant_construct): Capture a pointer
2623 to the storage and visit just one variant.
2625 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2627 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2628 Doxygen-generated pages with unstable URL.
2629 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2630 * doc/xml/manual/extensions.xml: Likewise.
2631 * doc/xml/manual/parallel_mode.xml: Likewise.
2632 * doc/xml/manual/support.xml: Likewise.
2634 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2635 avoid -Wconversion warnings.
2637 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2639 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2640 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2641 (allstamped): Add stamp-pstl.
2642 (install-headers): Add ptsl_builddir.
2643 * include/Makefile.in: Regenerate.
2644 * include/bits/c++config: Add pstl configuration.
2645 * include/pstl/LICENSE.txt: New file.
2646 * include/pstl/algorithm_fwd.h: New file.
2647 * include/pstl/algorithm_impl.h: New file.
2648 * include/pstl/execution_defs.h: New file.
2649 * include/pstl/execution_impl.h: New file.
2650 * include/pstl/glue_algorithm_defs.h: New file.
2651 * include/pstl/glue_algorithm_impl.h: New file.
2652 * include/pstl/glue_execution_defs.h: New file.
2653 * include/pstl/glue_memory_defs.h: New file.
2654 * include/pstl/glue_memory_impl.h: New file.
2655 * include/pstl/glue_numeric_defs.h: New file.
2656 * include/pstl/glue_numeric_impl.h: New file.
2657 * include/pstl/memory_impl.h: New file.
2658 * include/pstl/numeric_fwd.h: New file.
2659 * include/pstl/numeric_impl.h: New file.
2660 * include/pstl/parallel_backend.h: New file.
2661 * include/pstl/parallel_backend_tbb.h: New file.
2662 * include/pstl/parallel_backend_utils.h: New file.
2663 * include/pstl/parallel_impl.h: New file.
2664 * include/pstl/pstl_config.h: New file.
2665 * include/pstl/unseq_backend_simd.h: New file.
2666 * include/pstl/utils.h: New file.
2667 * include/std/algorithm: Include parallel algorithm implementations.
2668 * include/std/execution: New file.
2669 * include/std/memory: Include parallel algorithm implementations.
2670 * include/std/numeric: Include parallel algorithm implementations.
2671 * include/std/version: Add parallel algorithms feature test macro.
2672 * testsuite/util/pstl/pstl_test_config.h: New file.
2673 * testsuite/util/pstl/test_utils.h: New file.
2674 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2675 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2676 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2677 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2678 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2679 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2680 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2681 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2682 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2683 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2684 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2685 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2686 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2687 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2688 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2689 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2690 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2691 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2692 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2693 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2694 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2695 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2696 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2697 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2698 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2699 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2700 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2701 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2702 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2703 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2704 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2705 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2706 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2707 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2708 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2709 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2710 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2711 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2712 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2713 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2714 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2715 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2716 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2717 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2718 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2719 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2720 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2721 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2722 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2723 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2724 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2725 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2726 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2727 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2728 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2729 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2730 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2731 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2732 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2733 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2734 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2735 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2736 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2737 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2738 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2739 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2740 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2741 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2742 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2743 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2744 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2745 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2746 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2747 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2748 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2749 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2750 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2751 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2752 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2753 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2754 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2755 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2756 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2757 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2758 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2759 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2760 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2761 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2762 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2763 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2764 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2765 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2766 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2767 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2768 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2769 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2770 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2771 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2772 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2773 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2774 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2775 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2776 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2777 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2778 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2779 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2781 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2783 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2784 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2785 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2786 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2787 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2788 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2789 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2790 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2791 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2792 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2793 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2794 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2795 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2796 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2797 when the special functions IS is enabled, not for C++17.
2798 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2800 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2801 without checks for special functions in C++17.
2802 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2806 * include/backward/hash_map: Use <> for includes not "".
2807 * include/backward/hash_set: Likewise.
2808 * include/backward/strstream: Likewise.
2809 * include/tr1/bessel_function.tcc: Likewise.
2810 * include/tr1/exp_integral.tcc: Likewise.
2811 * include/tr1/legendre_function.tcc: Likewise.
2812 * include/tr1/modified_bessel_func.tcc: Likewise.
2813 * include/tr1/riemann_zeta.tcc: Likewise.
2815 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2817 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2818 of extension allocators.
2819 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2820 Document new headers in 7.2, 8.1 and 9.1 releases.
2821 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2822 * doc/html/*: Regenerate.
2824 2019-03-12 John David Anglin <dave.anglin@bell.net>
2827 * testsuite/lib/libstdc++.exp: Locate libatomic.
2828 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2829 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2831 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2832 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2833 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2834 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2836 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2839 * configure.ac: Check for sockatmark.
2840 * crossconfig.m4: Check for sockatmark.
2841 * config.h.in: Regenerate.
2842 * configure: Regenerate.
2843 * include/experimental/internet (address_v4::_S_hton): Rename
2844 overloaded functions to _S_hton_16 and _S_ntoh_16.
2845 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2846 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2847 * include/experimental/socket (basic_socket::at_mark): Check
2848 _GLIBCXX_HAVE_SOCKATMARK.
2850 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2851 const variables instead of macros.
2854 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2855 Use correct type for len_aligned.
2856 * testsuite/20_util/hash/89629.cc: New test.
2858 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2861 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2862 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2863 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2864 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2865 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2866 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2867 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2868 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2869 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2870 memory_order_seq_cst to int.
2872 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2874 * doc/xml/manual/using.xml: Use link element instead of xref.
2875 * doc/html/*: Regenerate.
2877 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2879 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2882 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2883 parameters in deduction guides.
2884 * include/debug/multimap.h (multimap): Likewise.
2885 * include/debug/set.h (multimap): Likewise.
2886 * include/debug/multiset.h (multimap): Likewise.
2887 * include/debug/unordered_map (unordered_map): Likewise.
2888 (unordered_multimap): Likewise.
2889 * include/debug/unordered_set (unordered_set): Likewise.
2890 (unordered_multiset): Likewise.
2893 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2894 Invalidate all iterators in case of rehash.
2895 (unordered_multimap<>::_M_check_rehashed): Likewise.
2896 * include/debug/unordered_set
2897 (unordered_set<>::_M_check_rehashed): Likewise.
2898 (unordered_multiset<>::_M_check_rehashed): Likewise.
2899 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2901 2019-03-07 Andreas Schwab <schwab@suse.de>
2903 * config/abi/post/riscv64-linux-gnu: New directory.
2904 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2906 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2908 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2909 compile test to run. Fix typo.
2911 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2912 * doc/html/*: Regenerate.
2914 P0356R5 Simplified partial function application
2915 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2916 helpers for bind_front.
2917 (bind_front, __cpp_lib_bind_front): Define.
2918 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2920 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2922 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2923 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2924 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2925 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2927 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2929 PR libstdc++/86655 - std::assoc_legendre should not constrain
2930 the value of m (or x).
2931 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2932 __sph_legendre): If degree > order Don't throw, return 0.
2933 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2934 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2935 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2936 * testsuite/tr1/5_numerical_facilities/special_functions/
2937 02_assoc_legendre/pr86655.cc: New test.
2938 * testsuite/tr1/5_numerical_facilities/special_functions/
2939 22_sph_legendre/pr86655.cc: New test.
2941 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2944 Also PR libstdc++/85517
2945 * include/std/variant (__do_visit): New.
2946 (__variant_cast): Likewise.
2947 (__variant_cookie): Likewise.
2948 (__erased_*): Remove.
2949 (_Variant_storage::_S_vtable): Likewise.
2950 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2951 (_Variant_storage::__M_reset): Adjust.
2952 (__variant_construct): New.
2953 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2954 __variant_construct.
2955 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2956 (_Move_ctor_base::__M_destructive_copy): New.
2957 (_Move_ctor_base::__M_destructive_move): Adjust to use
2958 __variant_construct.
2959 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2960 (_Copy_assign_alias): Adjust to check both copy assignment
2961 and copy construction for triviality.
2962 (_Move_assign_base::operator=): Adjust to use __do_visit.
2963 (_Multi_array): Add support for visitors that accept and return
2965 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2966 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2967 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2968 a __variant_cookie temporary for a variant that is valueless and..
2969 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2970 (__gen_vtable::_Array_type): Conditionally make space for
2971 the __variant_cookie visitor case.
2972 (__variant_construct_by_index): New.
2973 (get_if): Adjust to use std::addressof.
2974 (relops): Adjust to use __do_visit.
2975 (variant): Add __variant_cast and __variant_construct_by_index
2977 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2978 instead of self-destruction.
2979 (variant::swap): Adjust to use __do_visit.
2980 (visit): Reimplement in terms of __do_visit.
2981 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2982 * testsuite/20_util/variant/compile.cc: Adjust.
2983 * testsuite/20_util/variant/run.cc: Likewise.
2985 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2987 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2989 * testsuite/experimental/feat-char8_t.cc: Likewise.
2991 * include/std/type_traits [C++20] (is_bounded_array)
2992 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2994 * testsuite/20_util/is_bounded_array/requirements/
2995 explicit_instantiation.cc: New test.
2996 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2998 * testsuite/20_util/is_bounded_array/value.cc: New test.
2999 * testsuite/20_util/is_unbounded_array/requirements/
3000 explicit_instantiation.cc: New test.
3001 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3003 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3005 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3007 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3009 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3011 * include/c_compatibility/math.h [C++20] (lerp): Add using
3013 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3014 (__lerp): Define function template to implement lerp.
3015 (lerp(float, float, float), lerp(double, double, double))
3016 (lerp(long double, long double, long double)): Define for C++20.
3017 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3018 (midpoint(T, T), midpoint(T*, T*)): Define.
3019 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3020 * testsuite/26_numerics/lerp.cc: New test.
3021 * testsuite/26_numerics/midpoint/floating.cc: New test.
3022 * testsuite/26_numerics/midpoint/integral.cc: New test.
3023 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3025 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3027 PR libstdc++/88996 Implement P0439R0
3028 Make std::memory_order a scoped enumeration.
3029 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3030 add variables for the old enumerators. Adjust calls.
3031 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3032 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3034 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3036 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3039 * include/std/memory_resource (polymorphic_allocator): Add default
3040 template argument for C++20.
3041 (polymorphic_allocator::allocate_bytes)
3042 (polymorphic_allocator::deallocate_bytes)
3043 (polymorphic_allocator::allocate_object)
3044 (polymorphic_allocator::deallocate_object)
3045 (polymorphic_allocator::new_object)
3046 (polymorphic_allocator::delete_object): New member functions for
3048 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3051 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3054 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3057 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3059 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3060 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3062 * include/std/memory (uses_allocator_construction_args): New set of
3063 overloaded functions.
3064 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3066 * include/std/memory_resource (polymorphic_allocator::construct)
3067 [__cplusplus > 201703l]: Replace all overloads with a single function
3068 using uses_allocator_construction_args.
3069 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3071 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3073 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3076 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3077 stylesheet directories before check for xsltproc. Try to use
3078 xmlcatalog to find local stylesheet directory before trying hardcoded
3079 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3080 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3081 use xsltproc if xmlcatalog fails to find a local stylesheet.
3082 * configure.ac: Check for xmlcatalog.
3083 * Makefile.in: Regenerate.
3084 * configure: Likewise.
3085 * doc/Makefile.in: Likewise.
3086 * include/Makefile.in: Likewise.
3087 * libsupc++/Makefile.in: Likewise.
3088 * po/Makefile.in: Likewise.
3089 * python/Makefile.in: Likewise.
3090 * src/Makefile.in: Likewise.
3091 * src/c++11/Makefile.in: Likewise.
3092 * src/c++17/Makefile.in: Likewise.
3093 * src/c++98/Makefile.in: Likewise.
3094 * src/filesystem/Makefile.in: Likewise.
3095 * testsuite/Makefile.in: Likewise.
3097 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3100 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3101 container deduction guides.
3102 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3103 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3104 parameters in deduction guides.
3105 * include/bits/stl_multimap.h (multimap): Likewise.
3106 * include/bits/stl_multiset.h (multiset): Likewise.
3107 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3108 * include/bits/stl_set.h (set): Likewise.
3109 * include/bits/stl_stack.h (stack): Likewise.
3110 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3111 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3112 constrain parameters in deduction guides.
3113 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3115 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3117 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3118 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3119 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3120 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3122 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3124 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3127 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3128 to class template and partial specialization using void_t.
3129 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3131 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3134 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3135 copy and move members public.
3137 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3139 * include/std/type_traits (__underlying_type_impl): New helper to
3140 make underlying_type SFINAE-friendly.
3141 (underlying_type): Derive from __underlying_type_impl.
3142 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3146 * include/bits/char_traits.h (__constant_char_array): Check index is
3147 in range before dereferencing.
3148 (char_traits<char>::compare, char_traits<char>::find)
3149 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3150 immediately if n is zero.
3151 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3152 Remove workarounds for PR 67026.
3153 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3155 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3158 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3160 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3161 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3163 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3166 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3167 type to std::size_t and argument to type to long double.
3169 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3171 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3172 * config/abi/post/sparc64-linux-gnu: New directory.
3173 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3174 * config/abi/post/sparc64-linux-gnu/32: New directory.
3175 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3177 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3179 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3180 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3183 2019-02-22 Tom Honermann <tom@honermann.net>
3185 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3186 printers for u8string and u8string_view.
3188 2019-02-22 Tom Honermann <tom@honermann.net>
3190 * testsuite/18_support/byte/ops.cc: Validate
3191 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3192 std::to_integer<char32_t>.
3193 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3194 std::numeric_limits<char8_t>.
3195 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3196 std::numeric_limits<char8_t>::lowest().
3197 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3198 std::numeric_limits<char8_t>::max_digits10.
3199 * testsuite/18_support/type_info/fundamental.cc: Validate
3200 typeinfo for char8_t.
3201 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3202 std::from_chars with char8_t.
3203 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3204 Validate explicit instantiation of std::hash<char8_t>.
3205 * testsuite/20_util/is_integral/value.cc: Validate
3206 std::is_integral<char8_t>.
3207 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3208 Validate std::make_signed<char8_t>.
3209 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3210 Validate u8string construction from char8_t sources.
3211 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3213 * testsuite/21_strings/basic_string_view/operations/compare/
3214 char/70483.cc: Validate substr operations on u8string_view.
3215 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3216 the u8string_view typedef is defined.
3217 * testsuite/21_strings/char_traits/requirements/
3218 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3220 * testsuite/21_strings/char_traits/requirements/
3221 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3222 constexpr member functions.
3223 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3224 that the u8string typedef is defined.
3225 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3226 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3227 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3228 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3230 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3231 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3233 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3234 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3235 Validate std::atomic<char8_t>::is_always_lock_free
3236 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3237 Update line numbers.
3238 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3240 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3242 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3243 Validate std::experimental::pmr::u8string.
3244 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3245 u8string_view typedef is defined.
3246 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3247 char32_t to the typelists.
3249 2019-02-22 Tom Honermann <tom@honermann.net>
3251 * include/ext/typelist.h: Constrain a partial specialization of
3252 typelist::detail::append_ to only match chain<T1,T2>.
3254 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3257 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3258 class template with class. Replace move and copy member types with
3259 member alias templates, so they are only instantiated when needed.
3260 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3261 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3262 test for C++11/14/17 as well.
3263 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3266 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3269 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3270 _GLIBCXX_PURE to the alias declaration.
3272 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3274 * testsuite/21_strings/basic_string/literals/types.cc
3275 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3276 * testsuite/21_strings/basic_string/literals/values.cc
3277 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3278 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3279 potentially having different type.
3280 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3281 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3283 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3284 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3285 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3286 string literals only using basic character set.
3287 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3288 u8 literals to char.
3289 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3290 Test ATOMIC_CHAR8_T_LOCK_FREE.
3291 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3292 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3293 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3294 * testsuite/experimental/string_view/literals/types.cc
3295 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3297 * testsuite/experimental/string_view/literals/values.cc
3298 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3300 2019-02-19 Tom Honermann <tom@honermann.net>
3302 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3303 from char16_32_t.cc; validates numeric_limits<char8_t>.
3304 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3305 test cloned from types.cc; validates operator""s for char8_t
3307 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3308 test cloned from values.cc; validates construction and comparison
3310 * testsuite/21_strings/basic_string/requirements/
3311 /explicit_instantiation/char8_t/1.cc: New test cloned from
3312 char16_t/1.cc; validates explicit instantiation of
3313 basic_string<char8_t>.
3314 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3315 New test cloned from types.cc; validates operator""sv for char8_t
3316 returns u8string_view.
3317 * testsuite/21_strings/basic_string_view/literals/
3318 values-char8_t.cc: New test cloned from values.cc; validates
3319 construction and comparison of u8string_view values.
3320 * testsuite/21_strings/basic_string_view/requirements/
3321 explicit_instantiation/char8_t/1.cc: New test cloned from
3322 char16_t/1.cc; validates explicit instantiation of
3323 basic_string_view<char8_t>.
3324 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3325 New test cloned from char16_t/65049.cc; validates that
3326 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3327 * testsuite/21_strings/char_traits/requirements/char8_t/
3328 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3329 that char_traits<char8_t> member typedefs are present and correct.
3330 * testsuite/21_strings/char_traits/requirements/
3331 explicit_instantiation/char8_t/1.cc: New test cloned from
3332 char16_t/1.cc; validates explicit instantiation of
3333 char_traits<char8_t>.
3334 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3335 from char16_t.cc: validates
3336 codecvt<char16_t, char8_t, mbstate_t>.
3337 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3338 from char32_t.cc: validates
3339 codecvt<char32_t, char8_t, mbstate_t>.
3340 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3341 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3342 codecvt<char32_t, char8_t, std::mbstate_t>.
3343 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3344 test cloned from string.cc; validates filesystem::path construction
3346 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3347 the __cpp_lib_char8_t feature test macro is defined with the
3349 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3350 New test cloned from string.cc; validates filesystem::path
3351 construction from char8_t input.
3352 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3353 test cloned from types.cc; validates operator""sv for char8_t
3354 returns u8string_view.
3355 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3356 New test cloned from values.cc; validates construction and
3357 comparison of u8string_view values.
3358 * testsuite/experimental/string_view/requirements/
3359 explicit_instantiation/char8_t/1.cc: New test cloned from
3360 char16_t/1.cc; validates explicit instantiation of
3361 basic_string_view<char8_t>.
3362 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3363 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3366 2019-02-19 Tom Honermann <tom@honermann.net>
3368 P0482R5 char8_t: Standard library support
3369 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3370 typeinfo symbols for char8_t.
3371 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3372 (GLIBCXX_3.4.26): Add symbols for specializations of
3373 numeric_limits and codecvt that involve char8_t.
3374 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3375 * include/bits/atomic_base.h: Add atomic_char8_t.
3376 * include/bits/basic_string.h: Add std::hash<u8string> and
3377 operator""s(const char8_t*, size_t).
3378 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3380 * include/bits/char_traits.h: Add char_traits<char8_t>.
3381 * include/bits/codecvt.h: Add
3382 codecvt<char16_t, char8_t, mbstate_t>,
3383 codecvt<char32_t, char8_t, mbstate_t>,
3384 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3385 codecvt_byname<char32_t, char8_t, mbstate_t>.
3386 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3387 recognize char8_t as an integral type.
3388 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3390 (path::u8string): Return std::u8string when char8_t support is
3392 (path::generic_u8string): Likewise.
3393 (path::_S_convert): Handle conversion from char8_t input.
3394 (path::_S_str_convert): Likewise.
3395 * include/bits/functional_hash.h: Add hash<char8_t>.
3396 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3398 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3399 for new char8_t specializations.
3400 * include/bits/localefwd.h: Add missing declarations of
3401 codecvt<char16_t, char, mbstate_t> and
3402 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3403 codecvt<char16_t, char8_t, mbstate_t> and
3404 codecvt<char32_t, char8_t, mbstate_t>.
3405 * include/bits/postypes.h: Add u8streampos
3406 * include/bits/stringfwd.h: Add declarations of
3407 char_traits<char8_t> and u8string.
3408 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3409 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3411 (path::u8string): Return std::u8string when char8_t support is
3413 (path::generic_u8string): Likewise.
3414 (path::_S_convert): Handle conversion from char8_t input.
3415 (path::_S_str_convert): Likewise.
3416 * include/experimental/string: Add u8string.
3417 * include/experimental/string_view: Add u8string_view,
3418 hash<experimental::u8string_view>, and
3419 operator""sv(const char8_t*, size_t).
3420 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3421 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3422 as a character type.
3423 * include/std/limits: Add numeric_limits<char8_t>.
3424 * include/std/string_view: Add u8string_view,
3425 hash<experimental::u8string_view>, and
3426 operator""sv(const char8_t*, size_t).
3427 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3428 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3429 * libsupc++/atomic_lockfree_defines.h: Define
3430 ATOMIC_CHAR8_T_LOCK_FREE.
3431 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3432 codecvt.cc and limits.cc so that char8_t specializations of
3433 numeric_limits and codecvt and emitted.
3434 * src/c++11/Makefile.in: Likewise.
3435 * src/c++11/codecvt.cc: Define members of
3436 codecvt<char16_t, char8_t, mbstate_t>,
3437 codecvt<char32_t, char8_t, mbstate_t>,
3438 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3439 codecvt_byname<char32_t, char8_t, mbstate_t>.
3440 * src/c++11/limits.cc: Define members of
3441 numeric_limits<char8_t>.
3442 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3443 locale_init.cc and localename.cc.
3444 * src/c++98/Makefile.in: Likewise.
3445 * src/c++98/locale_init.cc: Add initialization for the
3446 codecvt<char16_t, char8_t, mbstate_t> and
3447 codecvt<char32_t, char8_t, mbstate_t> facets.
3448 * src/c++98/localename.cc: Likewise.
3449 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3451 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3453 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3454 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3455 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3457 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3459 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3460 * doc/html/*: Regenerate.
3462 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3463 * doc/html/*: Regenerate.
3465 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3466 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3467 allocator type in is_constructible checks.
3468 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3469 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3470 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3471 problematic type from LWG 2586 discussion.
3472 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3473 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3475 * configure.ac: Check for C11 timespec_get function.
3476 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3478 * config.h.in: Regenerate.
3479 * configure: Regenerate.
3480 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3481 std for C++17 and up.
3483 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3484 * include/bits/stl_queue.h
3485 (priority_queue(const Compare&, const Container&, const Alloc&))
3486 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3488 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3490 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3491 * include/bits/stl_queue.h (queue, priority_queue): Add static
3492 assertions to enforce LWG 2566 requirement on value_type.
3493 * include/bits/stl_stack.h (stack): Likewise.
3496 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3498 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3499 * include/bits/std_abs.h: Add comment about LWG 2735.
3500 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3502 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3505 * include/std/version [__cpp_impl_destroying_delete]
3506 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3507 * libsupc++/new [__cpp_impl_destroying_delete]
3508 (__cpp_lib_destroying_delete): Likewise.
3509 (destroying_delete_t, destroying_delete): Likewise, but define even
3510 when __cpp_impl_destroying_delete is not defined.
3511 * testsuite/18_support/destroying_delete.cc: New test.
3513 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3516 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3517 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3518 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3519 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3521 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3524 * include/bits/fs_path.h (path::has_root_name)
3525 (path::has_root_directory, path::has_root_path)
3526 (path::has_relative_path, path::has_parent_path)
3527 (path::has_filename, path::has_stem, path::has_extension)
3528 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3530 * src/c++17/fs_path.cc (path::has_root_name)
3531 (path::has_root_directory, path::has_root_path)
3532 (path::has_relative_path, path::has_parent_path)
3533 (path::has_filename, path::_M_find_extension): Add noexcept.
3535 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3537 PR libstdc++/89102 (partial)
3538 * include/std/type_traits (common_type<>): Define.
3539 (common_type<T>): Derive from common_type<T, T>.
3540 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3541 Test zero-length template argument list.
3542 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3543 Test additional single argument cases.
3544 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3545 Adjust expected error.
3547 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3550 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3552 * include/bits/stl_stack.h (stack): Likewise.
3553 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3554 * testsuite/23_containers/queue/deduction.cc: New test.
3555 * testsuite/23_containers/stack/deduction.cc: New test.
3558 * include/std/type_traits (__is_convertible_helper)
3559 (__is_convertible_helper<_From, _To, false>): Revert changes to
3560 support is_nothrow_convertible.
3561 (__is_nt_convertible_helper): New helper.
3562 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3564 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3565 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3568 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3569 __is_alloc_insertable_impl. Replace single type member with two
3570 members, one for each of copy and move insertable.
3571 (__is_move_insertable): New trait for internal use.
3572 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3573 (vector::_S_nothrow_relocate(true_type)): New functions to
3574 conditionally check if __relocate_a can throw.
3575 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3576 on __is_move_insertable.
3577 (vector::_S_do_relocate): New overloaded functions to conditionally
3579 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3580 based on _S_use_relocate.
3581 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3582 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3583 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3586 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3587 parameter unnamed. Add message to static assertion.
3588 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3589 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3592 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3595 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3597 (__is_bitwise_relocatable): ... to this.
3598 (__relocate_a_1): Adapt.
3599 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3600 (__is_bitwise_relocatable): ... to this.
3602 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3605 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3606 final component as well as from _M_pathname. Append the dot using
3607 operator+= instead of only to _M_pathname.
3608 (path::_M_find_extension): Reformat slightly.
3609 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3610 Add more test cases.
3612 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3614 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3616 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3618 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3619 constexpr specifiers from arg and proj.
3621 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3622 __shared_ptr instantiations used by gcc4-compatible ABI.
3624 * include/experimental/forward_list (experimental::erase): Qualify
3626 * include/experimental/list (experimental::erase): Likewise.
3627 * include/std/forward_list (std::erase): Likewise.
3628 * include/std/list (std::erase): Likewise.
3630 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3632 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3633 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3634 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3635 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3636 * testsuite/ext/array_allocator/26875.cc: Likewise.
3637 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3638 * testsuite/util/replacement_memory_operators.h: Likewise.
3639 * testsuite/util/testsuite_allocator.h: Likewise.
3641 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3642 normal mode vector, even for debug mode.
3643 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3644 Define alias template for normal mode vector.
3646 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3649 * config/locale/generic/c_locale.h (__convert_from_v)
3650 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3651 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3652 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3653 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3655 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3658 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3659 data member with static member function _S_use_relocate().
3660 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3661 (vector::_M_default_append): Use _S_use_relocate() instead of
3664 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3667 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3670 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3671 write to stderr instead of using printf.
3673 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3676 * include/bits/char_traits.h (__constant_string_p,
3677 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3680 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3682 Implement C++20 P0600r1.
3683 * include/backward/hash_map: Add nodiscard attribute to empty.
3684 * include/backward/hash_set: Likewise.
3685 * backward/hashtable.h: Likewise.
3686 * include/bits/basic_string.h: Likewise.
3687 * include/bits/forward_list.h: Likewise.
3688 * include/bits/hashtable.h: Likewise.
3689 * include/bits/regex.h: Likewise.
3690 * include/bits/stl_deque.h: Likewise.
3691 * include/bits/stl_list.h: Likewise.
3692 * include/bits/stl_map.h: Likewise.
3693 * include/bits/stl_multimap.h: Likewise.
3694 * include/bits/stl_multiset.h: Likewise.
3695 * include/bits/stl_queue.h: Likewise.
3696 * include/bits/stl_set.h: Likewise.
3697 * include/bits/stl_stack.h: Likewise.
3698 * include/bits/stl_tree.h: Likewise.
3699 * include/bits/stl_vector.h: Likewise.
3700 * include/bits/unordered_map.h: Likewise.
3701 * include/bits/unordered_set.h: Likewise.
3702 * include/debug/array: Likewise.
3703 * include/experimental/any: Likewise.
3704 * include/experimental/bits/fs_path.h: Likewise.
3705 * include/experimental/internet: Likewise.
3706 * include/experimental/string_view: Likewise.
3707 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3709 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3711 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3713 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3715 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3717 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3719 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3721 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3723 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3724 info_fn_imps.hpp: Likewise.
3725 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3726 left_child_next_sibling_heap_.hpp: Likewise.
3727 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3729 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3731 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3733 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3735 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3737 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3739 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3741 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3742 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3743 * include/ext/rope: Likewise.
3744 * include/ext/slist: Likewise.
3745 * include/ext/vstring.h: Likewise.
3746 * include/profile/array: Likewise.
3747 * include/std/array: Likewise.
3748 * include/tr1/array: Likewise.
3749 * include/tr1/hashtable.h: Likewise.
3750 * include/tr1/regex: Likewise.
3751 * include/tr2/dynamic_bitset: Likewise.
3752 * include/bits/alloc_traits.h: Add nodiscard attribute to
3754 * include/experimental/memory_resource: Likewise.
3755 * include/ext/alloc_traits.h: Likewise.
3756 * include/ext/array_allocator.h: Likewise.
3757 * include/ext/bitmap_allocator.h: Likewise.
3758 * include/ext/debug_allocator.h: Likewise.
3759 * include/ext/extptr_allocator.h: Likewise.
3760 * include/ext/mt_allocator.h: Likewise.
3761 * include/ext/new_allocator.h: Likewise.
3762 * include/ext/pool_allocator.h: Likewise.
3763 * include/ext/throw_allocator.h: Likewise.
3764 * include/std/scoped_allocator: Likewise.
3765 * libsupc++/eh_alloc.cc: Likewise.
3766 * include/std/future: Add nodiscard attribute to async.
3767 * libsupc++/new: Add nodiscard attribute to new.
3769 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3774 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3775 * include/bits/shared_ptr.h
3776 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3777 (allocate_shared): Change to use new tag type.
3778 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3779 Declare new member function.
3780 (_Sp_alloc_shared_tag): Define new type.
3781 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3782 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3783 _Sp_make_shared_tag::_S_eq to check type_info.
3784 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3785 Constrain to prevent being called with _Sp_alloc_shared_tag.
3786 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3787 Replace constructor with ...
3788 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3789 reference parameter so address of the new object can be returned to
3790 the caller. Obtain the allocator from the tag type.
3791 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3792 constructor with ...
3793 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3794 to the __shared_count constructor.
3795 (__allocate_shared): Change to use new tag type.
3796 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3798 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3800 * src/c++17/fs_ops.cc
3801 (equivalent(const path&, const path&, error_code&))
3802 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3803 compare files instead of relying on incomplete info returned by stat.
3806 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3807 if the path is already absolute.
3808 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3809 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3812 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3813 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3814 of filesystem::exists.
3815 (create_directories(const path&, error_code&)): Add assertions.
3816 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3817 Add workaround for bug in _wstat for paths with trailing slash.
3818 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3819 for expected behaviour on mingw.
3820 * testsuite/experimental/filesystem/operations/create_directories.cc:
3822 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3823 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3824 not test permissions on mingw targets.
3826 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3828 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3829 constructors and open members taking wide strings. Fix patterns for
3830 filesystem::path members to match wstring_view parameters. Add
3831 exports for shared_ptr members used by directory iterators.
3832 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3833 error code parameter if the file doesn't exist.
3834 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3836 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3837 values for mingw targets, where "/" is not an absolute path. Do not
3838 test symlinks on mingw targets.
3839 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3840 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3842 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3843 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3844 that each component of the path is created.
3845 * testsuite/experimental/filesystem/operations/create_directories.cc:
3847 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3848 permissions on mingw targets.
3849 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3850 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3851 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3852 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3854 * testsuite/experimental/filesystem/operations/permissions.cc:
3856 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3857 symlinks or permissions on mingw targets.
3858 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3859 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3860 symlinks on mingw targets.
3861 * testsuite/experimental/filesystem/operations/remove_all.cc:
3863 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3864 permissions on mingw targets.
3865 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3866 test symlinks on mingw targets.
3867 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3870 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3873 Warn about unused comparisons of shared_ptr/unique_ptr
3874 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3875 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3876 <, <=, >, >= for shared_ptr.
3877 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3879 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3881 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3882 as 201611L, because P0497R0 changes are supported.
3883 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3885 * include/bits/erase_if.h [__cplusplus > 201703L]
3886 (__cpp_lib_erase_if): Only define for C++2a.
3887 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3888 (__cpp_lib_null_iterators): Define.
3889 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3890 (__cpp_lib_null_iterators): Define.
3891 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3893 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3895 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3897 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3898 changes are supported.
3899 * include/std/optional (__cpp_lib_optional): Likewise.
3900 * include/std/variant (__cpp_lib_variant): Likewise.
3901 * include/std/version [!__STRICT_ANSI__]
3902 (__cpp_lib_uncaught_exceptions): Define as long integer.
3903 [__cplusplus >= 201703L] (__cpp_lib_any)
3904 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3905 (__cpp_lib_variant): Define for C++17.
3906 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3908 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3911 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3913 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3917 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3919 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3922 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3924 * doc/xml/manual/intro.xml: Include new section.
3925 * doc/xml/manual/status_cxx2017.xml: Document more
3926 implementation-defined properties of the library.
3927 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3928 * doc/html/*: Regenerate.
3930 * include/bits/refwrap.h [__cplusplus > 201703L]
3931 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3932 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3933 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3935 (reference_wrapper::operator()): Add static assertion.
3936 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3938 * include/std/chrono (duration_values::zero(), duration_values::min())
3939 (duration_values::max()): Add noexcept.
3940 (duration::zero(), duration::min(), duration::max()): Likewise.
3941 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3942 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3943 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3945 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3947 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3949 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3950 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3952 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3955 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3956 specialization for C++17 (P0513R0, LWG 2817).
3957 * testsuite/20_util/hash/nullptr.cc: New test.
3960 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3961 pattern for std::basic_stringbuf::str().
3963 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3964 basic_ostream::operator<< patterns.
3966 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3968 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3969 test failures on targets with 32-bit time_t.
3971 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3972 * include/std/deque: Likewise.
3973 * include/std/forward_list: Likewise.
3974 * include/std/list: Likewise.
3975 * include/std/string: Likewise.
3976 * include/std/vector: Likewise.
3977 * include/std/version: Likewise.
3978 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3979 * testsuite/23_containers/deque/erasure.cc: Likewise.
3980 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3981 * testsuite/23_containers/list/erasure.cc: Likewise.
3982 * testsuite/23_containers/map/erasure.cc: Likewise.
3983 * testsuite/23_containers/set/erasure.cc: Likewise.
3984 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3985 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3986 * testsuite/23_containers/vector/erasure.cc: Likewise.
3988 * include/experimental/internet [AI_NUMERICSERV]
3989 (resolver_base::numeric_service): Define conditionally.
3990 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3992 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3995 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3996 Jonathan Wakely <jwakely@redhat.com>
3999 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4000 (GLIBCXX_3.4.26): Add new exports.
4001 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4002 correct list of sources.
4003 * include/Makefile.in: Regenerate.
4004 * include/std/ostream (operator<<(nullptr_t)): New member function.
4005 * src/c++17/ostream-inst.cc: New file.
4006 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4009 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4011 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4012 of the source file containing the caller.
4013 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4014 directories created by test.
4015 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4017 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4019 * testsuite/experimental/filesystem/iterators/
4020 recursive_directory_iterator.cc: Likewise.
4022 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4024 PR tree-optimization/88775
4025 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4026 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4027 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4028 instead of __builtin_constant_p if available. Don't bother with
4029 the pointer comparison in C++11 and earlier.
4031 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4035 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4038 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4040 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4041 for filesystem::path. Give variables more distinctive names.
4043 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4044 member function to perform non-trivial assignment.
4045 (_Optional_payload_base::_M_move_assign): Likewise.
4046 (_Optional_payload<T, true, false, true>::operator=)
4047 (_Optional_payload<T, true, true, false>::operator=)
4048 (_Optional_payload<T, true, false, false>::operator=): Call
4049 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4052 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4053 test std::complex<long double> if long double format is IBM128.
4054 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4057 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4059 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4060 for old std::unique_ptr layout.
4061 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4062 to become valueless. Add filesystem::path tests.
4065 * include/std/optional (_Optional_payload_base): New class template
4066 for common code hoisted from _Optional_payload specializations. Use
4067 a template for the union, to allow a partial specialization for
4068 types with non-trivial destructors. Add constructors for in-place
4069 initialization to the union.
4070 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4071 to perform non-trivial copy construction, instead of relying on
4072 non-standard copy elision in a delegating constructor.
4073 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4074 non-trivial move construction.
4075 (_Optional_payload): Derive from _Optional_payload_base and use it
4076 for everything except the non-trivial assignment operators, which are
4078 (_Optional_payload<false, C, M>): Derive from the specialization
4079 _Optional_payload<true, false, false> and add a destructor.
4080 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4081 Forward to corresponding members of _Optional_payload.
4082 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4083 Hoist common members from _Optional_base.
4084 (_Optional_base): Make all members and base class public.
4085 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4086 _Optional_base_impl.
4087 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4088 support for new std::optional layout.
4089 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4092 * include/bits/locale_conv.h: Use <> for includes not "".
4093 * include/ext/random: Likewise.
4094 * include/ext/vstring.h: Likewise.
4096 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4098 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4099 (GLIBCXX_3.4.21): Likewise.
4101 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4104 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4105 to match the one that controls whether utimbuf and utime are declared.
4107 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4110 * include/bits/char_traits.h (char_traits::move): Do not pass null
4111 pointers to memmove.
4112 * include/bits/locale_facets.h
4113 (ctype<char>::widen(const char*, const char*, char*)): Do not
4114 pass null pointers to memcpy.
4115 (ctype<char>::narrow(const char*, const char*, char, char*)):
4117 (ctype<char>::do_widen(const char*, const char*, char*)):
4119 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4122 * doc/xml/manual/spine.xml: Update copyright years.
4123 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4124 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4125 for C++17 filesystem library.
4126 * doc/html/*: Regenerate.
4128 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4129 * config.h.in: Regenerate.
4130 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4131 alphabetically and add missing entries for copy_symlink,
4132 hard_link_count, rename, and resize_file.
4133 * configure: Regenerate.
4134 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4135 used unconditionally.
4136 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4137 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4138 supports truncating to zero length.
4139 * testsuite/27_io/filesystem/operations/all.cc: New test.
4140 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4142 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4145 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4146 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4147 * config.h.in: Regenerate.
4148 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4149 remaining std::filesystem types and functions.
4150 * configure: Regenerate.
4151 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4152 * src/c++17/Makefile.in: Regenerate.
4153 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4154 here, and change name of included file.
4155 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4156 here, and change name of included file.
4157 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4158 path to dir-common.h.
4159 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4160 path to ops-common.h. Disable -Wunused-parameter warnings.
4161 (internal_file_clock): Define unconditionally.
4162 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4164 (do_copy_file, do_space): Move definitions to ops.common.h.
4165 (copy, file_size, hard_link_count, last_write_time, space): Only
4166 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4168 (last_write_time, read_symlink): Remove unused attributes from
4170 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4171 * src/filesystem/Makefile.in: Regenerate.
4172 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4173 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4174 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4175 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4176 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4177 dummy types and functions instead of using #error.
4178 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4179 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4181 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4182 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4183 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4184 to account for new namespace.
4185 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4186 -lstdc++fs from dg-options.
4187 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4188 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4189 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4190 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4191 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4193 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4194 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4196 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4197 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4198 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4199 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4200 * testsuite/27_io/filesystem/operations/create_directories.cc:
4202 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4203 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4204 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4205 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4206 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4207 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4208 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4209 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4210 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4211 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4212 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4213 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4214 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4215 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4216 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4217 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4218 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4219 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4221 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4225 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4226 typeinfo and vtables less greedy.
4227 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4228 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4229 * src/c++17/Makefile.in: Regenerate.
4230 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4231 here, and change name of included file.
4232 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4233 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4235 * src/filesystem/Makefile.in: Regenerate.
4236 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4237 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4238 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4239 from dg-options and remove dg-require-filesystem-ts.
4240 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4241 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4242 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4243 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4244 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4245 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4246 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4247 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4248 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4249 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4250 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4251 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4252 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4253 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4254 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4255 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4256 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4257 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4258 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4259 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4260 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4262 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4263 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4264 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4265 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4266 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4267 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4268 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4269 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4270 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4271 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4272 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4273 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4275 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4277 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4279 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4281 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4282 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4283 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4284 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4285 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4286 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4287 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4288 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4289 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4290 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4292 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4293 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4294 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4295 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4296 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4299 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4300 Check is_trivially_copyable instead of is_scalar.
4301 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4302 contained value can throw and its type is trivially copyable then
4303 construct into a temporary variant and move from it, to provide the
4304 strong exception safety guarantee.
4305 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4307 * testsuite/20_util/variant/87431.cc: New test.
4308 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4309 conversion causes valueless state.
4312 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4313 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4314 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4315 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4316 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4318 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4320 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4321 (file_time_type): Redefine in terms of __file_clock.
4322 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4324 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4326 (internal_file_lock): New helper type for accessing __file_clock.
4327 (do_copy_file): Use internal_file_lock to convert system time to
4329 (last_write_time(const path&, error_code&)): Likewise.
4330 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4332 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4334 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4335 for const member functions of std::basic_string.
4336 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4338 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4339 Make non-standard constructor private.
4340 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4342 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4343 explicit instantiations for C++17 as well as earlier dialects.
4344 * src/c++17/Makefile.am: Add new source files.
4345 * src/c++17/Makefile.in: Regenerate.
4346 * src/c++17/cow-string-inst.cc: New file defining explicit
4347 instantiations for basic_string member functions added in C++17.
4348 * src/c++17/string-inst.cc: Likewise.
4350 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4351 copy/move constructors for old std::basic_string.
4352 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4353 (basic_string::reference, basic_string::const_reference): Define
4354 as plain references for C++11 and later.
4355 (basic_string::basic_string()): Put constructor body outside
4356 preprocessor conditional groups.
4357 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4358 instead of copying it.
4359 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4361 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4363 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4364 cases for old basic_string.
4365 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4366 allocator-extended constructors unconditionally. Add extra members to
4367 allocator type when using old string ABI.
4368 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4370 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4372 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4373 -fno-inline added to test flags.
4375 * testsuite/21_strings/basic_string/requirements/
4376 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4378 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4379 assertion failures with old std::string ABI.
4381 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4383 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4384 functions that will only erase elements at the end.
4385 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4386 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4387 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4389 (path::_List::pop_back()): Define.
4390 (path::_List::_M_erase_from(const_iterator)): Define.
4391 (path::operator/=(const path&)): Use pop_back to remove last component
4392 and _M_erase_from to remove multiple components.
4393 (path::_M_append(basic_string_view<value_type>)): Likewise.
4394 (path::operator+=(const path&)): Likewise.
4395 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4396 (path::remove_filename()): Likewise.
4397 (path::lexically_normal()): Use _List::_Impl iterators instead of
4398 path::iterator. Use pop_back to remove components from the end. Clear
4399 trailing filename, instead of using erase(const_iterator) to remove
4400 a non-final component.
4401 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4403 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4405 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4406 incorrect treatment of empty filename after trailing slash.
4407 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4409 * testsuite/21_strings/basic_string/modifiers/assign/char/
4410 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4412 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4413 move_assign_optim.cc: Likewise.
4415 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4416 Jakub Jelinek <jakub@redhat.com>
4419 * include/experimental/memory: Replace UTF-8 quote characters.
4420 * include/std/future: Replace UTF-8 "em dash" characters.
4422 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4425 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4426 * include/debug/forward_list: Likewise.
4427 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4429 * include/experimental/chrono: Likewise.
4430 * include/experimental/functional: Likewise.
4431 * include/experimental/ratio: Likewise.
4432 * include/experimental/system_error: Likewise.
4433 * include/experimental/tuple: Likewise.
4434 * include/experimental/type_traits: Likewise.
4435 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4436 * include/parallel/multiseq_selection.h: Likewise.
4439 * config/abi/pre/gnu.ver: Add missing exports.
4440 * testsuite/22_locale/collate_byname/88681.cc: New test.
4441 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4442 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4444 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4446 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4447 initializer_list<value_type> and from input iterator ranges.
4448 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4450 * testsuite/experimental/string_view/element_access/char/empty.cc:
4451 Fix year range in copyright header.
4453 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4455 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4456 Fix year range in copyright header.
4458 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4460 Update copyright years.
4462 Copyright (C) 2019 Free Software Foundation, Inc.
4464 Copying and distribution of this file, with or without modification,
4465 are permitted in any medium without royalty provided the copyright
4466 notice and this notice are preserved.