1 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
3 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
4 * include/std/bit (_If_is_unsigned_integer_type): Remove.
5 (_If_is_unsigned_integer): Use __is_unsigned_integer.
6 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
7 (countl_one(byte), countr_zero(byte), countr_one(byte))
8 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
9 (log2p1(byte)): Remove.
10 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
11 (__detail::__is_int_to_chars_type): Remove.
12 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
13 and __is_unsigned_integer.
14 * include/std/type_traits (__is_one_of): Move here from <charconv>.
15 (__is_signed_integer, __is_unsigned_integer): New helpers.
16 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
18 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
19 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
20 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
21 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
22 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
23 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
24 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
25 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
26 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
27 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
29 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
31 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
34 2019-06-25 Jakub Jelinek <jakub@redhat.com>
36 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
37 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
38 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
39 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
41 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
43 * include/std/numeric (midpoint(T, T)): Change implementation for
44 floating-point types to avoid incorrect rounding of denormals.
45 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
46 rounding with denormals.
47 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
48 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
50 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
52 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
54 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
56 * configure: Regenerate.
58 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
59 Qualify calls to __never_valueless.
61 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
64 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
65 vector<bool> for test.
66 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
68 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
70 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
72 (istream_iterator::_M_read()): Do not check stream state before
73 attempting extraction. Set stream pointer to null when extraction
75 (operator==(const istream_iterator&, const istream_iterator&)): Change
76 to be a hidden friend of istream_iterator.
77 (operator!=(const istream_iterator&, const istream_iterator&)):
79 (ostream_iterator::ostream_iterator()): Add default constructor.
80 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
82 * testsuite/24_iterators/istream_iterator/1.cc: New test.
83 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
84 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
85 constructor taking a string.
86 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
89 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
90 Jonathan Wakely <jwakely@redhat.com>
93 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
94 values of type bool for vector<bool> elements.
95 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
96 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
98 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
100 PR libstdc++/90920 partially revert r263433
101 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
102 (rotate): Remove checks.
103 * testsuite/25_algorithms/rotate/90920.cc: New test.
105 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
106 category used in invocable check.
107 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
108 * testsuite/26_numerics/reduce/2.cc: New test.
110 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
112 * include/bits/algorithmfwd.h: Change title of doc group.
113 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
115 * include/bits/stl_numeric.h: Define doc group and add algos to it.
116 * include/std/numeric (__is_random_access_iter): New internal trait.
117 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
118 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
119 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
120 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
121 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
122 * testsuite/26_numerics/reduce/1.cc: New test.
123 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
124 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
125 * testsuite/26_numerics/transform_reduce/1.cc: New test.
126 * testsuite/util/testsuite_iterators.h (test_container::size()): New
129 * include/c_global/cstddef (std::byte): Perform arithmetic operations
130 in unsigned int to avoid promotion (LWG 2950).
132 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
134 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
137 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
139 PR libstdc++/90281 Fix string conversions for filesystem::path
140 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
141 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
142 __str_codecvt_in_all to fail for partial conversions and throw on
144 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
145 (path::_Cvt<char8_t>): Add explicit specialization.
146 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
148 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
149 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
150 instead of codecvt_utf8. Use __str_codecvt_in_all and
151 __str_codecvt_out_all.
152 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
153 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
154 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
155 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
156 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
157 after converting to UTF-8.
158 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
159 __str_codecvt_in_all.
160 (path::string): Fix initialization of string types with different
162 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
163 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
164 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
166 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
167 return false for partial conversions.
168 * include/experimental/bits/fs_path.h (u8path):
169 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
170 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
171 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
172 instead of codecvt_utf8. Use __str_codecvt_in_all and
173 __str_codecvt_out_all.
174 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
175 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
176 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
177 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
178 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
179 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
180 __str_codecvt_in_all.
181 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
182 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
183 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
184 __str_codecvt_in_all.
185 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
186 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
187 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
188 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
189 strings and with Unicode characters outside the basic multilingual
191 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
192 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
193 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
194 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
195 * testsuite/experimental/filesystem/path/native/string.cc: Test with
196 empty strings and with Unicode characters outside the basic
199 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
200 Jonathan Wakely <jwakely@redhat.com>
202 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
203 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
204 deallocate node if insertion fails.
205 (_Hashtable::_M_insert_multi_node): Likewise.
206 (_Hashtable::_M_reinsert_node): Pass additional key argument.
207 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
208 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
209 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
210 (_Hashtable::extract(const _Key&)): Likewise.
211 (_Hashtable::_M_merge_unique): Pass additional key argument.
212 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
214 (_Hashtable::_M_insert): Likewise.
215 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
216 (_Hashtable_alloc): Add comments to functions with misleading names.
218 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
220 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
222 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
223 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
224 header for std::allocator.
225 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
226 using-declaration for std::size_t.
227 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
229 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
231 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
232 * testsuite/experimental/map/erasure.cc: Include <string> for
234 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
236 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
238 * include/experimental/type_traits (experimental::nonesuch): Use
239 pragma to disable -Wctor-dtor-privacy warnings.
240 * include/std/type_traits (__is_convertible_helper<From, To, false>)
241 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
243 * include/std/version (__cpp_lib_bind_front): Add missing macro.
245 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
247 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
248 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
249 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
250 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
252 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
253 (variant::emplace): Change static_assert messages from "should be"
255 (hash<monostate>::operator()): Remove name of unused parameter.
257 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
260 * include/Makefile.am: Add new <bits/charconv.h> header.
261 * include/Makefile.in: Regenerate.
262 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
263 (to_string(long), to_string(unsigned long), to_string(long long))
264 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
265 * include/bits/charconv.h: New header.
266 (__detail::__to_chars_len): Move here from <charconv>.
267 (__detail::__to_chars_10_impl): New function extracted from
268 __detail::__to_chars_10.
269 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
270 (__to_chars_unsigned_type): New class template that reuses
271 __make_unsigned_selector_base::__select to pick a type.
272 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
273 (__detail::__to_chars_len): Move to new header.
274 (__detail::__to_chars_10): Add inline specifier. Move code doing the
275 output to __detail::__to_chars_10_impl and call that.
276 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
277 * testsuite/21_strings/basic_string/numeric_conversions/char/
278 to_string.cc: Fix reference in comment. Remove unused variable.
279 * testsuite/21_strings/basic_string/numeric_conversions/char/
280 to_string_int.cc: New test.
282 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
284 Fix ConstexprIterator requirements tests - No constexpr algorithms!
285 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
286 Replace copy with hand-rolled loop.
287 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
290 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
292 Test for C++20 p0858 - ConstexprIterator requirements.
293 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
295 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
298 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
300 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
302 * include/bits/c++config: Rename all macros of the form __PSTL* to
304 * include/std/algorithm: Likewise.
305 * include/std/execution: Likewise.
306 * include/std/numeric: Likewise.
307 * include/std/memory: Likewise.
308 * include/pstl/glue_memory_impl.h: Likewise.
309 * include/pstl/numeric_impl.h: Likewise.
310 * include/pstl/glue_memory_defs.h: Likewise.
311 * include/pstl/execution_defs.h: Likewise.
312 * include/pstl/utils.h: Likewise.
313 * include/pstl/algorithm_fwd.h: Likewise.
314 * include/pstl/unseq_backend_simd.h: Likewise.
315 * include/pstl/glue_execution_defs.h: Likewise.
316 * include/pstl/algorithm_impl.h: Likewise.
317 * include/pstl/parallel_impl.h: Likewise.
318 * include/pstl/memory_impl.h: Likewise.
319 * include/pstl/glue_numeric_defs.h: Likewise.
320 * include/pstl/parallel_backend_utils.h: Likewise.
321 * include/pstl/glue_algorithm_defs.h: Likewise.
322 * include/pstl/parallel_backend.h: Likewise.
323 * include/pstl/glue_numeric_impl.h: Likewise.
324 * include/pstl/parallel_backend_tbb.h: Likewise.
325 * include/pstl/numeric_fwd.h: Likewise.
326 * include/pstl/glue_algorithm_impl.h: Likewise.
327 * include/pstl/execution_impl.h: Likewise.
328 * include/pstl/pstl_config.h: Likewise.
329 * testsuite/util/pstl/pstl_test_config.h: Likewise.
330 * testsuite/util/pstl/test_utils.h: Likewise.
331 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
333 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
335 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
337 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
338 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
339 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
340 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
341 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
343 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
344 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
345 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
346 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
347 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
349 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
350 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
351 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
352 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
353 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
355 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
356 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
357 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
359 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
361 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
362 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
363 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
365 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
367 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
369 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
371 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
373 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
375 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
377 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
379 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
381 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
383 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
385 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
387 Rename header guards to be consistent with upstream project's
389 * include/pstl/glue_memory_impl.h: Rename all macros of the form
390 _PSTL_(.*)_H to _PSTL_\U\1_H.
391 * include/pstl/numeric_impl.h: Likewise.
392 * include/pstl/glue_memory_defs.h: Likewise.
393 * include/pstl/execution_defs.h: Likewise.
394 * include/pstl/utils.h: Likewise.
395 * include/pstl/algorithm_fwd.h: Likewise.
396 * include/pstl/unseq_backend_simd.h: Likewise.
397 * include/pstl/glue_execution_defs.h: Likewise.
398 * include/pstl/algorithm_impl.h: Likewise.
399 * include/pstl/parallel_impl.h: Likewise.
400 * include/pstl/memory_impl.h: Likewise.
401 * include/pstl/glue_numeric_defs.h: Likewise.
402 * include/pstl/parallel_backend_utils.h: Likewise.
403 * include/pstl/glue_algorithm_defs.h: Likewise.
404 * include/pstl/parallel_backend.h: Likewise.
405 * include/pstl/glue_numeric_impl.h: Likewise.
406 * include/pstl/parallel_backend_tbb.h: Likewise.
407 * include/pstl/numeric_fwd.h: Likewise.
408 * include/pstl/glue_algorithm_impl.h: Likewise.
409 * include/pstl/execution_impl.h: Likewise.
410 * include/pstl/pstl_config.h: Likewise.
411 * testsuite/util/pstl/pstl_test_config.h: Likewise.
413 Synchronize libstdc++ parallel algorithms with upstream
415 * include/pstl/algorithm_fwd.h: Synchronize with
416 upstream PSTL project.
417 * include/pstl/algorithm_impl.h: Likewise.
418 * include/pstl/execution_defs.h: Likewise.
419 * include/pstl/execution_impl.h: Likewise.
420 * include/pstl/glue_algorithm_impl.h: Likewise.
421 * include/pstl/glue_execution_defs.h: Likewise.
422 * include/pstl/numeric_fwd.h: Likewise.
423 * include/pstl/numeric_impl.h: Likewise.
424 * include/pstl/parallel_backend.h: Likewise.
425 * include/pstl/pstl_config.h: Likewise.
426 * include/pstl/unseq_backend_simd.h: Likewise.
427 * include/pstl/parallel_backend_serial.h: New file.
428 * include/Makefile.am (pstl_headers): Add
429 parallel_backend_serial.h.
430 * include/Makefile.in: Regenerate.
432 Clean up non-conforming names
433 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
434 Uglfiy copy_range1 and copy_range2
435 (__pattern_walk2_n): Rename local n to __n
436 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
437 Rename parameter _T to _Tp.
439 Integrate non-TBB serial backend support
440 * include/bits/c++config: Adjust TBB detection logic to select serial
441 PSTL backend if no TBB present.
442 * testsuite/utils/pstl/test_utils.h: Remove check for
443 _PSTL_USE_PAR_POLICIES
445 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
447 * testsuite/24_iterators/container_access.cc: Move dg-options before
448 dg-do directive so the target check uses the -std option.
451 * configure: Regenerate.
452 * src/Makefile.am (stamp-debug): Also test for missing makefile.
453 * src/Makefile.in: Regenerate.
455 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
457 * include/std/array: Do not include <stdexcept>.
458 * include/std/optional: Include <exception> and
459 <bits/exception_defines.h> instead of <stdexcept>.
460 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
462 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
464 * testsuite/23_containers/map/erasure.cc: Include <string>.
465 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
467 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
468 dg-prune-output for different C++98 diagnostic.
469 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
471 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
473 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
475 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
477 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
479 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
481 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
483 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
485 * testsuite/23_containers/vector/requirements/dr438/
486 constructor_1_neg.cc: Likewise.
487 * testsuite/23_containers/vector/requirements/dr438/
488 constructor_2_neg.cc: Likewise.
489 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
491 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
493 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
494 Do not test allocator rebinding extension for C++2a.
495 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
496 dg-do directive for C++17 and C++2a.
498 * testsuite/23_containers/deque/requirements/explicit_instantiation/
499 1_c++0x.cc: Remove redundant test.
500 * testsuite/23_containers/deque/requirements/explicit_instantiation/
501 2.cc: Use target selector instead of preprocessor condition.
502 * testsuite/23_containers/deque/requirements/explicit_instantiation/
503 3.cc: Do not run test for C++2a.
504 * testsuite/23_containers/forward_list/requirements/
505 explicit_instantiation/3.cc: Likewise.
506 * testsuite/23_containers/forward_list/requirements/
507 explicit_instantiation/5.cc: Do not test allocator rebinding extension
509 * testsuite/23_containers/list/requirements/explicit_instantiation/
510 1_c++0x.cc: Remove redundant test.
511 * testsuite/23_containers/list/requirements/explicit_instantiation/
512 2.cc: Use target selector instead of preprocessor condition.
513 * testsuite/23_containers/list/requirements/explicit_instantiation/
514 3.cc: Do not run test for C++2a.
515 * testsuite/23_containers/list/requirements/explicit_instantiation/
516 5.cc: Do not test allocator rebinding extension for C++2a.
517 * testsuite/23_containers/map/requirements/explicit_instantiation/
518 1_c++0x.cc: Remove redundant test.
519 * testsuite/23_containers/map/requirements/explicit_instantiation/
520 2.cc: Adjust comment.
521 * testsuite/23_containers/map/requirements/explicit_instantiation/
522 3.cc: Do not run test for C++2a.
523 * testsuite/23_containers/map/requirements/explicit_instantiation/
524 5.cc: Do not test allocator rebinding extension for C++2a.
525 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
526 1_c++0x.cc: Remove redundant test.
527 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
528 3.cc: Do not run test for C++2a.
529 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
530 5.cc: Do not test allocator rebinding extension for C++2a.
531 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
532 3.cc: Do not run test for C++2a.
533 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
534 5.cc: Do not test allocator rebinding extension for C++2a.
535 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
536 Do not run test for C++2a.
537 * testsuite/23_containers/set/requirements/explicit_instantiation/
538 1_c++0x.cc: Remove redundant test.
539 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
540 Do not test allocator rebinding extension for C++2a.
541 * testsuite/23_containers/unordered_map/requirements/
542 explicit_instantiation/3.cc: Likewise.
543 * testsuite/23_containers/unordered_map/requirements/
544 explicit_instantiation/5.cc: Do not test allocator rebinding extension
546 * testsuite/23_containers/unordered_multimap/requirements/
547 explicit_instantiation/3.cc: Do not run test for C++2a.
548 * testsuite/23_containers/unordered_multimap/requirements/
549 explicit_instantiation/5.cc: Do not test allocator rebinding extension
551 * testsuite/23_containers/unordered_multiset/requirements/
552 explicit_instantiation/3.cc: Do not run test for C++2a.
553 * testsuite/23_containers/unordered_multiset/requirements/
554 explicit_instantiation/5.cc: Do not test allocator rebinding extension
556 * testsuite/23_containers/unordered_set/requirements/
557 explicit_instantiation/3.cc: Do not run test for C++2a.
558 * testsuite/23_containers/unordered_set/requirements/
559 explicit_instantiation/5.cc: Do not test allocator rebinding extension
561 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
562 2.cc: Remove redundant test.
563 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
564 3.cc: Do not run test for C++2a.
565 * testsuite/23_containers/vector/requirements/explicit_instantiation/
568 * include/std/type_traits (is_empty, is_polymorphic, is_final)
569 (is_abstract, is_aggregate): Remove static_assert.
570 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
572 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
573 missing -std=gnu++17 option.
574 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
575 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
576 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
579 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
580 * testsuite/18_support/set_unexpected.cc: Likewise.
581 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
583 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
584 function to be valid in C++11.
585 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
586 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
587 include Library Fundamentals or Networking headers in C++11 mode.
588 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
590 * include/std/tuple (_TC): Replace with _TupleConstraints.
591 (_TupleConstraints): New helper for SFINAE constraints, with more
592 expressive member functions to reduce duplication when used.
593 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
594 (tuple::_TCC): Replace dummy type parameter with bool non-type
595 parameter that can be used to check the pack size.
596 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
597 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
598 checking constraints in constructors.
599 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
601 (tuple::tuple): Use new helpers to reduce repitition in constraints.
602 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
603 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
604 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
605 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
606 constraints in constructors.
607 (tuple::__is_alloc_arg()): New SFINAE helpers.
608 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
610 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
611 * testsuite/20_util/tuple/cons/90700.cc: New test.
612 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
613 to meet new constraint on allocator-extended default constructor.
615 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
617 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
618 * include/bits/stl_multimap.h (multimap): Likewise.
620 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
622 Rename variables and cleanup comments.
623 * include/bits/hashtable_policy.h
624 * include/bits/hashtable.h
626 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
628 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
629 Fix bgcolor for P0340R3.
630 * doc/html/*: Regenerate.
633 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
634 <experimental/memory_resource>.
635 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
636 P0339R6, P0340R3, P1164R1 and P1357R1.
637 * doc/html/*: Regenerate.
639 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
640 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
641 allocator::value_type assertion for C++2a.
642 * include/bits/hashtable.h: Likewise.
643 * include/bits/stl_deque.h: Likewise.
644 * include/bits/stl_list.h: Likewise.
645 * include/bits/stl_map.h: Likewise.
646 * include/bits/stl_multimap.h: Likewise.
647 * include/bits/stl_multiset.h: Likewise.
648 * include/bits/stl_set.h: Likewise.
649 * include/bits/stl_vector.h: Likewise.
650 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
651 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
652 * testsuite/23_containers/list/48101-3_neg.cc: New test.
653 * testsuite/23_containers/map/48101-3_neg.cc: New test.
654 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
655 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
656 * testsuite/23_containers/set/48101-3_neg.cc: New test.
657 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
658 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
659 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
660 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
661 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
663 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
665 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
667 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
669 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
671 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
673 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
675 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
677 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
680 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
681 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
682 * libsupc++/eh_term_handler.h: New header defining
683 _GLIBCXX_DEFAULT_TERM_HANDLER.
684 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
685 (set_terminate): Restore default handler when argument is null.
686 (set_unexpected): Likewise.
687 * testsuite/18_support/set_terminate.cc: New test.
688 * testsuite/18_support/set_unexpected.cc: New test.
690 * include/backward/hashtable.h (size_t, ptrdiff_t)
691 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
692 (distance, vector, pair, __iterator_category): Remove
693 using-declarations that add these names to namespace __gnu_cxx.
694 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
695 * include/ext/debug_allocator.h (size_t): Likewise.
696 * include/ext/functional (size_t, unary_function, binary_function)
697 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
699 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
700 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
701 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
702 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
703 * include/ext/numeric (iota): Fix outdated comment.
704 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
705 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
706 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
707 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
708 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
710 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
711 (allocator, __true_type, __false_type): Likewise.
713 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
716 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
717 New helpers for checking preconditions in traits.
718 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
719 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
720 (is_destructible, is_nothrow_destructible, is_constructible)
721 (is_default_constructible, is_copy_constructible)
722 (is_move_constructible, is_nothrow_default_constructible)
723 (is_nothrow_constructible, is_nothrow_copy_constructible)
724 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
725 (is_nothrow_assignable, is_nothrow_copy_assignable)
726 (is_nothrow_move_assignable, is_trivially_constructible)
727 (is_trivially_copy_constructible, is_trivially_move_constructible)
728 is_trivially_assignable, is_trivially_copy_assignable)
729 (is_trivially_move_assignable, is_trivially_destructible)
730 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
731 (is_invocable_r, is_nothrow_invocable)
732 (has_unique_object_representations, is_aggregate): Add static_asserts
733 to make sure that type traits are not misused with incomplete types.
734 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
735 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
736 base characteristics without assertions that can be reused in other
738 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
739 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
741 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
742 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
743 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
744 * testsuite/20_util/is_class/value.cc: Check incomplete type.
745 * testsuite/20_util/is_function/value.cc: Likewise.
746 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
747 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
749 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
750 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
751 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
752 * testsuite/20_util/is_union/value.cc: Likewise.
753 * testsuite/20_util/is_void/value.cc: Likewise.
754 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
756 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
758 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
759 Add new private member function.
760 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
761 (random_device::_M_init_pretr1(const string&)): Call new private
762 member with string data.
763 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
765 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
766 test using COW strings.
767 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
768 a value from the device.
769 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
770 Fix typo in token string.
772 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
774 LWG2788 basic_string spurious use of a default constructible allocator
775 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
776 (basic_string::_M_replace_dispatch): Construct temporary string with
777 the current allocator.
778 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
779 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
781 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
783 * doc/xml/manual/diagnostics.xml: Update list of headers that define
785 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
786 section about new/delete overloads. Improve section on verbose
788 * doc/html/*: Regenerate.
790 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
791 P0811R3. Change status of P1353R0.
792 * doc/html/*: Regenerate.
794 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
795 documentation of implementation-defined types for [thread.req.native].
796 * doc/xml/manual/status_cxx2017.xml: Update documentation of
797 implementation-defined strings for [variant.bad.access]. Fix typo in
798 documentation of implementation-defined support for [fs.conform.9945].
799 * doc/html/*: Regenerate.
801 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
804 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
805 that fails on mingw-w64.
808 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
809 (status(const path&, error_code&)): Use parent_path() to remove
811 (symlink_status(const path&, error_code&)): Duplicate workaround for
812 bug in _wstat for paths with trailing slash.
813 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
815 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
816 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
818 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
819 once instead of building it iteratively.
821 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
823 PR libstdc++/85494 use rdseed and rand_s in std::random_device
824 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
825 the assembler supports rdseed.
826 * config.h.in: Regenerate.
827 * configure: Regenerate.
828 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
829 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
830 * doc/html/*: Regenerate.
831 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
832 * include/bits/random.h (random_device::random_device()): Always call
833 _M_init rather than _M_init_pretr1.
834 (random_device::random_device(const string&)): Likewise.
835 (random_device::operator()()): Always call _M_getval().
836 (random_device::_M_file): Replace first member of union with an
837 anonymous struct, with _M_file as its first member.
838 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
839 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
840 (USE_MT19937): Define if none of the above are defined.
841 (USE_POSIX_FILE_IO): Define.
842 (_M_strtoul): Remove.
843 [USE_RDSEED] (__x86_rdseed): Define new function.
844 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
845 (random_device::_M_init(const string&)): Initialize new union members.
846 Add support for "rdseed" and "rand_s" tokens. Decide what the
847 "default" token does according to which USE_* macros are defined.
848 [USE_POSIX_FILE_IO]: Store a file descriptor.
849 [USE_MT19937]: Forward to _M_init_pretr1 instead.
850 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
851 code from _M_strtoul.
852 [!USE_MT19937]: Call _M_init, transforming the old default token or
853 numeric tokens to "default".
854 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
855 (random_device::_M_getval()): Use new union members to obtain a
856 random number from the stored function pointer or file descriptor.
857 [USE_MT19937]: Obtain a value from the mt19937 engine.
858 (random_device::_M_getval_pretr1()): Call _M_getval().
859 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
861 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
862 * testsuite/26_numerics/random/random_device/85494.cc: New test.
864 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
867 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
868 _M_split_cmpts() for a path with multiple components.
869 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
870 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
871 components and reserve space in vector. Return early when there is
873 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
874 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
876 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
877 form of std::equals for C++11 compatibility.
879 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
881 * doc/xml/manual/appendix_contributing.xml: Update pointer to
882 C++ standard at ansi.org.
884 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
886 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
887 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
890 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
891 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
893 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
895 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
897 * testsuite/20_util/function_objects/invoke/3.cc: New test.
898 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
899 "compile" test to "run".
901 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
902 * doc/html/*: Regenerate.
903 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
904 rvalue aliasing constructor.
905 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
906 (reinterpret_pointer_cast): Add overloads taking rvalues.
907 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
908 Add rvalue aliasing constructor.
909 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
910 "run" and check return values as well as types.
911 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
912 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
913 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
914 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
917 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
918 * doc/xml/manual/intro.xml: Likewise.
919 * include/std/future (__create_task_state): Add default arguments
920 to make providing an allocator optional.
921 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
922 instead of delegating to another constructor.
923 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
924 define allocator-extended constructors for C++17 and later.
925 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
927 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
928 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
929 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
931 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
933 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
934 Don't run the libstdc++/83237 part on simulator targets.
936 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
938 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
940 * doc/html/*: Regenerate.
942 * include/experimental/any (__any_caster): Use RTTI if comparing
943 addresses fails, to support non-unique addresses in shared libraries.
944 * include/std/any (__any_caster): Likewise.
947 * include/experimental/any (__any_caster): Constrain to only be
948 callable for object types. Use remove_cv_t instead of decay_t.
949 If the type decays or isn't copy constructible, compare the manager
950 function to a dummy specialization.
951 (__any_caster): Add overload constrained for non-object types.
952 (any::_Manager_internal<_Op>): Add dummy specialization.
953 * testsuite/experimental/any/misc/any_cast.cc: Test function types
956 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
959 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
960 reversed arguments to uninitialized_copy_n.
961 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
962 is unchanged by copy assignment.
963 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
964 compare path components.
967 * include/experimental/memory_resource: Add system header pragma and
968 do not define anything unless compiled as C++14 or later.
969 (__resource_adaptor_common::__guaranteed_alignment): Remove.
970 (__resource_adaptor_imp::do_allocate): If the requested alignment
971 is a fundamental alignment then either allocate directly from _M_alloc
972 or call the new _M_allocate function.
973 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
974 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
975 of the allocator rebound to a POD type with the specified alignment.
976 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
977 * testsuite/experimental/memory_resource/new_delete_resource.cc:
978 Adjust expected allocation sizes.
979 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
980 xfail for Solaris x86.
982 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
984 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
985 * include/pstl/execution_defs.h (__enable_if_execution_policy):
986 Use std::__remove_cvref_t when building with GCC.
988 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
991 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
992 Use "additional_flags" to pass -ltbb to v3_target_compile command.
993 Use check_v3_target_prop_cached to cache the result of the test.
995 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
997 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1000 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1001 Changed v3_target_compile check from preprocess to executable.
1002 Added "-ltbb" to v3_target_compile flags.
1004 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1006 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1007 Add check for Thread Building Blocks 2018 or later.
1009 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1011 * testsuite/experimental/names.cc: Only include Networking TS headers
1012 on targets with the necessary Gthreads support.
1014 2019-05-20 Marek Polacek <polacek@redhat.com>
1016 CWG 2094 - volatile scalars are trivially copyable.
1018 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1019 result for volatile int.
1021 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1023 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1024 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1027 PR c++/90532 Ensure __is_constructible(T[]) is false
1028 * include/std/type_traits (__do_is_default_constructible_impl)
1029 (__is_default_constructible_atom, __is_default_constructible_safe):
1031 (is_default_constructible): Use is_constructible.
1032 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1033 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1034 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1035 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1038 2019-05-20 Pádraig Brady <pbrady@fb.com>
1040 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1041 to the deallocator with -fsized-deallocation.
1043 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1045 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1046 test by passing correct alignment to deallocate function.
1048 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1051 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1052 Raise exception if unique_ptr tuple member has unknown structure.
1053 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1054 Adjust worker to support new __uniq_ptr_data base class. Do not
1055 assume field called _M_head_impl is the first tuple element.
1057 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1059 * include/bits/stl_deque.h
1060 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1061 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1062 (_Deque_base::_Deque_impl_data): New.
1063 (_Deque_base::_Deque_impl): Inherit latter.
1064 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1065 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1066 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1067 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1068 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1069 (deque<>::deque()): Default.
1070 (deque<>::deque(deque&&)): Default.
1071 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1072 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1073 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1074 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1075 _M_range_initialize.
1076 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1077 (deque<>::resize(size_type, const value_type&)): Share a single
1079 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1080 _M_range_insert_aux.
1081 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1082 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1083 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1084 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1086 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1089 * include/std/variant (holds_alternative, get, get_if): Improve
1090 static assertion messages.
1091 (bad_variant_access::bad_variant_access()): Change default message.
1092 (__throw_bad_variant_access(bool)): New overload.
1093 (get): Use new overload.
1094 (visit, visit<R>): Improve exception message.
1096 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1097 targets. Add more cases from P0608R3.
1098 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1100 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1101 * include/experimental/type_traits (is_detected_exact)
1102 (is_detected_exact_v): Likewise.
1103 * include/pstl/execution_defs.h (is_execution_policy)
1104 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1105 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1106 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1107 * testsuite/experimental/names.cc: New test.
1110 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1111 assertions from the destructor.
1112 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1113 Move static_assert for hash function to here.
1114 (_Hash_table_base::_M_equals): Move static_assert for equality
1116 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1118 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1119 the value directly instead of calling _S_value.
1120 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1121 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1122 _S_key(_Const_Link_type).
1123 * testsuite/23_containers/set/85965.cc: Check construction,
1124 destruction, assignment and size() do not trigger the assertions.
1125 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1126 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1128 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1129 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1130 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1131 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1132 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1133 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1134 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1136 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1137 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1140 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1142 * doc/html/*: Regenerate.
1143 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1144 of decay_t (P0777R1).
1146 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1148 Move from state of allocators (LWG2593)
1149 * include/bits/stl_deque.h
1150 (_Deque_base(_Deque_base&&, false_type)): Remove.
1151 (_Deque_base(_Deque_base&&, true_type)): Remove.
1152 (_Deque_base(_Deque_base&&)): Adapt.
1153 (_Deque_base::_M_move_impl()): Remove.
1154 * testsuite/util/testsuite_allocator.h
1155 (propagating_allocator(propagating_allocator&&)): Preserve move from
1157 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1159 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1161 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1162 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1163 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1165 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1167 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1168 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1170 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1172 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1174 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1176 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1178 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1180 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1182 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1185 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1187 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1188 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1190 * include/std/variant (__overload_set): Remove.
1192 (_Build_FUN): New class template to define a single FUN overload,
1193 with specializations to prevent unwanted conversions, as per P0608R3.
1194 (_Build_FUNs): New class template to build an overload set of FUN.
1195 (_FUN_type): New alias template to perform overload resolution.
1196 (__accepted_type): Use integer_constant base for failure case. Use
1197 _FUN_type for successful case.
1198 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1199 (variant::variant(_Tp&&)): Likewise.
1200 (variant::operator=(_Tp&&)): Likewise.
1202 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1203 Replace raw visitation with a runtime check for the valueless state
1204 and a non-raw visitor.
1205 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1206 (variant::index()): Remove branch.
1207 (variant::swap(variant&)): Use valueless_by_exception() instead of
1208 comparing the index to variant_npos, and add likelihood attribute.
1210 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1211 (_Hashtable_base::_Equal_hash_code): Define new class template.
1212 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1215 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1216 Replace with _M_get non-static member function.
1217 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1219 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1220 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1222 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1223 _S_get accessors for members in EBO helpers.
1224 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1225 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1227 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1229 (_Hashtable_base::_M_eq()): Remove non-const overload.
1231 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1233 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1235 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1237 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1240 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1242 * config/os/solaris/solaris2.10: Move to ...
1243 * config/os/solaris: ... this.
1244 * configure.host (os_include_dir): Adapt.
1245 (abi_baseline_pair): Remove Solaris 10 handling.
1246 * config/abi/post/i386-solaris2.10: Remove.
1247 * config/abi/post/sparc-solaris2.10: Remove.
1248 * config/abi/post/i386-solaris2.11: Rename to ...
1249 * config/abi/post/i386-solaris: ... this.
1250 * config/abi/post/sparc-solaris2.11: Rename to ...
1251 * config/abi/post/sparc-solaris: ... this.
1253 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1256 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1259 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1261 * include/std/variant (__visit_with_index): Remove typedef.
1262 (__deduce_visit_result): New tag type.
1263 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1264 visitation of possibly-valueless variants, forwarding to __do_visit
1265 with the relevant tag type.
1266 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1267 and make lambda return void.
1268 (__variant_construct): Likewise.
1269 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1270 __raw_idx_visit and make lambda return void.
1271 (_Multi_array::__untag_result): Add metafunction to check the function
1272 pointer type for a tag type that dictates the kind of visitation.
1273 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1274 Use decltype(auto) instead of tagged function pointer type.
1275 (__gen_vtable_impl): Remove bool non-type parameter and unused
1276 _Variant_tuple parameter.
1277 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1278 (__gen_vtable_impl::__do_visit_invoke): Remove.
1279 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1280 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1281 for the visit<R> case, rather than dispatching to separate functions.
1282 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1284 (variant::swap): Likewise.
1285 (__do_visit): Replace two non-type template parameters with a single
1286 type parameter, so that the caller must specify the visitor's return
1287 type (or one of the tag types).
1288 (visit): Deduce a return type from the visitor and use the
1289 __deduce_visit_result tag to enforce that all overloads return the
1291 (visit<R>): Call __do_visit<R> with explicit result type.
1292 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1295 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1297 nonesuch is insufficiently useless (lwg2996)
1298 * include/std/type_traits (struct __nonesuch): Added private base
1299 class to make __nonesuch not an aggregate and removed deleted default
1301 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1302 (operator=(const pair&)): Use __nonesuch instead of
1303 __nonesuch_no_braces.
1304 (operator=(pair&&)): Likewise
1305 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1306 of __nonesuch_no_braces.
1307 (operator=(tuple&&)): Likewise
1308 * include/experimental/type_traits (struct nonesuch): Added private
1309 base class to make nonesuch not an aggregate and removed deleted
1310 default constructor.
1311 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1312 * testsuite/experimental/type_traits/nonesuch.cc: New.
1314 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1316 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1317 (_Function_handler): Remove partial specializations for void return
1318 types and pointers to member.
1319 (_Function_handler::_M_manager): Adapt to removal of
1320 _Simple_type_wrapper.
1321 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1322 * include/std/functional (_Bind_result::__enable_if_void)
1323 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1324 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1326 * include/std/future (__future_base::_Task_state::_M_run)
1327 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1328 change return type of lambda expressions.
1330 * include/bits/invoke.h (__invoke_r): Define new function implementing
1331 the INVOKE<R> pseudo-function.
1332 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1333 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1335 * include/std/type_traits (__is_nt_convertible_helper): Define it
1336 unconditionally, not only for C++20.
1337 (__is_nothrow_convertible): Define internal trait for use in C++11.
1338 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1339 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1340 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1341 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1342 that has nothrow explicit conversion but potentially-throwing implicit
1344 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1345 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1346 function to only consider implicit conversions.
1347 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1349 * include/std/iterator: Include <iosfwd> instead of <istream> and
1352 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1353 Remove unused, non-standard function.
1355 * include/bits/regex.h (match_results::max_size()): Adjust return
1356 value to account for prefix/suffix/unmatched subs.
1357 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1358 reset the contained sub matches.
1359 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1360 function to set result state following a failed match.
1361 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1362 sub_match states after _M_resize. Use _M_establish_failed_match.
1365 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1366 Replace single _Callable parameter with variadic _Args pack, to
1367 forward them directly to the tuple of decayed copies.
1368 * testsuite/30_threads/thread/cons/69724.cc: New test.
1370 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1372 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1373 * include/bits/basic_string.h: (operator=(const basic_string&):
1374 Move allocator decision to assign.
1375 (assign(const basic_string&)): Move allocator decision here.
1376 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1378 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1381 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1383 * testsuite/util/testsuite_allocator.h (memory_resource)
1384 (default_resource_mgr): Fix indentation.
1386 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1387 Use operator-> to access raw pointer member.
1388 * testsuite/23_containers/vector/59829.cc: Likewise.
1389 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1390 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1391 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1393 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1394 its constructors and equality operators. Change converting
1395 constructors to use operator-> to access private member of the other
1397 (PointerBase_void::operator->()): Add, for access to private member.
1398 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1399 (operator==(PointerBase, PointerBase)): Remove.
1400 (operator!=(PointerBase, PointerBase)): Remove.
1402 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1403 not assume field called _M_head_impl is the first tuple element.
1404 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1405 implementation more accurate.
1406 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1407 empty pointer type and non-empty deleter.
1409 LWG 2899 - Make is_move_constructible correct for unique_ptr
1410 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1411 move assignment operator.
1412 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1413 (__uniq_ptr_data): New class template with conditionally deleted
1415 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1416 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1417 constructor and move assignment operator as defaulted.
1418 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1419 __uniq_ptr_impl::release().
1420 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1421 to __uniq_ptr_impl::reset(pointer).
1422 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1423 Check for new __uniq_ptr_data type.
1424 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1426 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1428 PR libstdc++/90454.cc path construction from void*
1429 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1430 pointers to void are rejected as well as void.
1431 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1432 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1434 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1436 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1437 <remark> elements. Fix formatting of bibliography references.
1439 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1441 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1443 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1445 Remove Profile Mode, deprecated since 7.1.0
1446 * doc/Makefile.am: Remove XML file for profile mode docs.
1447 * doc/Makefile.in: Regenerate.
1448 * doc/xml/authors.xml: Remove authors of profile mode docs.
1449 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1451 * doc/xml/manual/debug.xml: Likewise.
1452 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1453 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1454 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1455 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1457 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1459 * doc/html/*: Regenerate.
1460 * include/Makefile.am: Remove profile mode headers.
1461 * include/Makefile.in: Regenerate.
1462 * include/bits/c++config (std::__profile): Remove namespace.
1463 [_GLIBCXX_PROFILE]: Remove checks for macro.
1464 * include/profile/array: Remove.
1465 * include/profile/base.h: Remove.
1466 * include/profile/bitset: Remove.
1467 * include/profile/deque: Remove.
1468 * include/profile/forward_list: Remove.
1469 * include/profile/impl/profiler.h: Remove.
1470 * include/profile/impl/profiler_algos.h: Remove.
1471 * include/profile/impl/profiler_container_size.h: Remove.
1472 * include/profile/impl/profiler_hash_func.h: Remove.
1473 * include/profile/impl/profiler_hashtable_size.h: Remove.
1474 * include/profile/impl/profiler_list_to_slist.h: Remove.
1475 * include/profile/impl/profiler_list_to_vector.h: Remove.
1476 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1477 * include/profile/impl/profiler_node.h: Remove.
1478 * include/profile/impl/profiler_state.h: Remove.
1479 * include/profile/impl/profiler_trace.h: Remove.
1480 * include/profile/impl/profiler_vector_size.h: Remove.
1481 * include/profile/impl/profiler_vector_to_list.h: Remove.
1482 * include/profile/iterator_tracker.h: Remove.
1483 * include/profile/list: Remove.
1484 * include/profile/map: Remove.
1485 * include/profile/map.h: Remove.
1486 * include/profile/multimap.h: Remove.
1487 * include/profile/multiset.h: Remove.
1488 * include/profile/ordered_base.h: Remove.
1489 * include/profile/set: Remove.
1490 * include/profile/set.h: Remove.
1491 * include/profile/unordered_base.h: Remove.
1492 * include/profile/unordered_map: Remove.
1493 * include/profile/unordered_set: Remove.
1494 * include/profile/vector: Remove.
1495 * scripts/run_doxygen: Do not process profile mode headers.
1496 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1498 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1499 Remove dg-skip-if for profile mode.
1500 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1501 preprocessor check for profile mode.
1502 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1503 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1505 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1507 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1508 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1509 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1510 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1511 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1513 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1515 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1517 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1519 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1520 preprocessor check for profile mode.
1521 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1523 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1524 Remove dg-skip-if for profile mode.
1525 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1526 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1527 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1528 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1529 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1530 * testsuite/Makefile.am: Remove profile_flags variable and
1531 * testsuite/Makefile.am: Remove profile_flags variable and
1532 check-profile target.
1533 * testsuite/Makefile.in: Regenerate.
1534 * testsuite/ext/profile/all.cc: Remove.
1535 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1536 * testsuite/ext/profile/profiler_algos.cc: Remove.
1537 * testsuite/ext/profile/replace_new.cc: Remove.
1538 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1539 preprocessor check for profile mode.
1540 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1541 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1542 (check_v3_target_normal_mode): Do not check for profile mode macro.
1543 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1545 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1546 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1547 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1548 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1549 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1550 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1551 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1552 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1553 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1554 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1556 Remove array_allocator extension, deprecated since 4.9.0
1557 * doc/xml/manual/allocator.xml: Remove documentation for
1559 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1560 * doc/xml/manual/using.xml: Remove header from documentation.
1561 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1562 * include/Makefile.in: Regenerate.
1563 * include/ext/array_allocator.h: Remove.
1564 * include/precompiled/extc++.h: Do not include removed header.
1565 * testsuite/ext/array_allocator/1.cc: Remove.
1566 * testsuite/ext/array_allocator/2.cc: Remove.
1567 * testsuite/ext/array_allocator/26875.cc: Remove.
1568 * testsuite/ext/array_allocator/3.cc: Remove.
1569 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1570 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1571 * testsuite/ext/array_allocator/check_new.cc: Remove.
1572 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1573 * testsuite/ext/headers.cc: Do not include removed header.
1575 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1577 * include/bits/stl_bvector.h
1578 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1580 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1582 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1584 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1586 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1588 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1590 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1592 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1594 (_Bit_iterator::operator-(difference_type)): Likewise.
1595 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1596 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1598 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1599 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1601 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1604 * testsuite/util/thread/all.h: Do not use remove_pointer for
1605 std::thread::native_handle_type.
1608 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1609 (_Variant_storage<true, Types...>::_M_reset()))
1610 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1611 (__get_storage): Likewise.
1612 (variant): Add noexcept to friend declarations for __get and
1616 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1617 Use _Require for constraints.
1618 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1620 (__uniq_ptr_hash): New base class with conditionally-disabled call
1622 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1623 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1624 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1626 * include/bits/shared_ptr.h: Improve docs.
1627 * include/bits/shared_ptr_base.h: Likewise.
1628 * include/bits/stl_uninitialized.h: Likewise.
1629 * include/bits/unique_ptr.h: Likewise.
1630 * libsupc++/new: Likewise.
1632 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1634 * include/bits/stl_deque.h
1635 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1637 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1639 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1641 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1643 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1645 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1647 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1649 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1651 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1654 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1655 (test01): Reserve for number of insertions to avoid rehash during test.
1656 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1658 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1663 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1665 * include/experimental/bits/fs_path.h: Improve docs.
1666 * include/experimental/bits/net.h: Fix wrong header name in comment.
1667 Do not document implementation details.
1668 * include/experimental/netfwd: Fix doxygen grouping.
1670 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1672 * include/bits/stl_pair.h: Improve docs.
1673 * include/std/tuple: Likewise.
1675 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1677 * include/std/chrono: Improve docs.
1678 * include/std/ratio: Do not document implementation details.
1679 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1681 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1684 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1685 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1686 (__duration_common_type): New helper.
1687 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1688 __duration_common_type.
1689 (__timepoint_common_type_wrapper): Replace with ...
1690 (__timepoint_common_type): New helper.
1691 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1692 Use __time_point_common_type.
1693 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1694 (__common_type_impl): If either argument is transformed by decay,
1695 use the common_type of the decayed types.
1696 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1697 decayed, use __do_common_type_impl to get the common_type.
1698 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1699 (__do_member_type_wrapper, __member_type_wrapper)
1700 (__expanded_common_type_wrapper): Remove.
1701 (__common_type_pack, __common_type_fold): New helpers.
1702 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1703 __member_type_wrapper and __expanded_common_type_wrapper.
1704 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1705 Test zero-length template argument list.
1706 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1707 Test single argument cases and argument types that should decay.
1708 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1709 Adjust expected error.
1710 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1712 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1713 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1714 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1716 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1718 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1720 Make allocator propagation more consistent for
1721 operator+(basic_string) (P1165R1)
1722 * include/bits/basic_string.h
1723 (operator+(basic_string&&, basic_string&&): Changed resulting
1724 allocator to always be the one from the first parameter.
1725 * include/bits/basic_string.tcc
1726 (operator+(const _CharT*, const basic_string&)): Changed
1727 resulting allocator to be SOCCC on the second parameter's allocator.
1728 (operator+(_CharT, const basic_string&)): Likewise.
1729 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1731 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1734 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1736 * include/bits/regex.h: Improve docs.
1737 * include/bits/regex.tcc: Do not document implementation details.
1739 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1741 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1743 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1744 Add type printer for container types in std::__debug namespace.
1745 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1746 (gdb-tests): Use distinct parameters for the type of test and use of
1748 (gdb-test): Check for regex test even if 'whatis' test.
1749 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1751 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1752 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1753 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1754 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1755 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1756 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1757 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1759 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1761 * include/std/system_error (error_category): Fix comment.
1764 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1765 argument is an empty path.
1766 (absolute(const path&, error_code&)): Use invalid_argument as error
1767 code instead of no_such_file_or_directory.
1768 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1769 of non-existent paths and empty paths with both overloads of absolute.
1771 * include/std/system_error (error_category, error_code)
1772 (error_condition): Improve docs.
1773 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1774 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1775 to class documentation. Suppress documentation for implementation
1777 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1778 Suppress documentation for implementation details.
1780 * include/std/system_error (error_code): Remove friend declaration
1781 for hash<error_code>.
1782 (hash<error_code>::operator()): Use public member functions to access
1784 (hash<error_condition>::operator()): Use address of category, not
1785 its object representation.
1786 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1787 Use public member functions to access value and category.
1788 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1790 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1792 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1793 * include/bits/hashtable_policy.h
1794 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1795 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1796 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1797 smaller than input value rather than always greater. Preserve
1798 _M_next_resize if called with 0 input. Use __builtin_floorl.
1799 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1800 elements + number of insertions is greater than _M_next_resize. Start
1801 with 11 buckets if not told otherwise. Use __builtin_floorl.
1802 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1803 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1804 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1805 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1806 told otherwise. Use __builtin_floorl.
1807 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1808 to also validate _Power2_rehash_policy.
1809 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1812 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1815 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1819 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1820 overflow warning with -Wpedantic -Wsystem-headers.
1822 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1825 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1826 * include/bits/move.h (swap): Remove extra parentheses.
1828 * include/experimental/bits/lfts_config.h: Improve doc markup.
1829 * include/experimental/optional: Improve docs.
1830 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1831 (__constexpr_addressof): Remove.
1832 (optional::operator->()): Use std::__addressof().
1833 * include/std/optional (optional::operator->()): Adjust whitespace.
1834 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1835 that operator-> is still constexpr with overloaded operator&. Change
1836 to compile-only test.
1837 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1840 * include/bits/shared_ptr.h: Improve docs.
1841 * include/bits/shared_ptr_atomic.h: Likewise.
1842 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1844 * include/bits/basic_string.h: Fix iterator/index confusion in
1846 * include/bits/range_access.h: Fix Doxygen warnings.
1847 * include/bits/refwrap.h: Do not document implementation details.
1848 (ref, cref): Group docs with reference_wrapper.
1849 * include/std/fstream: Fix Doxygen markup.
1850 * libsupc++/initializer_list (begin, end): Group docs with
1853 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1855 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1856 * include/std/mutex: Likewise.
1857 * include/std/shared_mutex: Likewise.
1859 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1860 * include/bits/fs_fwd.h: Likewise.
1861 * include/bits/fs_ops.h: Likewise.
1862 * include/bits/fs_path.h: Likewise.
1863 * include/std/filesystem: Likewise.
1865 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1866 * include/experimental/buffer: Likewise.
1867 * include/experimental/executor: Likewise.
1868 * include/experimental/internet: Likewise.
1869 * include/experimental/io_context: Likewise.
1870 * include/experimental/net: Likewise.
1871 * include/experimental/netfwd: Likewise.
1872 * include/experimental/socket: Likewise.
1873 * include/experimental/timer: Likewise.
1875 * doc/doxygen/doxygroups.cc: Move description of experimental group
1877 * include/experimental/algorithm: Add to libfund-ts doc group.
1878 * include/experimental/any: Likewise. Do not document implementation
1880 * include/experimental/array: Add to libfund-ts doc group.
1881 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1882 for Library Fundamentals.
1883 * include/experimental/chrono: Add to libfund-ts doc group.
1884 * include/experimental/deque: Likewise.
1885 * include/experimental/forward_list: Likewise.
1886 * include/experimental/functional: Likewise.
1887 * include/experimental/iterator: Likewise.
1888 * include/experimental/list: Likewise.
1889 * include/experimental/map: Likewise.
1890 * include/experimental/memory: Likewise.
1891 * include/experimental/memory_resource: Likewise. Improve docs.
1893 * include/experimental/numeric: Add to libfund-ts doc group.
1894 * include/experimental/optional: Likewise.
1895 * include/experimental/propagate_const: Likewise.
1896 * include/experimental/random: Likewise.
1897 * include/experimental/ratio: Likewise.
1898 * include/experimental/regex: Likewise.
1899 * include/experimental/set: Likewise.
1900 * include/experimental/source_location: Likewise.
1901 * include/experimental/string: Likewise.
1902 * include/experimental/string_view: Likewise.
1903 * include/experimental/system_error: Likewise.
1904 * include/experimental/tuple: Likewise.
1905 * include/experimental/type_traits: Likewise.
1906 * include/experimental/unordered_map: Likewise.
1907 * include/experimental/unordered_set: Likewise.
1908 * include/experimental/utility: Likewise.
1909 * include/experimental/vector: Likewise.
1910 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1911 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1912 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1914 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1915 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1916 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1917 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1918 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1920 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1921 * include/experimental/bits/fs_fwd.h: Improve docs.
1922 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1923 * include/experimental/bits/fs_path.h: Likewise.
1924 (path, filesystem_error, u8path): Improve docs.
1925 * include/experimental/filesystem: Link to docs for TS.
1927 * config/allocator/new_allocator_base.h (__allocator_base): Add
1928 workaround for Doxygen bug #6945.
1929 * include/std/memory: Improve docs. Define group for pointer safety.
1930 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1931 conditional to suppress documentation for implementation details.
1933 * include/bits/specfun.h: Improve docs.
1934 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1937 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1938 (std::experimental): Add docs.
1939 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1940 namespace to nothing when generating docs.
1941 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1942 * include/std/chrono (std::chrono): Likewise.
1943 * include/std/functional (std::placeholders): Likewise.
1944 * include/std/thread (std::this_thread): Likewise.
1946 * include/parallel/settings.h: Fix Doxygen markup.
1948 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1949 anything unless PB_DS_CLASS_C_DEC is defined.
1950 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1951 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1952 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1953 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1954 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1955 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1956 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1958 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1959 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1960 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1961 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1962 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1963 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1964 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1965 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1966 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1967 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1968 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1970 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1971 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1973 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1976 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1977 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1978 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1981 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1983 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1984 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1985 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1986 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1987 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1988 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1990 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1991 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1994 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1997 * include/std/complex (__complex_proj): Return parameter unchanged.
1998 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1999 floating-point types to take std::complex arguments.
2000 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2001 floating-point types.
2002 * testsuite/26_numerics/complex/proj.cc: New test.
2004 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2006 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2007 to _Lock_policyE[012].
2008 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2010 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2012 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2013 macros accidentally left in.
2014 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2015 unnecessary -lstdc++fs option. Fix test for mingw.
2016 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2019 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2021 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2023 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2025 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2027 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2028 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2031 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2033 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2036 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2037 class template and partial specialization.
2040 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2042 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2043 functions to convert a value to an integral type.
2044 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2045 (fill_n): Convert _Size parameter to an integral type.
2046 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2047 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2048 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2049 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2050 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2051 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2053 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2055 Adding noexcept-specification on tuple constructors (LWG 2899)
2056 * libstdc++-v3/include/std/tuple:
2057 (tuple()): Add noexcept-specification.
2058 (tuple(const _Elements&...)): Likewise
2059 (tuple(_UElements&&...)): Likewise
2060 (tuple(const tuple<_UElements...>&)): Likewise
2061 (tuple(tuple<_UElements...>&&)): Likewise
2062 (tuple(const _T1&, const _T2&)): Likewise
2063 (tuple(_U1&&, _U2&&)): Likewise
2064 (tuple(const tuple<_U1, _U2>&): Likewise
2065 (tuple(tuple<_U1, _U2>&&): Likewise
2066 (tuple(const pair<_U1, _U2>&): Likewise
2067 (tuple(pair<_U1, _U2>&&): Likewise
2068 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2070 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2073 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2074 arguments with __restrict.
2076 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2078 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2080 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2082 * include/experimental/bits/fs_path.h
2083 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2084 avoid redundant call to _S_convert_loc with non-const pointers.
2086 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2087 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2088 * testsuite/21_strings/basic_string/hash/hash.cc
2089 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2090 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2091 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2093 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2094 wstring::_M_replace_dispatch with more specific patterns.
2095 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2096 Create const std::string to avoid redundant call to _S_convert_loc
2097 with non-const pointers.
2098 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2099 avoid unnecessary basic_string::assign instantiations.
2101 * include/std/memory (__uses_alloc_args): Add string-literal to
2102 static_assert, to match the one in __uses_alloc.
2103 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2104 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2105 for recursive uses-allocator construction of nested pairs.
2106 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2109 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2111 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2112 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2113 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2114 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2116 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2117 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2118 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2119 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2120 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2121 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2122 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2124 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2127 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2128 * include/std/scoped_allocator [__cplusplus > 201703L]
2129 (scoped_allocator_adaptor::construct): Define in terms of
2130 uses_allocator_construction_args, as per P0591R4.
2131 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2132 * testsuite/util/testsuite_allocator.h: Remove name of unused
2135 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2137 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2138 * doc/html/*: Regenerate.
2140 * include/bits/fs_path.h (operator<, operator<=, operator>)
2141 (operator>=, operator==, operator!=): Make hidden friends, as per
2143 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2144 string type in test.
2145 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2147 * include/std/any (any::any(ValueType&&)): Use __and_v.
2148 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2151 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2153 * include/std/type_traits (__result_of_memfun): Use remove_reference
2154 instead of __remove_cvref_t and remove redundant is_same check.
2155 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2157 * include/experimental/string_view (basic_string_view::pointer)
2158 (basic_string_view::reference): Fix to refer to non-const value_type.
2159 * include/bits/basic_string.h (basic_string): Use __sv_check and
2160 __sv_limit instead of basic_string_view::_M_check and
2161 basic_string_view::_M_limit.
2162 * include/std/string_view (__sv_check, __sv_limit): New
2163 helper functions to replace basic_string_view::_M_check and
2164 basic_string_view::_M_limit.
2165 (basic_string_view): Add static assertions to enforce ill-formed
2166 requirement for traits_type::char_type from P1148R0, and to enforce
2167 required properties of char-like types.
2168 (basic_string_view::pointer, basic_string_view::reference): Fix to
2169 refer to non-const value_type.
2170 (basic_string_view::operator[], basic_string_view::at)
2171 (basic_string_view::front, basic_string_view::back)
2172 (basic_string_view::data): Use const_reference and const_pointer
2173 typedefs for return types.
2174 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2175 (hash<wstring_view>): Fix argument_type typedef.
2176 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2177 char/1.cc: Fix expected return type of basic_string_view::data().
2178 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2179 wchar_t/1.cc: Likewise.
2180 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2181 char/1.cc: Likewise.
2182 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2183 wchar_t/1.cc: Likewise.
2184 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2186 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2187 Check reference and pointer typedefs.
2188 * testsuite/experimental/string_view/requirements/typedefs.cc:
2190 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2191 Fix expected return type of basic_string_view::data().
2192 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2194 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2196 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2200 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2201 Avoid a runtime check for types that can never be stored in std::any.
2202 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2205 PR libstdc++/90220 (partial)
2206 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2207 not attempt ill-formed static_cast to pointers to non-object types.
2208 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2211 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2212 prevent -Wcatch-value warning.
2214 * include/std/variant (__variant_construct): Use template parameter
2215 type instead of equivalent decltype-specifier.
2216 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2217 Replace forward with move.
2218 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2219 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2220 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2221 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2222 index after construction succeeds.
2223 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2224 if-constexpr checks that are always true. Use __remove_cvref_t instead
2225 of remove_reference so that is_nothrow_move_constructible check
2226 doesn't use a const rvalue parameter. In the potentially-throwing case
2227 construct a temporary and move assign it, as per LWG 2904.
2228 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2229 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2230 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2231 construct a temporary and move assign from it, as per LWG 2904.
2232 * testsuite/20_util/variant/exception_safety.cc: Check that
2233 assignment operators have strong exception safety guarantee.
2235 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2237 Document PSTL linker flags
2239 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2241 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2243 * include/std/variant (__detail::__variant::_Traits): Make
2244 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2245 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2247 (__detail::__variant::_Copy_assign_alias): Only depend on
2248 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2249 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2250 move assignment operators.
2253 * include/std/variant (variant::__not_self): New helper for the
2254 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2255 (variant::__to_type_impl): Remove.
2256 (variant::__to_type): Add default argument to check pack size, instead
2257 of using __to_type_impl.
2258 (variant::__accepted_type): Add default argument using __not_self.
2259 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2260 for variant(T&&) constructor constraint.
2261 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2262 Extract __accepted_type into a named template parameter for reuse in
2263 other constraints and in the exception specification.
2264 (variant::variant(in_place_type_t<T>, Args&&...))
2265 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2266 (variant::variant(in_place_index_t<T>, Args&&...))
2267 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2268 (variant::operator=T&&)): Remove redundant && from trait arguments.
2269 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2270 isn't used for in_place_type or in_place_index arguments.
2272 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2273 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2274 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2276 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2277 Bernd Edlinger <bernd.edlinger@hotmail.de>
2278 Jakub Jelinek <jakub@redhat.com>
2281 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2282 general-regs-only target attribute for ARM.
2284 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2287 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2288 specialization also depend on is_nothrow_move_constructible.
2289 * include/std/variant (__detail::__variant::__never_valueless()):
2290 Only true if the variant would have a move assignment operator.
2291 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2292 Check __never_valueless<T...>().
2293 (variant::emplace): Only perform non-throwing move assignments
2294 for never-valueless alternatives if the variant has a move assignment
2296 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2297 types can be emplaced into non-assignable variants.
2298 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2299 don't get copied when emplaced into non-assignable variants.
2301 * include/std/variant (__detail::__variant::__ref_cast): Remove
2303 (__detail::__variant::_Uninitialized::_M_get)
2304 (__detail::__variant::__get)
2305 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2307 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2309 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2311 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2312 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2313 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2314 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2316 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2318 Delegate PSTL configuration to pstl/pstl_config.h
2320 * include/bits/c++config: Remove explicit PSTL configuration
2321 macros and use definitions from <pstl/pstl_config.h>.
2323 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2325 Cleanup algorithm implementations
2326 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2328 (mismatch): Forward execution policy.
2329 (equal): Qualify call to std::equal().
2330 (partial_sort): Forward execution policy.
2331 (inplace_merge): Forward execution policy.
2333 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2335 Improve implementation of parallel equal()
2336 * include/pstl/algorithm_impl.h
2337 (__internal::__brick_equal): use "4 iterator" version of
2339 (__internal::__brick_equal): use simd for random access
2340 iterators on unsequenced execution policies.
2341 (__internal::__pattern_equal): add "4 iterator" version
2342 (__internal::__pattern_equal): dispatch to simd __brick_equal
2343 for vector-only execution policies.
2344 (__internal::__pattern_equal): dispatch to __parallel_or for
2345 parallel execution policies.
2346 * include/pstl/glue_algorithm_impl.h
2347 (std::equal): dispatch to "4 iterator" version of
2348 __internal::__pattern_equal().
2350 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2353 * include/bits/forward_list.h (operator==): Do not use operator!= to
2355 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2356 earlier in the list, so that sort is stable.
2357 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2358 * testsuite/23_containers/forward_list/comparable.cc: Test with
2359 types that meet the minimum EqualityComparable and LessThanComparable
2360 requirements. Remove irrelevant comment.
2362 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2363 Do not depend on whether all alternative types are move constructible.
2364 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2365 from the operand when deciding whether to perform the assignment.
2366 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2367 with deleted move constructor and deleted move assignment operator.
2368 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2369 behaviour of variants with DeletedMoves as an alternative.
2370 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2371 (move_ctor, move_assign): Check that moving a variant with a
2372 DeletedMoves alternative falls back to copying instead of moving.
2374 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2375 from static_assert declarations.
2377 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2378 actually match its name.
2379 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2380 (test_swap()): Fix result for MoveCtorOnly and check
2381 MoveCtorAndSwapOnly.
2383 * include/std/optional (optional::value_or(U&&) &&): Add missing
2384 constexpr specifier.
2385 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2386 for disengaged optionals and rvalue optionals.
2387 * testsuite/20_util/optional/observers/4.cc: Likewise.
2389 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2391 * include/pstl/algorithm_impl.h: Uglify identfiers.
2392 * include/pstl/numeric_impl.h: Uglify identfiers.
2393 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2395 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2397 * include/bits/c++config:
2398 Add definition for __PSTL_ASSERT.
2399 Add definition for __PSTL_ASSERT_MSG.
2400 * include/pstl/algorithm_impl.h: Replace use of assert().
2401 * include/pstl/numeric_impl.h: Replace use of assert().
2402 * include/pstl/parallel_backend_tbb.h:
2403 Replace use of assert().
2404 Replace use of __TBB_ASSERT().
2405 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2407 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2410 * src/c++17/memory_resource.cc
2411 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2412 needed to allow placing a _Chunk at the end of the buffer.
2413 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2415 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2417 * doc/xml/faq.xml: Add information about emergency EH pool.
2418 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2419 Move outdated information on mt_allocator to a separate section.
2420 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2421 doesn't affect the default allocator.
2423 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2427 * testsuite/20_util/variant/89851.cc: New test.
2429 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2431 * include/std/variant: Adjust whitespace. Add comments.
2432 (_Multi_array): Leave primary template undefined.
2433 (_Multi_array<_Tp>): Define partial specialization for base case of
2435 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2436 which is always a reference.
2437 (__gen_vtable::_S_apply()): Remove function, inline body into
2438 default member initializer.
2439 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2441 * include/std/variant (__variant_idx_cookie): Add member type.
2442 (__visitor_result_type): Remove.
2443 (__do_visit): Use invoke_result instead of __visitor_result_type.
2444 * testsuite/20_util/variant/visit.cc: New test.
2447 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2449 * testsuite/20_util/variant/90008.cc: New test.
2451 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2453 * include/pstl/algorithm_impl.h: Add namespace qualification.
2454 * include/pstl/execution_defs.h: Add namespace qualification.
2455 * include/pstl/execution_impl.h: Add namespace qualification.
2456 * include/pstl/numeric_impl.h: Add namespace qualification.
2457 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2458 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2459 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2461 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2463 Fix visit<R> for variant.
2464 * include/std/variant (__do_visit): Add a template parameter
2465 for enforcing same return types for visit.
2466 (__gen_vtable_impl): Likewise.
2467 (_S_apply_single_alt): Adjust.
2468 (__visit_invoke_impl): New. Handle casting to void.
2469 (__do_visit_invoke): New. Enforces same return types.
2470 (__do_visit_invoke_r): New. Converts return types.
2471 (__visit_invoke): Adjust.
2472 (__gen_vtable): Add a template parameter for enforcing
2473 same return types for visit.
2474 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2475 different return types.
2476 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2477 visitors with different return types don't accidentally
2478 compile with regular visitation.
2480 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2482 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2483 dg-require-filesystem-ts.
2485 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2487 * doc/xml/manual/status_cxx2020.xml: Update status.
2488 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2489 * testsuite/20_util/variant/visit_r.cc: New test.
2491 * include/bits/fs_dir.h (directory_iterator::operator*)
2492 (directory_iterator::operator->): Add noexcept.
2493 (operator==, operator!=): Replace namespace-scope equality operators
2494 for directory iterators with hidden friends.
2497 * config/abi/pre/gnu.ver: Add missing exports.
2498 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2501 * config/abi/pre/gnu.ver: Export new symbols.
2502 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2503 (recursive_directory_iterator::recursion_pending())
2504 (recursive_directory_iterator::disable_recursion_pending()): Remove
2505 inline definitions. Make noexcept.
2506 (recursive_directory_iterator::depth())
2507 (recursive_directory_iterator::operator*())
2508 (recursive_directory_iterator::operator->()): Make noexcept.
2509 (recursive_directory_iterator::_M_options)
2510 (recursive_directory_iterator::_M_pending): Remove data members.
2511 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2512 (recursive_directory_iterator::recursive_directory_iterator): Remove
2513 ctor-initializer. Use new constructor for _Dir_stack.
2514 (recursive_directory_iterator::options())
2515 (recursive_directory_iterator::recursion_pending())
2516 (recursive_directory_iterator::disable_recursion_pending()): Add
2517 non-inline definitions.
2518 (recursive_directory_iterator::depth()): Make noexcept.
2519 (recursive_directory_iterator::increment(error_code&))
2520 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2521 location of options and recursion_pending members.
2522 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2523 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2524 user-declared move constructor and assignment operator, to make the
2527 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2528 d_type == DT_UNKNOWN immediately.
2529 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2531 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2533 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2535 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2536 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2539 PR libstdc++/87431 (again)
2540 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2541 Define partial specialization for basic_string.
2542 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2543 shared_ptr and weak_ptr.
2544 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2546 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2548 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2550 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2552 * include/std/any (_Never_valueless_alt): Define explicit
2553 specialization for any.
2554 * include/std/variant (_Never_valueless_alt): Define primary template.
2555 (__never_valueless): Use _Never_valueless_alt instead of
2556 is_trivially_copyable.
2557 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2558 initializations to avoid try-catch overhead. Add special case for
2559 scalars produced by potentially-throwing conversions. Use
2560 _Never_valueless_alt instead of is_trivially_copyable for the
2561 remaining strong exception-safety cases.
2562 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2563 * testsuite/20_util/variant/87431.cc: Run both test functions.
2564 * testsuite/20_util/variant/exception_safety.cc: New test.
2565 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2566 so the variant becomes valueless.
2568 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2571 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2573 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2575 * include/std/string (__hash_string_base): New class template defining
2576 operator() for hashing strings.
2577 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2578 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2579 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2580 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2582 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2584 Use single-visitation in variant assignment and swap and relops.
2585 Also use indices instead of types when checking whether
2586 variants hold the same thing.
2587 * include/std/variant (__do_visit): Add a template parameter
2588 for index visitation, invoke with indices if index visitation
2590 (__variant_idx_cookie): New.
2591 (__visit_with_index): Likewise.
2592 (_Copy_assign_base::operator=): Do single-visitation with
2594 (_Move_assign_base::operator=): Likewise.
2595 (_Extra_visit_slot_needed): Adjust.
2596 (__visit_invoke): Call with indices if it's an index visitor.
2597 (relops): Do single-visitation with an index visitor.
2599 (__visitor_result_type): New.
2601 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2603 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2605 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2607 Don't revisit a variant we are already visiting.
2608 * include/std/variant (__variant_construct_single): New.
2609 (__variant_construct): Use it.
2610 (_M_destructive_move): Likewise.
2611 (_M_destructive_copy): Likewise.
2612 (_Copy_assign_base::operator=): Adjust.
2613 (_Move_assign_base::operator=): Likewise.
2616 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2619 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2620 destructor so they are not evaluated until the _Key type is complete.
2621 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2622 * testsuite/23_containers/set/85965.cc: New test.
2623 * testsuite/23_containers/unordered_set/85965.cc: New test.
2624 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2625 with regexp matching the corresponding _Rb_tree specialization.
2626 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2627 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2628 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2629 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2630 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2631 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2632 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2634 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2637 Fix based on a suggestion by Antony Polukhin.
2638 * include/std/variant (__never_valueless): New.
2640 (_Extra_visit_slot_needed): New.
2641 (_Multi_array): Use it.
2642 (_S_apply_all_alts): Likewise.
2644 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2647 Fix based on a suggestion by Antony Polukhin.
2648 * include/std/variant (__gen_vtable): Don't reserve an
2649 additional table slot, _Multi_array already does that.
2651 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2654 Fix based on a suggestion by Antony Polukhin.
2655 * include/std/variant (__variant_construct): Capture a pointer
2656 to the storage and visit just one variant.
2658 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2660 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2661 Doxygen-generated pages with unstable URL.
2662 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2663 * doc/xml/manual/extensions.xml: Likewise.
2664 * doc/xml/manual/parallel_mode.xml: Likewise.
2665 * doc/xml/manual/support.xml: Likewise.
2667 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2668 avoid -Wconversion warnings.
2670 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2672 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2673 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2674 (allstamped): Add stamp-pstl.
2675 (install-headers): Add ptsl_builddir.
2676 * include/Makefile.in: Regenerate.
2677 * include/bits/c++config: Add pstl configuration.
2678 * include/pstl/LICENSE.txt: New file.
2679 * include/pstl/algorithm_fwd.h: New file.
2680 * include/pstl/algorithm_impl.h: New file.
2681 * include/pstl/execution_defs.h: New file.
2682 * include/pstl/execution_impl.h: New file.
2683 * include/pstl/glue_algorithm_defs.h: New file.
2684 * include/pstl/glue_algorithm_impl.h: New file.
2685 * include/pstl/glue_execution_defs.h: New file.
2686 * include/pstl/glue_memory_defs.h: New file.
2687 * include/pstl/glue_memory_impl.h: New file.
2688 * include/pstl/glue_numeric_defs.h: New file.
2689 * include/pstl/glue_numeric_impl.h: New file.
2690 * include/pstl/memory_impl.h: New file.
2691 * include/pstl/numeric_fwd.h: New file.
2692 * include/pstl/numeric_impl.h: New file.
2693 * include/pstl/parallel_backend.h: New file.
2694 * include/pstl/parallel_backend_tbb.h: New file.
2695 * include/pstl/parallel_backend_utils.h: New file.
2696 * include/pstl/parallel_impl.h: New file.
2697 * include/pstl/pstl_config.h: New file.
2698 * include/pstl/unseq_backend_simd.h: New file.
2699 * include/pstl/utils.h: New file.
2700 * include/std/algorithm: Include parallel algorithm implementations.
2701 * include/std/execution: New file.
2702 * include/std/memory: Include parallel algorithm implementations.
2703 * include/std/numeric: Include parallel algorithm implementations.
2704 * include/std/version: Add parallel algorithms feature test macro.
2705 * testsuite/util/pstl/pstl_test_config.h: New file.
2706 * testsuite/util/pstl/test_utils.h: New file.
2707 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2708 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2709 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2710 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2711 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2712 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2713 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2714 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2715 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2716 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2717 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2718 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2719 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2720 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2721 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2722 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2723 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2724 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2725 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2726 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2727 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2728 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2729 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2730 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2731 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2732 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2733 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2734 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2735 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2736 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2737 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2738 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2739 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2740 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2741 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2742 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2743 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2744 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2745 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2746 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2747 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2748 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2749 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2750 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2751 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2752 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2753 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2754 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2755 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2756 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2757 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2758 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2759 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2760 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2761 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2762 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2763 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2764 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2765 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2766 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2767 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2768 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2769 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2770 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2771 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2772 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2773 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2774 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2775 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2776 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2777 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2778 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2779 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2780 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2781 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2782 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2783 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2784 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2785 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2786 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2787 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2788 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2789 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2790 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2791 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2792 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2793 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2794 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2795 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2796 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2797 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2798 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2799 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2800 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2801 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2802 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2803 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2804 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2805 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2806 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2807 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2808 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2809 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2810 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2811 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2812 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2814 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2816 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2817 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2818 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2819 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2820 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2821 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2822 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2823 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2824 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2825 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2826 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2827 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2828 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2829 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2830 when the special functions IS is enabled, not for C++17.
2831 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2833 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2834 without checks for special functions in C++17.
2835 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2839 * include/backward/hash_map: Use <> for includes not "".
2840 * include/backward/hash_set: Likewise.
2841 * include/backward/strstream: Likewise.
2842 * include/tr1/bessel_function.tcc: Likewise.
2843 * include/tr1/exp_integral.tcc: Likewise.
2844 * include/tr1/legendre_function.tcc: Likewise.
2845 * include/tr1/modified_bessel_func.tcc: Likewise.
2846 * include/tr1/riemann_zeta.tcc: Likewise.
2848 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2850 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2851 of extension allocators.
2852 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2853 Document new headers in 7.2, 8.1 and 9.1 releases.
2854 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2855 * doc/html/*: Regenerate.
2857 2019-03-12 John David Anglin <dave.anglin@bell.net>
2860 * testsuite/lib/libstdc++.exp: Locate libatomic.
2861 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2862 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2864 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2865 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2866 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2867 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2869 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2872 * configure.ac: Check for sockatmark.
2873 * crossconfig.m4: Check for sockatmark.
2874 * config.h.in: Regenerate.
2875 * configure: Regenerate.
2876 * include/experimental/internet (address_v4::_S_hton): Rename
2877 overloaded functions to _S_hton_16 and _S_ntoh_16.
2878 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2879 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2880 * include/experimental/socket (basic_socket::at_mark): Check
2881 _GLIBCXX_HAVE_SOCKATMARK.
2883 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2884 const variables instead of macros.
2887 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2888 Use correct type for len_aligned.
2889 * testsuite/20_util/hash/89629.cc: New test.
2891 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2894 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2895 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2896 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2897 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2898 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2899 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2900 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2901 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2902 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2903 memory_order_seq_cst to int.
2905 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2907 * doc/xml/manual/using.xml: Use link element instead of xref.
2908 * doc/html/*: Regenerate.
2910 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2912 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2915 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2916 parameters in deduction guides.
2917 * include/debug/multimap.h (multimap): Likewise.
2918 * include/debug/set.h (multimap): Likewise.
2919 * include/debug/multiset.h (multimap): Likewise.
2920 * include/debug/unordered_map (unordered_map): Likewise.
2921 (unordered_multimap): Likewise.
2922 * include/debug/unordered_set (unordered_set): Likewise.
2923 (unordered_multiset): Likewise.
2926 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2927 Invalidate all iterators in case of rehash.
2928 (unordered_multimap<>::_M_check_rehashed): Likewise.
2929 * include/debug/unordered_set
2930 (unordered_set<>::_M_check_rehashed): Likewise.
2931 (unordered_multiset<>::_M_check_rehashed): Likewise.
2932 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2934 2019-03-07 Andreas Schwab <schwab@suse.de>
2936 * config/abi/post/riscv64-linux-gnu: New directory.
2937 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2939 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2941 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2942 compile test to run. Fix typo.
2944 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2945 * doc/html/*: Regenerate.
2947 P0356R5 Simplified partial function application
2948 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2949 helpers for bind_front.
2950 (bind_front, __cpp_lib_bind_front): Define.
2951 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2953 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2955 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2956 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2957 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2958 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2960 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2962 PR libstdc++/86655 - std::assoc_legendre should not constrain
2963 the value of m (or x).
2964 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2965 __sph_legendre): If degree > order Don't throw, return 0.
2966 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2967 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2968 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2969 * testsuite/tr1/5_numerical_facilities/special_functions/
2970 02_assoc_legendre/pr86655.cc: New test.
2971 * testsuite/tr1/5_numerical_facilities/special_functions/
2972 22_sph_legendre/pr86655.cc: New test.
2974 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2977 Also PR libstdc++/85517
2978 * include/std/variant (__do_visit): New.
2979 (__variant_cast): Likewise.
2980 (__variant_cookie): Likewise.
2981 (__erased_*): Remove.
2982 (_Variant_storage::_S_vtable): Likewise.
2983 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2984 (_Variant_storage::__M_reset): Adjust.
2985 (__variant_construct): New.
2986 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2987 __variant_construct.
2988 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2989 (_Move_ctor_base::__M_destructive_copy): New.
2990 (_Move_ctor_base::__M_destructive_move): Adjust to use
2991 __variant_construct.
2992 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2993 (_Copy_assign_alias): Adjust to check both copy assignment
2994 and copy construction for triviality.
2995 (_Move_assign_base::operator=): Adjust to use __do_visit.
2996 (_Multi_array): Add support for visitors that accept and return
2998 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2999 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3000 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3001 a __variant_cookie temporary for a variant that is valueless and..
3002 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3003 (__gen_vtable::_Array_type): Conditionally make space for
3004 the __variant_cookie visitor case.
3005 (__variant_construct_by_index): New.
3006 (get_if): Adjust to use std::addressof.
3007 (relops): Adjust to use __do_visit.
3008 (variant): Add __variant_cast and __variant_construct_by_index
3010 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3011 instead of self-destruction.
3012 (variant::swap): Adjust to use __do_visit.
3013 (visit): Reimplement in terms of __do_visit.
3014 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3015 * testsuite/20_util/variant/compile.cc: Adjust.
3016 * testsuite/20_util/variant/run.cc: Likewise.
3018 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3020 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3022 * testsuite/experimental/feat-char8_t.cc: Likewise.
3024 * include/std/type_traits [C++20] (is_bounded_array)
3025 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3027 * testsuite/20_util/is_bounded_array/requirements/
3028 explicit_instantiation.cc: New test.
3029 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3031 * testsuite/20_util/is_bounded_array/value.cc: New test.
3032 * testsuite/20_util/is_unbounded_array/requirements/
3033 explicit_instantiation.cc: New test.
3034 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3036 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3038 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3040 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3042 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3044 * include/c_compatibility/math.h [C++20] (lerp): Add using
3046 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3047 (__lerp): Define function template to implement lerp.
3048 (lerp(float, float, float), lerp(double, double, double))
3049 (lerp(long double, long double, long double)): Define for C++20.
3050 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3051 (midpoint(T, T), midpoint(T*, T*)): Define.
3052 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3053 * testsuite/26_numerics/lerp.cc: New test.
3054 * testsuite/26_numerics/midpoint/floating.cc: New test.
3055 * testsuite/26_numerics/midpoint/integral.cc: New test.
3056 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3058 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3060 PR libstdc++/88996 Implement P0439R0
3061 Make std::memory_order a scoped enumeration.
3062 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3063 add variables for the old enumerators. Adjust calls.
3064 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3065 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3067 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3069 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3072 * include/std/memory_resource (polymorphic_allocator): Add default
3073 template argument for C++20.
3074 (polymorphic_allocator::allocate_bytes)
3075 (polymorphic_allocator::deallocate_bytes)
3076 (polymorphic_allocator::allocate_object)
3077 (polymorphic_allocator::deallocate_object)
3078 (polymorphic_allocator::new_object)
3079 (polymorphic_allocator::delete_object): New member functions for
3081 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3084 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3087 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3090 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3092 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3093 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3095 * include/std/memory (uses_allocator_construction_args): New set of
3096 overloaded functions.
3097 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3099 * include/std/memory_resource (polymorphic_allocator::construct)
3100 [__cplusplus > 201703l]: Replace all overloads with a single function
3101 using uses_allocator_construction_args.
3102 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3104 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3106 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3109 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3110 stylesheet directories before check for xsltproc. Try to use
3111 xmlcatalog to find local stylesheet directory before trying hardcoded
3112 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3113 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3114 use xsltproc if xmlcatalog fails to find a local stylesheet.
3115 * configure.ac: Check for xmlcatalog.
3116 * Makefile.in: Regenerate.
3117 * configure: Likewise.
3118 * doc/Makefile.in: Likewise.
3119 * include/Makefile.in: Likewise.
3120 * libsupc++/Makefile.in: Likewise.
3121 * po/Makefile.in: Likewise.
3122 * python/Makefile.in: Likewise.
3123 * src/Makefile.in: Likewise.
3124 * src/c++11/Makefile.in: Likewise.
3125 * src/c++17/Makefile.in: Likewise.
3126 * src/c++98/Makefile.in: Likewise.
3127 * src/filesystem/Makefile.in: Likewise.
3128 * testsuite/Makefile.in: Likewise.
3130 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3133 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3134 container deduction guides.
3135 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3136 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3137 parameters in deduction guides.
3138 * include/bits/stl_multimap.h (multimap): Likewise.
3139 * include/bits/stl_multiset.h (multiset): Likewise.
3140 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3141 * include/bits/stl_set.h (set): Likewise.
3142 * include/bits/stl_stack.h (stack): Likewise.
3143 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3144 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3145 constrain parameters in deduction guides.
3146 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3148 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3150 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3151 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3152 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3153 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3155 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3157 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3160 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3161 to class template and partial specialization using void_t.
3162 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3164 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3167 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3168 copy and move members public.
3170 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3172 * include/std/type_traits (__underlying_type_impl): New helper to
3173 make underlying_type SFINAE-friendly.
3174 (underlying_type): Derive from __underlying_type_impl.
3175 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3179 * include/bits/char_traits.h (__constant_char_array): Check index is
3180 in range before dereferencing.
3181 (char_traits<char>::compare, char_traits<char>::find)
3182 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3183 immediately if n is zero.
3184 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3185 Remove workarounds for PR 67026.
3186 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3188 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3191 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3193 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3194 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3196 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3199 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3200 type to std::size_t and argument to type to long double.
3202 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3204 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3205 * config/abi/post/sparc64-linux-gnu: New directory.
3206 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3207 * config/abi/post/sparc64-linux-gnu/32: New directory.
3208 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3210 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3212 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3213 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3216 2019-02-22 Tom Honermann <tom@honermann.net>
3218 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3219 printers for u8string and u8string_view.
3221 2019-02-22 Tom Honermann <tom@honermann.net>
3223 * testsuite/18_support/byte/ops.cc: Validate
3224 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3225 std::to_integer<char32_t>.
3226 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3227 std::numeric_limits<char8_t>.
3228 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3229 std::numeric_limits<char8_t>::lowest().
3230 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3231 std::numeric_limits<char8_t>::max_digits10.
3232 * testsuite/18_support/type_info/fundamental.cc: Validate
3233 typeinfo for char8_t.
3234 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3235 std::from_chars with char8_t.
3236 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3237 Validate explicit instantiation of std::hash<char8_t>.
3238 * testsuite/20_util/is_integral/value.cc: Validate
3239 std::is_integral<char8_t>.
3240 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3241 Validate std::make_signed<char8_t>.
3242 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3243 Validate u8string construction from char8_t sources.
3244 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3246 * testsuite/21_strings/basic_string_view/operations/compare/
3247 char/70483.cc: Validate substr operations on u8string_view.
3248 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3249 the u8string_view typedef is defined.
3250 * testsuite/21_strings/char_traits/requirements/
3251 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3253 * testsuite/21_strings/char_traits/requirements/
3254 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3255 constexpr member functions.
3256 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3257 that the u8string typedef is defined.
3258 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3259 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3260 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3261 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3263 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3264 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3266 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3267 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3268 Validate std::atomic<char8_t>::is_always_lock_free
3269 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3270 Update line numbers.
3271 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3273 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3275 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3276 Validate std::experimental::pmr::u8string.
3277 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3278 u8string_view typedef is defined.
3279 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3280 char32_t to the typelists.
3282 2019-02-22 Tom Honermann <tom@honermann.net>
3284 * include/ext/typelist.h: Constrain a partial specialization of
3285 typelist::detail::append_ to only match chain<T1,T2>.
3287 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3290 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3291 class template with class. Replace move and copy member types with
3292 member alias templates, so they are only instantiated when needed.
3293 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3294 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3295 test for C++11/14/17 as well.
3296 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3299 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3302 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3303 _GLIBCXX_PURE to the alias declaration.
3305 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3307 * testsuite/21_strings/basic_string/literals/types.cc
3308 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3309 * testsuite/21_strings/basic_string/literals/values.cc
3310 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3311 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3312 potentially having different type.
3313 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3314 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3316 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3317 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3318 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3319 string literals only using basic character set.
3320 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3321 u8 literals to char.
3322 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3323 Test ATOMIC_CHAR8_T_LOCK_FREE.
3324 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3325 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3326 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3327 * testsuite/experimental/string_view/literals/types.cc
3328 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3330 * testsuite/experimental/string_view/literals/values.cc
3331 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3333 2019-02-19 Tom Honermann <tom@honermann.net>
3335 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3336 from char16_32_t.cc; validates numeric_limits<char8_t>.
3337 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3338 test cloned from types.cc; validates operator""s for char8_t
3340 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3341 test cloned from values.cc; validates construction and comparison
3343 * testsuite/21_strings/basic_string/requirements/
3344 /explicit_instantiation/char8_t/1.cc: New test cloned from
3345 char16_t/1.cc; validates explicit instantiation of
3346 basic_string<char8_t>.
3347 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3348 New test cloned from types.cc; validates operator""sv for char8_t
3349 returns u8string_view.
3350 * testsuite/21_strings/basic_string_view/literals/
3351 values-char8_t.cc: New test cloned from values.cc; validates
3352 construction and comparison of u8string_view values.
3353 * testsuite/21_strings/basic_string_view/requirements/
3354 explicit_instantiation/char8_t/1.cc: New test cloned from
3355 char16_t/1.cc; validates explicit instantiation of
3356 basic_string_view<char8_t>.
3357 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3358 New test cloned from char16_t/65049.cc; validates that
3359 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3360 * testsuite/21_strings/char_traits/requirements/char8_t/
3361 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3362 that char_traits<char8_t> member typedefs are present and correct.
3363 * testsuite/21_strings/char_traits/requirements/
3364 explicit_instantiation/char8_t/1.cc: New test cloned from
3365 char16_t/1.cc; validates explicit instantiation of
3366 char_traits<char8_t>.
3367 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3368 from char16_t.cc: validates
3369 codecvt<char16_t, char8_t, mbstate_t>.
3370 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3371 from char32_t.cc: validates
3372 codecvt<char32_t, char8_t, mbstate_t>.
3373 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3374 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3375 codecvt<char32_t, char8_t, std::mbstate_t>.
3376 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3377 test cloned from string.cc; validates filesystem::path construction
3379 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3380 the __cpp_lib_char8_t feature test macro is defined with the
3382 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3383 New test cloned from string.cc; validates filesystem::path
3384 construction from char8_t input.
3385 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3386 test cloned from types.cc; validates operator""sv for char8_t
3387 returns u8string_view.
3388 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3389 New test cloned from values.cc; validates construction and
3390 comparison of u8string_view values.
3391 * testsuite/experimental/string_view/requirements/
3392 explicit_instantiation/char8_t/1.cc: New test cloned from
3393 char16_t/1.cc; validates explicit instantiation of
3394 basic_string_view<char8_t>.
3395 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3396 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3399 2019-02-19 Tom Honermann <tom@honermann.net>
3401 P0482R5 char8_t: Standard library support
3402 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3403 typeinfo symbols for char8_t.
3404 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3405 (GLIBCXX_3.4.26): Add symbols for specializations of
3406 numeric_limits and codecvt that involve char8_t.
3407 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3408 * include/bits/atomic_base.h: Add atomic_char8_t.
3409 * include/bits/basic_string.h: Add std::hash<u8string> and
3410 operator""s(const char8_t*, size_t).
3411 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3413 * include/bits/char_traits.h: Add char_traits<char8_t>.
3414 * include/bits/codecvt.h: Add
3415 codecvt<char16_t, char8_t, mbstate_t>,
3416 codecvt<char32_t, char8_t, mbstate_t>,
3417 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3418 codecvt_byname<char32_t, char8_t, mbstate_t>.
3419 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3420 recognize char8_t as an integral type.
3421 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3423 (path::u8string): Return std::u8string when char8_t support is
3425 (path::generic_u8string): Likewise.
3426 (path::_S_convert): Handle conversion from char8_t input.
3427 (path::_S_str_convert): Likewise.
3428 * include/bits/functional_hash.h: Add hash<char8_t>.
3429 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3431 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3432 for new char8_t specializations.
3433 * include/bits/localefwd.h: Add missing declarations of
3434 codecvt<char16_t, char, mbstate_t> and
3435 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3436 codecvt<char16_t, char8_t, mbstate_t> and
3437 codecvt<char32_t, char8_t, mbstate_t>.
3438 * include/bits/postypes.h: Add u8streampos
3439 * include/bits/stringfwd.h: Add declarations of
3440 char_traits<char8_t> and u8string.
3441 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3442 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3444 (path::u8string): Return std::u8string when char8_t support is
3446 (path::generic_u8string): Likewise.
3447 (path::_S_convert): Handle conversion from char8_t input.
3448 (path::_S_str_convert): Likewise.
3449 * include/experimental/string: Add u8string.
3450 * include/experimental/string_view: Add u8string_view,
3451 hash<experimental::u8string_view>, and
3452 operator""sv(const char8_t*, size_t).
3453 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3454 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3455 as a character type.
3456 * include/std/limits: Add numeric_limits<char8_t>.
3457 * include/std/string_view: Add u8string_view,
3458 hash<experimental::u8string_view>, and
3459 operator""sv(const char8_t*, size_t).
3460 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3461 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3462 * libsupc++/atomic_lockfree_defines.h: Define
3463 ATOMIC_CHAR8_T_LOCK_FREE.
3464 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3465 codecvt.cc and limits.cc so that char8_t specializations of
3466 numeric_limits and codecvt and emitted.
3467 * src/c++11/Makefile.in: Likewise.
3468 * src/c++11/codecvt.cc: Define members of
3469 codecvt<char16_t, char8_t, mbstate_t>,
3470 codecvt<char32_t, char8_t, mbstate_t>,
3471 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3472 codecvt_byname<char32_t, char8_t, mbstate_t>.
3473 * src/c++11/limits.cc: Define members of
3474 numeric_limits<char8_t>.
3475 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3476 locale_init.cc and localename.cc.
3477 * src/c++98/Makefile.in: Likewise.
3478 * src/c++98/locale_init.cc: Add initialization for the
3479 codecvt<char16_t, char8_t, mbstate_t> and
3480 codecvt<char32_t, char8_t, mbstate_t> facets.
3481 * src/c++98/localename.cc: Likewise.
3482 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3484 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3486 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3487 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3488 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3490 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3492 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3493 * doc/html/*: Regenerate.
3495 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3496 * doc/html/*: Regenerate.
3498 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3499 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3500 allocator type in is_constructible checks.
3501 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3502 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3503 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3504 problematic type from LWG 2586 discussion.
3505 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3506 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3508 * configure.ac: Check for C11 timespec_get function.
3509 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3511 * config.h.in: Regenerate.
3512 * configure: Regenerate.
3513 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3514 std for C++17 and up.
3516 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3517 * include/bits/stl_queue.h
3518 (priority_queue(const Compare&, const Container&, const Alloc&))
3519 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3521 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3523 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3524 * include/bits/stl_queue.h (queue, priority_queue): Add static
3525 assertions to enforce LWG 2566 requirement on value_type.
3526 * include/bits/stl_stack.h (stack): Likewise.
3529 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3531 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3532 * include/bits/std_abs.h: Add comment about LWG 2735.
3533 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3535 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3538 * include/std/version [__cpp_impl_destroying_delete]
3539 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3540 * libsupc++/new [__cpp_impl_destroying_delete]
3541 (__cpp_lib_destroying_delete): Likewise.
3542 (destroying_delete_t, destroying_delete): Likewise, but define even
3543 when __cpp_impl_destroying_delete is not defined.
3544 * testsuite/18_support/destroying_delete.cc: New test.
3546 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3549 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3550 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3551 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3552 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3554 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3557 * include/bits/fs_path.h (path::has_root_name)
3558 (path::has_root_directory, path::has_root_path)
3559 (path::has_relative_path, path::has_parent_path)
3560 (path::has_filename, path::has_stem, path::has_extension)
3561 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3563 * src/c++17/fs_path.cc (path::has_root_name)
3564 (path::has_root_directory, path::has_root_path)
3565 (path::has_relative_path, path::has_parent_path)
3566 (path::has_filename, path::_M_find_extension): Add noexcept.
3568 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3570 PR libstdc++/89102 (partial)
3571 * include/std/type_traits (common_type<>): Define.
3572 (common_type<T>): Derive from common_type<T, T>.
3573 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3574 Test zero-length template argument list.
3575 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3576 Test additional single argument cases.
3577 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3578 Adjust expected error.
3580 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3583 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3585 * include/bits/stl_stack.h (stack): Likewise.
3586 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3587 * testsuite/23_containers/queue/deduction.cc: New test.
3588 * testsuite/23_containers/stack/deduction.cc: New test.
3591 * include/std/type_traits (__is_convertible_helper)
3592 (__is_convertible_helper<_From, _To, false>): Revert changes to
3593 support is_nothrow_convertible.
3594 (__is_nt_convertible_helper): New helper.
3595 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3597 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3598 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3601 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3602 __is_alloc_insertable_impl. Replace single type member with two
3603 members, one for each of copy and move insertable.
3604 (__is_move_insertable): New trait for internal use.
3605 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3606 (vector::_S_nothrow_relocate(true_type)): New functions to
3607 conditionally check if __relocate_a can throw.
3608 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3609 on __is_move_insertable.
3610 (vector::_S_do_relocate): New overloaded functions to conditionally
3612 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3613 based on _S_use_relocate.
3614 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3615 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3616 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3619 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3620 parameter unnamed. Add message to static assertion.
3621 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3622 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3625 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3628 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3630 (__is_bitwise_relocatable): ... to this.
3631 (__relocate_a_1): Adapt.
3632 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3633 (__is_bitwise_relocatable): ... to this.
3635 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3638 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3639 final component as well as from _M_pathname. Append the dot using
3640 operator+= instead of only to _M_pathname.
3641 (path::_M_find_extension): Reformat slightly.
3642 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3643 Add more test cases.
3645 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3647 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3649 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3651 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3652 constexpr specifiers from arg and proj.
3654 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3655 __shared_ptr instantiations used by gcc4-compatible ABI.
3657 * include/experimental/forward_list (experimental::erase): Qualify
3659 * include/experimental/list (experimental::erase): Likewise.
3660 * include/std/forward_list (std::erase): Likewise.
3661 * include/std/list (std::erase): Likewise.
3663 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3665 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3666 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3667 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3668 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3669 * testsuite/ext/array_allocator/26875.cc: Likewise.
3670 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3671 * testsuite/util/replacement_memory_operators.h: Likewise.
3672 * testsuite/util/testsuite_allocator.h: Likewise.
3674 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3675 normal mode vector, even for debug mode.
3676 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3677 Define alias template for normal mode vector.
3679 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3682 * config/locale/generic/c_locale.h (__convert_from_v)
3683 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3684 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3685 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3686 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3688 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3691 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3692 data member with static member function _S_use_relocate().
3693 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3694 (vector::_M_default_append): Use _S_use_relocate() instead of
3697 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3700 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3703 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3704 write to stderr instead of using printf.
3706 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3709 * include/bits/char_traits.h (__constant_string_p,
3710 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3713 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3715 Implement C++20 P0600r1.
3716 * include/backward/hash_map: Add nodiscard attribute to empty.
3717 * include/backward/hash_set: Likewise.
3718 * backward/hashtable.h: Likewise.
3719 * include/bits/basic_string.h: Likewise.
3720 * include/bits/forward_list.h: Likewise.
3721 * include/bits/hashtable.h: Likewise.
3722 * include/bits/regex.h: Likewise.
3723 * include/bits/stl_deque.h: Likewise.
3724 * include/bits/stl_list.h: Likewise.
3725 * include/bits/stl_map.h: Likewise.
3726 * include/bits/stl_multimap.h: Likewise.
3727 * include/bits/stl_multiset.h: Likewise.
3728 * include/bits/stl_queue.h: Likewise.
3729 * include/bits/stl_set.h: Likewise.
3730 * include/bits/stl_stack.h: Likewise.
3731 * include/bits/stl_tree.h: Likewise.
3732 * include/bits/stl_vector.h: Likewise.
3733 * include/bits/unordered_map.h: Likewise.
3734 * include/bits/unordered_set.h: Likewise.
3735 * include/debug/array: Likewise.
3736 * include/experimental/any: Likewise.
3737 * include/experimental/bits/fs_path.h: Likewise.
3738 * include/experimental/internet: Likewise.
3739 * include/experimental/string_view: Likewise.
3740 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3742 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3744 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3746 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3748 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3750 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3752 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3754 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3756 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3757 info_fn_imps.hpp: Likewise.
3758 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3759 left_child_next_sibling_heap_.hpp: Likewise.
3760 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3762 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3764 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3766 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3768 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3770 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3772 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3774 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3775 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3776 * include/ext/rope: Likewise.
3777 * include/ext/slist: Likewise.
3778 * include/ext/vstring.h: Likewise.
3779 * include/profile/array: Likewise.
3780 * include/std/array: Likewise.
3781 * include/tr1/array: Likewise.
3782 * include/tr1/hashtable.h: Likewise.
3783 * include/tr1/regex: Likewise.
3784 * include/tr2/dynamic_bitset: Likewise.
3785 * include/bits/alloc_traits.h: Add nodiscard attribute to
3787 * include/experimental/memory_resource: Likewise.
3788 * include/ext/alloc_traits.h: Likewise.
3789 * include/ext/array_allocator.h: Likewise.
3790 * include/ext/bitmap_allocator.h: Likewise.
3791 * include/ext/debug_allocator.h: Likewise.
3792 * include/ext/extptr_allocator.h: Likewise.
3793 * include/ext/mt_allocator.h: Likewise.
3794 * include/ext/new_allocator.h: Likewise.
3795 * include/ext/pool_allocator.h: Likewise.
3796 * include/ext/throw_allocator.h: Likewise.
3797 * include/std/scoped_allocator: Likewise.
3798 * libsupc++/eh_alloc.cc: Likewise.
3799 * include/std/future: Add nodiscard attribute to async.
3800 * libsupc++/new: Add nodiscard attribute to new.
3802 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3807 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3808 * include/bits/shared_ptr.h
3809 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3810 (allocate_shared): Change to use new tag type.
3811 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3812 Declare new member function.
3813 (_Sp_alloc_shared_tag): Define new type.
3814 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3815 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3816 _Sp_make_shared_tag::_S_eq to check type_info.
3817 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3818 Constrain to prevent being called with _Sp_alloc_shared_tag.
3819 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3820 Replace constructor with ...
3821 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3822 reference parameter so address of the new object can be returned to
3823 the caller. Obtain the allocator from the tag type.
3824 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3825 constructor with ...
3826 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3827 to the __shared_count constructor.
3828 (__allocate_shared): Change to use new tag type.
3829 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3831 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3833 * src/c++17/fs_ops.cc
3834 (equivalent(const path&, const path&, error_code&))
3835 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3836 compare files instead of relying on incomplete info returned by stat.
3839 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3840 if the path is already absolute.
3841 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3842 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3845 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3846 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3847 of filesystem::exists.
3848 (create_directories(const path&, error_code&)): Add assertions.
3849 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3850 Add workaround for bug in _wstat for paths with trailing slash.
3851 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3852 for expected behaviour on mingw.
3853 * testsuite/experimental/filesystem/operations/create_directories.cc:
3855 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3856 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3857 not test permissions on mingw targets.
3859 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3861 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3862 constructors and open members taking wide strings. Fix patterns for
3863 filesystem::path members to match wstring_view parameters. Add
3864 exports for shared_ptr members used by directory iterators.
3865 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3866 error code parameter if the file doesn't exist.
3867 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3869 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3870 values for mingw targets, where "/" is not an absolute path. Do not
3871 test symlinks on mingw targets.
3872 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3873 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3875 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3876 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3877 that each component of the path is created.
3878 * testsuite/experimental/filesystem/operations/create_directories.cc:
3880 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3881 permissions on mingw targets.
3882 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3883 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3884 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3885 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3887 * testsuite/experimental/filesystem/operations/permissions.cc:
3889 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3890 symlinks or permissions on mingw targets.
3891 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3892 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3893 symlinks on mingw targets.
3894 * testsuite/experimental/filesystem/operations/remove_all.cc:
3896 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3897 permissions on mingw targets.
3898 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3899 test symlinks on mingw targets.
3900 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3903 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3906 Warn about unused comparisons of shared_ptr/unique_ptr
3907 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3908 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3909 <, <=, >, >= for shared_ptr.
3910 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3912 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3914 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3915 as 201611L, because P0497R0 changes are supported.
3916 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3918 * include/bits/erase_if.h [__cplusplus > 201703L]
3919 (__cpp_lib_erase_if): Only define for C++2a.
3920 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3921 (__cpp_lib_null_iterators): Define.
3922 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3923 (__cpp_lib_null_iterators): Define.
3924 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3926 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3928 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3930 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3931 changes are supported.
3932 * include/std/optional (__cpp_lib_optional): Likewise.
3933 * include/std/variant (__cpp_lib_variant): Likewise.
3934 * include/std/version [!__STRICT_ANSI__]
3935 (__cpp_lib_uncaught_exceptions): Define as long integer.
3936 [__cplusplus >= 201703L] (__cpp_lib_any)
3937 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3938 (__cpp_lib_variant): Define for C++17.
3939 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3941 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3944 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3946 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3950 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3952 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3955 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3957 * doc/xml/manual/intro.xml: Include new section.
3958 * doc/xml/manual/status_cxx2017.xml: Document more
3959 implementation-defined properties of the library.
3960 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3961 * doc/html/*: Regenerate.
3963 * include/bits/refwrap.h [__cplusplus > 201703L]
3964 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3965 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3966 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3968 (reference_wrapper::operator()): Add static assertion.
3969 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3971 * include/std/chrono (duration_values::zero(), duration_values::min())
3972 (duration_values::max()): Add noexcept.
3973 (duration::zero(), duration::min(), duration::max()): Likewise.
3974 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3975 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3976 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3978 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3980 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3982 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3983 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3985 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3988 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3989 specialization for C++17 (P0513R0, LWG 2817).
3990 * testsuite/20_util/hash/nullptr.cc: New test.
3993 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3994 pattern for std::basic_stringbuf::str().
3996 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3997 basic_ostream::operator<< patterns.
3999 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4001 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4002 test failures on targets with 32-bit time_t.
4004 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4005 * include/std/deque: Likewise.
4006 * include/std/forward_list: Likewise.
4007 * include/std/list: Likewise.
4008 * include/std/string: Likewise.
4009 * include/std/vector: Likewise.
4010 * include/std/version: Likewise.
4011 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4012 * testsuite/23_containers/deque/erasure.cc: Likewise.
4013 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4014 * testsuite/23_containers/list/erasure.cc: Likewise.
4015 * testsuite/23_containers/map/erasure.cc: Likewise.
4016 * testsuite/23_containers/set/erasure.cc: Likewise.
4017 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4018 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4019 * testsuite/23_containers/vector/erasure.cc: Likewise.
4021 * include/experimental/internet [AI_NUMERICSERV]
4022 (resolver_base::numeric_service): Define conditionally.
4023 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4025 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4028 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4029 Jonathan Wakely <jwakely@redhat.com>
4032 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4033 (GLIBCXX_3.4.26): Add new exports.
4034 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4035 correct list of sources.
4036 * include/Makefile.in: Regenerate.
4037 * include/std/ostream (operator<<(nullptr_t)): New member function.
4038 * src/c++17/ostream-inst.cc: New file.
4039 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4042 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4044 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4045 of the source file containing the caller.
4046 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4047 directories created by test.
4048 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4050 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4052 * testsuite/experimental/filesystem/iterators/
4053 recursive_directory_iterator.cc: Likewise.
4055 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4057 PR tree-optimization/88775
4058 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4059 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4060 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4061 instead of __builtin_constant_p if available. Don't bother with
4062 the pointer comparison in C++11 and earlier.
4064 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4068 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4071 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4073 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4074 for filesystem::path. Give variables more distinctive names.
4076 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4077 member function to perform non-trivial assignment.
4078 (_Optional_payload_base::_M_move_assign): Likewise.
4079 (_Optional_payload<T, true, false, true>::operator=)
4080 (_Optional_payload<T, true, true, false>::operator=)
4081 (_Optional_payload<T, true, false, false>::operator=): Call
4082 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4085 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4086 test std::complex<long double> if long double format is IBM128.
4087 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4090 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4092 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4093 for old std::unique_ptr layout.
4094 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4095 to become valueless. Add filesystem::path tests.
4098 * include/std/optional (_Optional_payload_base): New class template
4099 for common code hoisted from _Optional_payload specializations. Use
4100 a template for the union, to allow a partial specialization for
4101 types with non-trivial destructors. Add constructors for in-place
4102 initialization to the union.
4103 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4104 to perform non-trivial copy construction, instead of relying on
4105 non-standard copy elision in a delegating constructor.
4106 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4107 non-trivial move construction.
4108 (_Optional_payload): Derive from _Optional_payload_base and use it
4109 for everything except the non-trivial assignment operators, which are
4111 (_Optional_payload<false, C, M>): Derive from the specialization
4112 _Optional_payload<true, false, false> and add a destructor.
4113 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4114 Forward to corresponding members of _Optional_payload.
4115 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4116 Hoist common members from _Optional_base.
4117 (_Optional_base): Make all members and base class public.
4118 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4119 _Optional_base_impl.
4120 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4121 support for new std::optional layout.
4122 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4125 * include/bits/locale_conv.h: Use <> for includes not "".
4126 * include/ext/random: Likewise.
4127 * include/ext/vstring.h: Likewise.
4129 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4131 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4132 (GLIBCXX_3.4.21): Likewise.
4134 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4137 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4138 to match the one that controls whether utimbuf and utime are declared.
4140 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4143 * include/bits/char_traits.h (char_traits::move): Do not pass null
4144 pointers to memmove.
4145 * include/bits/locale_facets.h
4146 (ctype<char>::widen(const char*, const char*, char*)): Do not
4147 pass null pointers to memcpy.
4148 (ctype<char>::narrow(const char*, const char*, char, char*)):
4150 (ctype<char>::do_widen(const char*, const char*, char*)):
4152 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4155 * doc/xml/manual/spine.xml: Update copyright years.
4156 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4157 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4158 for C++17 filesystem library.
4159 * doc/html/*: Regenerate.
4161 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4162 * config.h.in: Regenerate.
4163 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4164 alphabetically and add missing entries for copy_symlink,
4165 hard_link_count, rename, and resize_file.
4166 * configure: Regenerate.
4167 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4168 used unconditionally.
4169 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4170 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4171 supports truncating to zero length.
4172 * testsuite/27_io/filesystem/operations/all.cc: New test.
4173 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4175 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4178 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4179 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4180 * config.h.in: Regenerate.
4181 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4182 remaining std::filesystem types and functions.
4183 * configure: Regenerate.
4184 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4185 * src/c++17/Makefile.in: Regenerate.
4186 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4187 here, and change name of included file.
4188 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4189 here, and change name of included file.
4190 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4191 path to dir-common.h.
4192 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4193 path to ops-common.h. Disable -Wunused-parameter warnings.
4194 (internal_file_clock): Define unconditionally.
4195 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4197 (do_copy_file, do_space): Move definitions to ops.common.h.
4198 (copy, file_size, hard_link_count, last_write_time, space): Only
4199 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4201 (last_write_time, read_symlink): Remove unused attributes from
4203 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4204 * src/filesystem/Makefile.in: Regenerate.
4205 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4206 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4207 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4208 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4209 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4210 dummy types and functions instead of using #error.
4211 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4212 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4214 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4215 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4216 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4217 to account for new namespace.
4218 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4219 -lstdc++fs from dg-options.
4220 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4221 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4222 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4223 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4224 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4226 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4227 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4229 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4230 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4231 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4232 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4233 * testsuite/27_io/filesystem/operations/create_directories.cc:
4235 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4236 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4237 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4238 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4239 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4240 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4241 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4242 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4243 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4244 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4245 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4246 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4247 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4248 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4249 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4250 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4251 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4252 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4254 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4258 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4259 typeinfo and vtables less greedy.
4260 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4261 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4262 * src/c++17/Makefile.in: Regenerate.
4263 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4264 here, and change name of included file.
4265 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4266 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4268 * src/filesystem/Makefile.in: Regenerate.
4269 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4270 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4271 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4272 from dg-options and remove dg-require-filesystem-ts.
4273 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4274 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4275 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4276 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4277 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4278 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4279 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4280 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4281 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4282 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4283 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4284 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4285 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4286 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4287 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4288 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4289 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4290 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4291 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4292 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4293 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4295 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4296 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4297 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4298 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4299 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4300 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4301 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4302 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4303 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4304 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4305 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4306 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4308 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4310 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4312 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4314 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4315 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4316 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4317 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4318 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4319 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4320 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4321 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4322 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4323 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4325 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4326 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4327 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4328 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4329 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4332 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4333 Check is_trivially_copyable instead of is_scalar.
4334 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4335 contained value can throw and its type is trivially copyable then
4336 construct into a temporary variant and move from it, to provide the
4337 strong exception safety guarantee.
4338 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4340 * testsuite/20_util/variant/87431.cc: New test.
4341 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4342 conversion causes valueless state.
4345 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4346 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4347 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4348 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4349 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4351 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4353 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4354 (file_time_type): Redefine in terms of __file_clock.
4355 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4357 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4359 (internal_file_lock): New helper type for accessing __file_clock.
4360 (do_copy_file): Use internal_file_lock to convert system time to
4362 (last_write_time(const path&, error_code&)): Likewise.
4363 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4365 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4367 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4368 for const member functions of std::basic_string.
4369 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4371 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4372 Make non-standard constructor private.
4373 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4375 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4376 explicit instantiations for C++17 as well as earlier dialects.
4377 * src/c++17/Makefile.am: Add new source files.
4378 * src/c++17/Makefile.in: Regenerate.
4379 * src/c++17/cow-string-inst.cc: New file defining explicit
4380 instantiations for basic_string member functions added in C++17.
4381 * src/c++17/string-inst.cc: Likewise.
4383 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4384 copy/move constructors for old std::basic_string.
4385 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4386 (basic_string::reference, basic_string::const_reference): Define
4387 as plain references for C++11 and later.
4388 (basic_string::basic_string()): Put constructor body outside
4389 preprocessor conditional groups.
4390 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4391 instead of copying it.
4392 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4394 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4396 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4397 cases for old basic_string.
4398 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4399 allocator-extended constructors unconditionally. Add extra members to
4400 allocator type when using old string ABI.
4401 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4403 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4405 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4406 -fno-inline added to test flags.
4408 * testsuite/21_strings/basic_string/requirements/
4409 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4411 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4412 assertion failures with old std::string ABI.
4414 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4416 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4417 functions that will only erase elements at the end.
4418 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4419 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4420 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4422 (path::_List::pop_back()): Define.
4423 (path::_List::_M_erase_from(const_iterator)): Define.
4424 (path::operator/=(const path&)): Use pop_back to remove last component
4425 and _M_erase_from to remove multiple components.
4426 (path::_M_append(basic_string_view<value_type>)): Likewise.
4427 (path::operator+=(const path&)): Likewise.
4428 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4429 (path::remove_filename()): Likewise.
4430 (path::lexically_normal()): Use _List::_Impl iterators instead of
4431 path::iterator. Use pop_back to remove components from the end. Clear
4432 trailing filename, instead of using erase(const_iterator) to remove
4433 a non-final component.
4434 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4436 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4438 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4439 incorrect treatment of empty filename after trailing slash.
4440 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4442 * testsuite/21_strings/basic_string/modifiers/assign/char/
4443 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4445 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4446 move_assign_optim.cc: Likewise.
4448 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4449 Jakub Jelinek <jakub@redhat.com>
4452 * include/experimental/memory: Replace UTF-8 quote characters.
4453 * include/std/future: Replace UTF-8 "em dash" characters.
4455 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4458 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4459 * include/debug/forward_list: Likewise.
4460 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4462 * include/experimental/chrono: Likewise.
4463 * include/experimental/functional: Likewise.
4464 * include/experimental/ratio: Likewise.
4465 * include/experimental/system_error: Likewise.
4466 * include/experimental/tuple: Likewise.
4467 * include/experimental/type_traits: Likewise.
4468 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4469 * include/parallel/multiseq_selection.h: Likewise.
4472 * config/abi/pre/gnu.ver: Add missing exports.
4473 * testsuite/22_locale/collate_byname/88681.cc: New test.
4474 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4475 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4477 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4479 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4480 initializer_list<value_type> and from input iterator ranges.
4481 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4483 * testsuite/experimental/string_view/element_access/char/empty.cc:
4484 Fix year range in copyright header.
4486 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4488 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4489 Fix year range in copyright header.
4491 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4493 Update copyright years.
4495 Copyright (C) 2019 Free Software Foundation, Inc.
4497 Copying and distribution of this file, with or without modification,
4498 are permitted in any medium without royalty provided the copyright
4499 notice and this notice are preserved.