1 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/charconv (chars_format): Define bitmask type.
4 * testsuite/20_util/to_chars/chars_format.cc: New test.
6 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
7 * include/std/bit (_If_is_unsigned_integer_type): Remove.
8 (_If_is_unsigned_integer): Use __is_unsigned_integer.
9 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
10 (countl_one(byte), countr_zero(byte), countr_one(byte))
11 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
12 (log2p1(byte)): Remove.
13 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
14 (__detail::__is_int_to_chars_type): Remove.
15 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
16 and __is_unsigned_integer.
17 * include/std/type_traits (__is_one_of): Move here from <charconv>.
18 (__is_signed_integer, __is_unsigned_integer): New helpers.
19 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
21 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
22 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
23 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
24 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
25 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
26 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
27 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
28 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
29 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
30 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
32 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
34 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
37 2019-06-25 Jakub Jelinek <jakub@redhat.com>
39 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
40 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
41 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
42 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
44 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
46 * include/std/numeric (midpoint(T, T)): Change implementation for
47 floating-point types to avoid incorrect rounding of denormals.
48 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
49 rounding with denormals.
50 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
51 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
53 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
55 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
57 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
59 * configure: Regenerate.
61 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
62 Qualify calls to __never_valueless.
64 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
67 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
68 vector<bool> for test.
69 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
71 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
73 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
75 (istream_iterator::_M_read()): Do not check stream state before
76 attempting extraction. Set stream pointer to null when extraction
78 (operator==(const istream_iterator&, const istream_iterator&)): Change
79 to be a hidden friend of istream_iterator.
80 (operator!=(const istream_iterator&, const istream_iterator&)):
82 (ostream_iterator::ostream_iterator()): Add default constructor.
83 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
85 * testsuite/24_iterators/istream_iterator/1.cc: New test.
86 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
87 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
88 constructor taking a string.
89 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
92 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
93 Jonathan Wakely <jwakely@redhat.com>
96 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
97 values of type bool for vector<bool> elements.
98 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
99 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
101 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
103 PR libstdc++/90920 partially revert r263433
104 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
105 (rotate): Remove checks.
106 * testsuite/25_algorithms/rotate/90920.cc: New test.
108 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
109 category used in invocable check.
110 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
111 * testsuite/26_numerics/reduce/2.cc: New test.
113 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
115 * include/bits/algorithmfwd.h: Change title of doc group.
116 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
118 * include/bits/stl_numeric.h: Define doc group and add algos to it.
119 * include/std/numeric (__is_random_access_iter): New internal trait.
120 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
121 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
122 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
123 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
124 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
125 * testsuite/26_numerics/reduce/1.cc: New test.
126 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
127 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
128 * testsuite/26_numerics/transform_reduce/1.cc: New test.
129 * testsuite/util/testsuite_iterators.h (test_container::size()): New
132 * include/c_global/cstddef (std::byte): Perform arithmetic operations
133 in unsigned int to avoid promotion (LWG 2950).
135 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
137 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
140 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
142 PR libstdc++/90281 Fix string conversions for filesystem::path
143 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
144 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
145 __str_codecvt_in_all to fail for partial conversions and throw on
147 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
148 (path::_Cvt<char8_t>): Add explicit specialization.
149 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
151 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
152 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
153 instead of codecvt_utf8. Use __str_codecvt_in_all and
154 __str_codecvt_out_all.
155 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
156 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
157 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
158 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
159 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
160 after converting to UTF-8.
161 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
162 __str_codecvt_in_all.
163 (path::string): Fix initialization of string types with different
165 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
166 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
167 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
169 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
170 return false for partial conversions.
171 * include/experimental/bits/fs_path.h (u8path):
172 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
173 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
174 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
175 instead of codecvt_utf8. Use __str_codecvt_in_all and
176 __str_codecvt_out_all.
177 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
178 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
179 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
180 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
181 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
182 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
183 __str_codecvt_in_all.
184 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
185 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
186 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
187 __str_codecvt_in_all.
188 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
189 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
190 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
191 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
192 strings and with Unicode characters outside the basic multilingual
194 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
195 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
196 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
197 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
198 * testsuite/experimental/filesystem/path/native/string.cc: Test with
199 empty strings and with Unicode characters outside the basic
202 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
203 Jonathan Wakely <jwakely@redhat.com>
205 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
206 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
207 deallocate node if insertion fails.
208 (_Hashtable::_M_insert_multi_node): Likewise.
209 (_Hashtable::_M_reinsert_node): Pass additional key argument.
210 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
211 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
212 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
213 (_Hashtable::extract(const _Key&)): Likewise.
214 (_Hashtable::_M_merge_unique): Pass additional key argument.
215 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
217 (_Hashtable::_M_insert): Likewise.
218 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
219 (_Hashtable_alloc): Add comments to functions with misleading names.
221 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
223 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
225 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
226 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
227 header for std::allocator.
228 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
229 using-declaration for std::size_t.
230 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
232 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
234 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
235 * testsuite/experimental/map/erasure.cc: Include <string> for
237 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
239 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
241 * include/experimental/type_traits (experimental::nonesuch): Use
242 pragma to disable -Wctor-dtor-privacy warnings.
243 * include/std/type_traits (__is_convertible_helper<From, To, false>)
244 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
246 * include/std/version (__cpp_lib_bind_front): Add missing macro.
248 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
250 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
251 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
252 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
253 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
255 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
256 (variant::emplace): Change static_assert messages from "should be"
258 (hash<monostate>::operator()): Remove name of unused parameter.
260 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
263 * include/Makefile.am: Add new <bits/charconv.h> header.
264 * include/Makefile.in: Regenerate.
265 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
266 (to_string(long), to_string(unsigned long), to_string(long long))
267 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
268 * include/bits/charconv.h: New header.
269 (__detail::__to_chars_len): Move here from <charconv>.
270 (__detail::__to_chars_10_impl): New function extracted from
271 __detail::__to_chars_10.
272 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
273 (__to_chars_unsigned_type): New class template that reuses
274 __make_unsigned_selector_base::__select to pick a type.
275 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
276 (__detail::__to_chars_len): Move to new header.
277 (__detail::__to_chars_10): Add inline specifier. Move code doing the
278 output to __detail::__to_chars_10_impl and call that.
279 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
280 * testsuite/21_strings/basic_string/numeric_conversions/char/
281 to_string.cc: Fix reference in comment. Remove unused variable.
282 * testsuite/21_strings/basic_string/numeric_conversions/char/
283 to_string_int.cc: New test.
285 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
287 Fix ConstexprIterator requirements tests - No constexpr algorithms!
288 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
289 Replace copy with hand-rolled loop.
290 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
293 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
295 Test for C++20 p0858 - ConstexprIterator requirements.
296 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
298 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
301 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
303 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
305 * include/bits/c++config: Rename all macros of the form __PSTL* to
307 * include/std/algorithm: Likewise.
308 * include/std/execution: Likewise.
309 * include/std/numeric: Likewise.
310 * include/std/memory: Likewise.
311 * include/pstl/glue_memory_impl.h: Likewise.
312 * include/pstl/numeric_impl.h: Likewise.
313 * include/pstl/glue_memory_defs.h: Likewise.
314 * include/pstl/execution_defs.h: Likewise.
315 * include/pstl/utils.h: Likewise.
316 * include/pstl/algorithm_fwd.h: Likewise.
317 * include/pstl/unseq_backend_simd.h: Likewise.
318 * include/pstl/glue_execution_defs.h: Likewise.
319 * include/pstl/algorithm_impl.h: Likewise.
320 * include/pstl/parallel_impl.h: Likewise.
321 * include/pstl/memory_impl.h: Likewise.
322 * include/pstl/glue_numeric_defs.h: Likewise.
323 * include/pstl/parallel_backend_utils.h: Likewise.
324 * include/pstl/glue_algorithm_defs.h: Likewise.
325 * include/pstl/parallel_backend.h: Likewise.
326 * include/pstl/glue_numeric_impl.h: Likewise.
327 * include/pstl/parallel_backend_tbb.h: Likewise.
328 * include/pstl/numeric_fwd.h: Likewise.
329 * include/pstl/glue_algorithm_impl.h: Likewise.
330 * include/pstl/execution_impl.h: Likewise.
331 * include/pstl/pstl_config.h: Likewise.
332 * testsuite/util/pstl/pstl_test_config.h: Likewise.
333 * testsuite/util/pstl/test_utils.h: Likewise.
334 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
336 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
338 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
340 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
341 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
342 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
343 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
344 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
346 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
347 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
348 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
349 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
350 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
352 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
353 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
354 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
355 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
356 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
358 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
359 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
360 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
362 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
364 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
365 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
366 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
368 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
370 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
372 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
374 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
376 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
378 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
380 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
382 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
384 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
386 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
388 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
390 Rename header guards to be consistent with upstream project's
392 * include/pstl/glue_memory_impl.h: Rename all macros of the form
393 _PSTL_(.*)_H to _PSTL_\U\1_H.
394 * include/pstl/numeric_impl.h: Likewise.
395 * include/pstl/glue_memory_defs.h: Likewise.
396 * include/pstl/execution_defs.h: Likewise.
397 * include/pstl/utils.h: Likewise.
398 * include/pstl/algorithm_fwd.h: Likewise.
399 * include/pstl/unseq_backend_simd.h: Likewise.
400 * include/pstl/glue_execution_defs.h: Likewise.
401 * include/pstl/algorithm_impl.h: Likewise.
402 * include/pstl/parallel_impl.h: Likewise.
403 * include/pstl/memory_impl.h: Likewise.
404 * include/pstl/glue_numeric_defs.h: Likewise.
405 * include/pstl/parallel_backend_utils.h: Likewise.
406 * include/pstl/glue_algorithm_defs.h: Likewise.
407 * include/pstl/parallel_backend.h: Likewise.
408 * include/pstl/glue_numeric_impl.h: Likewise.
409 * include/pstl/parallel_backend_tbb.h: Likewise.
410 * include/pstl/numeric_fwd.h: Likewise.
411 * include/pstl/glue_algorithm_impl.h: Likewise.
412 * include/pstl/execution_impl.h: Likewise.
413 * include/pstl/pstl_config.h: Likewise.
414 * testsuite/util/pstl/pstl_test_config.h: Likewise.
416 Synchronize libstdc++ parallel algorithms with upstream
418 * include/pstl/algorithm_fwd.h: Synchronize with
419 upstream PSTL project.
420 * include/pstl/algorithm_impl.h: Likewise.
421 * include/pstl/execution_defs.h: Likewise.
422 * include/pstl/execution_impl.h: Likewise.
423 * include/pstl/glue_algorithm_impl.h: Likewise.
424 * include/pstl/glue_execution_defs.h: Likewise.
425 * include/pstl/numeric_fwd.h: Likewise.
426 * include/pstl/numeric_impl.h: Likewise.
427 * include/pstl/parallel_backend.h: Likewise.
428 * include/pstl/pstl_config.h: Likewise.
429 * include/pstl/unseq_backend_simd.h: Likewise.
430 * include/pstl/parallel_backend_serial.h: New file.
431 * include/Makefile.am (pstl_headers): Add
432 parallel_backend_serial.h.
433 * include/Makefile.in: Regenerate.
435 Clean up non-conforming names
436 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
437 Uglfiy copy_range1 and copy_range2
438 (__pattern_walk2_n): Rename local n to __n
439 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
440 Rename parameter _T to _Tp.
442 Integrate non-TBB serial backend support
443 * include/bits/c++config: Adjust TBB detection logic to select serial
444 PSTL backend if no TBB present.
445 * testsuite/utils/pstl/test_utils.h: Remove check for
446 _PSTL_USE_PAR_POLICIES
448 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
450 * testsuite/24_iterators/container_access.cc: Move dg-options before
451 dg-do directive so the target check uses the -std option.
454 * configure: Regenerate.
455 * src/Makefile.am (stamp-debug): Also test for missing makefile.
456 * src/Makefile.in: Regenerate.
458 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
460 * include/std/array: Do not include <stdexcept>.
461 * include/std/optional: Include <exception> and
462 <bits/exception_defines.h> instead of <stdexcept>.
463 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
465 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
467 * testsuite/23_containers/map/erasure.cc: Include <string>.
468 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
470 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
471 dg-prune-output for different C++98 diagnostic.
472 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
474 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
476 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
478 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
480 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
482 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
484 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
486 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
488 * testsuite/23_containers/vector/requirements/dr438/
489 constructor_1_neg.cc: Likewise.
490 * testsuite/23_containers/vector/requirements/dr438/
491 constructor_2_neg.cc: Likewise.
492 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
494 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
496 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
497 Do not test allocator rebinding extension for C++2a.
498 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
499 dg-do directive for C++17 and C++2a.
501 * testsuite/23_containers/deque/requirements/explicit_instantiation/
502 1_c++0x.cc: Remove redundant test.
503 * testsuite/23_containers/deque/requirements/explicit_instantiation/
504 2.cc: Use target selector instead of preprocessor condition.
505 * testsuite/23_containers/deque/requirements/explicit_instantiation/
506 3.cc: Do not run test for C++2a.
507 * testsuite/23_containers/forward_list/requirements/
508 explicit_instantiation/3.cc: Likewise.
509 * testsuite/23_containers/forward_list/requirements/
510 explicit_instantiation/5.cc: Do not test allocator rebinding extension
512 * testsuite/23_containers/list/requirements/explicit_instantiation/
513 1_c++0x.cc: Remove redundant test.
514 * testsuite/23_containers/list/requirements/explicit_instantiation/
515 2.cc: Use target selector instead of preprocessor condition.
516 * testsuite/23_containers/list/requirements/explicit_instantiation/
517 3.cc: Do not run test for C++2a.
518 * testsuite/23_containers/list/requirements/explicit_instantiation/
519 5.cc: Do not test allocator rebinding extension for C++2a.
520 * testsuite/23_containers/map/requirements/explicit_instantiation/
521 1_c++0x.cc: Remove redundant test.
522 * testsuite/23_containers/map/requirements/explicit_instantiation/
523 2.cc: Adjust comment.
524 * testsuite/23_containers/map/requirements/explicit_instantiation/
525 3.cc: Do not run test for C++2a.
526 * testsuite/23_containers/map/requirements/explicit_instantiation/
527 5.cc: Do not test allocator rebinding extension for C++2a.
528 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
529 1_c++0x.cc: Remove redundant test.
530 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
531 3.cc: Do not run test for C++2a.
532 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
533 5.cc: Do not test allocator rebinding extension for C++2a.
534 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
535 3.cc: Do not run test for C++2a.
536 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
537 5.cc: Do not test allocator rebinding extension for C++2a.
538 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
539 Do not run test for C++2a.
540 * testsuite/23_containers/set/requirements/explicit_instantiation/
541 1_c++0x.cc: Remove redundant test.
542 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
543 Do not test allocator rebinding extension for C++2a.
544 * testsuite/23_containers/unordered_map/requirements/
545 explicit_instantiation/3.cc: Likewise.
546 * testsuite/23_containers/unordered_map/requirements/
547 explicit_instantiation/5.cc: Do not test allocator rebinding extension
549 * testsuite/23_containers/unordered_multimap/requirements/
550 explicit_instantiation/3.cc: Do not run test for C++2a.
551 * testsuite/23_containers/unordered_multimap/requirements/
552 explicit_instantiation/5.cc: Do not test allocator rebinding extension
554 * testsuite/23_containers/unordered_multiset/requirements/
555 explicit_instantiation/3.cc: Do not run test for C++2a.
556 * testsuite/23_containers/unordered_multiset/requirements/
557 explicit_instantiation/5.cc: Do not test allocator rebinding extension
559 * testsuite/23_containers/unordered_set/requirements/
560 explicit_instantiation/3.cc: Do not run test for C++2a.
561 * testsuite/23_containers/unordered_set/requirements/
562 explicit_instantiation/5.cc: Do not test allocator rebinding extension
564 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
565 2.cc: Remove redundant test.
566 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
567 3.cc: Do not run test for C++2a.
568 * testsuite/23_containers/vector/requirements/explicit_instantiation/
571 * include/std/type_traits (is_empty, is_polymorphic, is_final)
572 (is_abstract, is_aggregate): Remove static_assert.
573 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
575 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
576 missing -std=gnu++17 option.
577 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
578 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
579 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
582 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
583 * testsuite/18_support/set_unexpected.cc: Likewise.
584 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
586 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
587 function to be valid in C++11.
588 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
589 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
590 include Library Fundamentals or Networking headers in C++11 mode.
591 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
593 * include/std/tuple (_TC): Replace with _TupleConstraints.
594 (_TupleConstraints): New helper for SFINAE constraints, with more
595 expressive member functions to reduce duplication when used.
596 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
597 (tuple::_TCC): Replace dummy type parameter with bool non-type
598 parameter that can be used to check the pack size.
599 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
600 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
601 checking constraints in constructors.
602 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
604 (tuple::tuple): Use new helpers to reduce repitition in constraints.
605 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
606 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
607 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
608 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
609 constraints in constructors.
610 (tuple::__is_alloc_arg()): New SFINAE helpers.
611 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
613 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
614 * testsuite/20_util/tuple/cons/90700.cc: New test.
615 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
616 to meet new constraint on allocator-extended default constructor.
618 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
620 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
621 * include/bits/stl_multimap.h (multimap): Likewise.
623 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
625 Rename variables and cleanup comments.
626 * include/bits/hashtable_policy.h
627 * include/bits/hashtable.h
629 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
631 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
632 Fix bgcolor for P0340R3.
633 * doc/html/*: Regenerate.
636 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
637 <experimental/memory_resource>.
638 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
639 P0339R6, P0340R3, P1164R1 and P1357R1.
640 * doc/html/*: Regenerate.
642 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
643 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
644 allocator::value_type assertion for C++2a.
645 * include/bits/hashtable.h: Likewise.
646 * include/bits/stl_deque.h: Likewise.
647 * include/bits/stl_list.h: Likewise.
648 * include/bits/stl_map.h: Likewise.
649 * include/bits/stl_multimap.h: Likewise.
650 * include/bits/stl_multiset.h: Likewise.
651 * include/bits/stl_set.h: Likewise.
652 * include/bits/stl_vector.h: Likewise.
653 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
654 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
655 * testsuite/23_containers/list/48101-3_neg.cc: New test.
656 * testsuite/23_containers/map/48101-3_neg.cc: New test.
657 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
658 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
659 * testsuite/23_containers/set/48101-3_neg.cc: New test.
660 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
661 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
662 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
663 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
664 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
666 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
668 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
670 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
672 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
674 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
676 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
678 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
680 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
683 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
684 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
685 * libsupc++/eh_term_handler.h: New header defining
686 _GLIBCXX_DEFAULT_TERM_HANDLER.
687 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
688 (set_terminate): Restore default handler when argument is null.
689 (set_unexpected): Likewise.
690 * testsuite/18_support/set_terminate.cc: New test.
691 * testsuite/18_support/set_unexpected.cc: New test.
693 * include/backward/hashtable.h (size_t, ptrdiff_t)
694 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
695 (distance, vector, pair, __iterator_category): Remove
696 using-declarations that add these names to namespace __gnu_cxx.
697 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
698 * include/ext/debug_allocator.h (size_t): Likewise.
699 * include/ext/functional (size_t, unary_function, binary_function)
700 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
702 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
703 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
704 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
705 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
706 * include/ext/numeric (iota): Fix outdated comment.
707 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
708 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
709 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
710 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
711 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
713 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
714 (allocator, __true_type, __false_type): Likewise.
716 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
719 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
720 New helpers for checking preconditions in traits.
721 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
722 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
723 (is_destructible, is_nothrow_destructible, is_constructible)
724 (is_default_constructible, is_copy_constructible)
725 (is_move_constructible, is_nothrow_default_constructible)
726 (is_nothrow_constructible, is_nothrow_copy_constructible)
727 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
728 (is_nothrow_assignable, is_nothrow_copy_assignable)
729 (is_nothrow_move_assignable, is_trivially_constructible)
730 (is_trivially_copy_constructible, is_trivially_move_constructible)
731 is_trivially_assignable, is_trivially_copy_assignable)
732 (is_trivially_move_assignable, is_trivially_destructible)
733 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
734 (is_invocable_r, is_nothrow_invocable)
735 (has_unique_object_representations, is_aggregate): Add static_asserts
736 to make sure that type traits are not misused with incomplete types.
737 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
738 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
739 base characteristics without assertions that can be reused in other
741 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
742 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
744 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
745 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
746 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
747 * testsuite/20_util/is_class/value.cc: Check incomplete type.
748 * testsuite/20_util/is_function/value.cc: Likewise.
749 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
750 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
752 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
753 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
754 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
755 * testsuite/20_util/is_union/value.cc: Likewise.
756 * testsuite/20_util/is_void/value.cc: Likewise.
757 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
759 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
761 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
762 Add new private member function.
763 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
764 (random_device::_M_init_pretr1(const string&)): Call new private
765 member with string data.
766 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
768 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
769 test using COW strings.
770 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
771 a value from the device.
772 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
773 Fix typo in token string.
775 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
777 LWG2788 basic_string spurious use of a default constructible allocator
778 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
779 (basic_string::_M_replace_dispatch): Construct temporary string with
780 the current allocator.
781 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
782 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
784 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
786 * doc/xml/manual/diagnostics.xml: Update list of headers that define
788 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
789 section about new/delete overloads. Improve section on verbose
791 * doc/html/*: Regenerate.
793 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
794 P0811R3. Change status of P1353R0.
795 * doc/html/*: Regenerate.
797 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
798 documentation of implementation-defined types for [thread.req.native].
799 * doc/xml/manual/status_cxx2017.xml: Update documentation of
800 implementation-defined strings for [variant.bad.access]. Fix typo in
801 documentation of implementation-defined support for [fs.conform.9945].
802 * doc/html/*: Regenerate.
804 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
807 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
808 that fails on mingw-w64.
811 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
812 (status(const path&, error_code&)): Use parent_path() to remove
814 (symlink_status(const path&, error_code&)): Duplicate workaround for
815 bug in _wstat for paths with trailing slash.
816 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
818 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
819 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
821 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
822 once instead of building it iteratively.
824 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
826 PR libstdc++/85494 use rdseed and rand_s in std::random_device
827 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
828 the assembler supports rdseed.
829 * config.h.in: Regenerate.
830 * configure: Regenerate.
831 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
832 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
833 * doc/html/*: Regenerate.
834 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
835 * include/bits/random.h (random_device::random_device()): Always call
836 _M_init rather than _M_init_pretr1.
837 (random_device::random_device(const string&)): Likewise.
838 (random_device::operator()()): Always call _M_getval().
839 (random_device::_M_file): Replace first member of union with an
840 anonymous struct, with _M_file as its first member.
841 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
842 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
843 (USE_MT19937): Define if none of the above are defined.
844 (USE_POSIX_FILE_IO): Define.
845 (_M_strtoul): Remove.
846 [USE_RDSEED] (__x86_rdseed): Define new function.
847 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
848 (random_device::_M_init(const string&)): Initialize new union members.
849 Add support for "rdseed" and "rand_s" tokens. Decide what the
850 "default" token does according to which USE_* macros are defined.
851 [USE_POSIX_FILE_IO]: Store a file descriptor.
852 [USE_MT19937]: Forward to _M_init_pretr1 instead.
853 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
854 code from _M_strtoul.
855 [!USE_MT19937]: Call _M_init, transforming the old default token or
856 numeric tokens to "default".
857 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
858 (random_device::_M_getval()): Use new union members to obtain a
859 random number from the stored function pointer or file descriptor.
860 [USE_MT19937]: Obtain a value from the mt19937 engine.
861 (random_device::_M_getval_pretr1()): Call _M_getval().
862 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
864 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
865 * testsuite/26_numerics/random/random_device/85494.cc: New test.
867 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
870 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
871 _M_split_cmpts() for a path with multiple components.
872 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
873 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
874 components and reserve space in vector. Return early when there is
876 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
877 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
879 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
880 form of std::equals for C++11 compatibility.
882 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
884 * doc/xml/manual/appendix_contributing.xml: Update pointer to
885 C++ standard at ansi.org.
887 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
889 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
890 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
893 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
894 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
896 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
898 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
900 * testsuite/20_util/function_objects/invoke/3.cc: New test.
901 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
902 "compile" test to "run".
904 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
905 * doc/html/*: Regenerate.
906 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
907 rvalue aliasing constructor.
908 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
909 (reinterpret_pointer_cast): Add overloads taking rvalues.
910 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
911 Add rvalue aliasing constructor.
912 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
913 "run" and check return values as well as types.
914 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
915 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
916 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
917 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
920 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
921 * doc/xml/manual/intro.xml: Likewise.
922 * include/std/future (__create_task_state): Add default arguments
923 to make providing an allocator optional.
924 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
925 instead of delegating to another constructor.
926 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
927 define allocator-extended constructors for C++17 and later.
928 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
930 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
931 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
932 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
934 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
936 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
937 Don't run the libstdc++/83237 part on simulator targets.
939 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
941 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
943 * doc/html/*: Regenerate.
945 * include/experimental/any (__any_caster): Use RTTI if comparing
946 addresses fails, to support non-unique addresses in shared libraries.
947 * include/std/any (__any_caster): Likewise.
950 * include/experimental/any (__any_caster): Constrain to only be
951 callable for object types. Use remove_cv_t instead of decay_t.
952 If the type decays or isn't copy constructible, compare the manager
953 function to a dummy specialization.
954 (__any_caster): Add overload constrained for non-object types.
955 (any::_Manager_internal<_Op>): Add dummy specialization.
956 * testsuite/experimental/any/misc/any_cast.cc: Test function types
959 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
962 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
963 reversed arguments to uninitialized_copy_n.
964 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
965 is unchanged by copy assignment.
966 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
967 compare path components.
970 * include/experimental/memory_resource: Add system header pragma and
971 do not define anything unless compiled as C++14 or later.
972 (__resource_adaptor_common::__guaranteed_alignment): Remove.
973 (__resource_adaptor_imp::do_allocate): If the requested alignment
974 is a fundamental alignment then either allocate directly from _M_alloc
975 or call the new _M_allocate function.
976 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
977 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
978 of the allocator rebound to a POD type with the specified alignment.
979 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
980 * testsuite/experimental/memory_resource/new_delete_resource.cc:
981 Adjust expected allocation sizes.
982 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
983 xfail for Solaris x86.
985 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
987 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
988 * include/pstl/execution_defs.h (__enable_if_execution_policy):
989 Use std::__remove_cvref_t when building with GCC.
991 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
994 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
995 Use "additional_flags" to pass -ltbb to v3_target_compile command.
996 Use check_v3_target_prop_cached to cache the result of the test.
998 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1000 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1003 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1004 Changed v3_target_compile check from preprocess to executable.
1005 Added "-ltbb" to v3_target_compile flags.
1007 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1009 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1010 Add check for Thread Building Blocks 2018 or later.
1012 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1014 * testsuite/experimental/names.cc: Only include Networking TS headers
1015 on targets with the necessary Gthreads support.
1017 2019-05-20 Marek Polacek <polacek@redhat.com>
1019 CWG 2094 - volatile scalars are trivially copyable.
1021 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1022 result for volatile int.
1024 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1026 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1027 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1030 PR c++/90532 Ensure __is_constructible(T[]) is false
1031 * include/std/type_traits (__do_is_default_constructible_impl)
1032 (__is_default_constructible_atom, __is_default_constructible_safe):
1034 (is_default_constructible): Use is_constructible.
1035 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1036 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1037 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1038 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1041 2019-05-20 Pádraig Brady <pbrady@fb.com>
1043 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1044 to the deallocator with -fsized-deallocation.
1046 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1048 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1049 test by passing correct alignment to deallocate function.
1051 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1054 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1055 Raise exception if unique_ptr tuple member has unknown structure.
1056 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1057 Adjust worker to support new __uniq_ptr_data base class. Do not
1058 assume field called _M_head_impl is the first tuple element.
1060 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1062 * include/bits/stl_deque.h
1063 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1064 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1065 (_Deque_base::_Deque_impl_data): New.
1066 (_Deque_base::_Deque_impl): Inherit latter.
1067 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1068 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1069 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1070 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1071 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1072 (deque<>::deque()): Default.
1073 (deque<>::deque(deque&&)): Default.
1074 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1075 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1076 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1077 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1078 _M_range_initialize.
1079 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1080 (deque<>::resize(size_type, const value_type&)): Share a single
1082 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1083 _M_range_insert_aux.
1084 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1085 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1086 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1087 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1089 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1092 * include/std/variant (holds_alternative, get, get_if): Improve
1093 static assertion messages.
1094 (bad_variant_access::bad_variant_access()): Change default message.
1095 (__throw_bad_variant_access(bool)): New overload.
1096 (get): Use new overload.
1097 (visit, visit<R>): Improve exception message.
1099 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1100 targets. Add more cases from P0608R3.
1101 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1103 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1104 * include/experimental/type_traits (is_detected_exact)
1105 (is_detected_exact_v): Likewise.
1106 * include/pstl/execution_defs.h (is_execution_policy)
1107 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1108 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1109 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1110 * testsuite/experimental/names.cc: New test.
1113 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1114 assertions from the destructor.
1115 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1116 Move static_assert for hash function to here.
1117 (_Hash_table_base::_M_equals): Move static_assert for equality
1119 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1121 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1122 the value directly instead of calling _S_value.
1123 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1124 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1125 _S_key(_Const_Link_type).
1126 * testsuite/23_containers/set/85965.cc: Check construction,
1127 destruction, assignment and size() do not trigger the assertions.
1128 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1129 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1131 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1132 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1133 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1134 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1135 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1136 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1137 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1139 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1140 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1143 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1145 * doc/html/*: Regenerate.
1146 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1147 of decay_t (P0777R1).
1149 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1151 Move from state of allocators (LWG2593)
1152 * include/bits/stl_deque.h
1153 (_Deque_base(_Deque_base&&, false_type)): Remove.
1154 (_Deque_base(_Deque_base&&, true_type)): Remove.
1155 (_Deque_base(_Deque_base&&)): Adapt.
1156 (_Deque_base::_M_move_impl()): Remove.
1157 * testsuite/util/testsuite_allocator.h
1158 (propagating_allocator(propagating_allocator&&)): Preserve move from
1160 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1162 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1164 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1165 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1166 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1168 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1170 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1171 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1173 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1175 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1177 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1179 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1181 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1183 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1185 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1188 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1190 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1191 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1193 * include/std/variant (__overload_set): Remove.
1195 (_Build_FUN): New class template to define a single FUN overload,
1196 with specializations to prevent unwanted conversions, as per P0608R3.
1197 (_Build_FUNs): New class template to build an overload set of FUN.
1198 (_FUN_type): New alias template to perform overload resolution.
1199 (__accepted_type): Use integer_constant base for failure case. Use
1200 _FUN_type for successful case.
1201 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1202 (variant::variant(_Tp&&)): Likewise.
1203 (variant::operator=(_Tp&&)): Likewise.
1205 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1206 Replace raw visitation with a runtime check for the valueless state
1207 and a non-raw visitor.
1208 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1209 (variant::index()): Remove branch.
1210 (variant::swap(variant&)): Use valueless_by_exception() instead of
1211 comparing the index to variant_npos, and add likelihood attribute.
1213 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1214 (_Hashtable_base::_Equal_hash_code): Define new class template.
1215 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1218 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1219 Replace with _M_get non-static member function.
1220 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1222 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1223 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1225 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1226 _S_get accessors for members in EBO helpers.
1227 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1228 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1230 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1232 (_Hashtable_base::_M_eq()): Remove non-const overload.
1234 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1236 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1238 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1240 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1243 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1245 * config/os/solaris/solaris2.10: Move to ...
1246 * config/os/solaris: ... this.
1247 * configure.host (os_include_dir): Adapt.
1248 (abi_baseline_pair): Remove Solaris 10 handling.
1249 * config/abi/post/i386-solaris2.10: Remove.
1250 * config/abi/post/sparc-solaris2.10: Remove.
1251 * config/abi/post/i386-solaris2.11: Rename to ...
1252 * config/abi/post/i386-solaris: ... this.
1253 * config/abi/post/sparc-solaris2.11: Rename to ...
1254 * config/abi/post/sparc-solaris: ... this.
1256 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1259 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1262 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1264 * include/std/variant (__visit_with_index): Remove typedef.
1265 (__deduce_visit_result): New tag type.
1266 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1267 visitation of possibly-valueless variants, forwarding to __do_visit
1268 with the relevant tag type.
1269 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1270 and make lambda return void.
1271 (__variant_construct): Likewise.
1272 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1273 __raw_idx_visit and make lambda return void.
1274 (_Multi_array::__untag_result): Add metafunction to check the function
1275 pointer type for a tag type that dictates the kind of visitation.
1276 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1277 Use decltype(auto) instead of tagged function pointer type.
1278 (__gen_vtable_impl): Remove bool non-type parameter and unused
1279 _Variant_tuple parameter.
1280 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1281 (__gen_vtable_impl::__do_visit_invoke): Remove.
1282 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1283 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1284 for the visit<R> case, rather than dispatching to separate functions.
1285 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1287 (variant::swap): Likewise.
1288 (__do_visit): Replace two non-type template parameters with a single
1289 type parameter, so that the caller must specify the visitor's return
1290 type (or one of the tag types).
1291 (visit): Deduce a return type from the visitor and use the
1292 __deduce_visit_result tag to enforce that all overloads return the
1294 (visit<R>): Call __do_visit<R> with explicit result type.
1295 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1298 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1300 nonesuch is insufficiently useless (lwg2996)
1301 * include/std/type_traits (struct __nonesuch): Added private base
1302 class to make __nonesuch not an aggregate and removed deleted default
1304 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1305 (operator=(const pair&)): Use __nonesuch instead of
1306 __nonesuch_no_braces.
1307 (operator=(pair&&)): Likewise
1308 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1309 of __nonesuch_no_braces.
1310 (operator=(tuple&&)): Likewise
1311 * include/experimental/type_traits (struct nonesuch): Added private
1312 base class to make nonesuch not an aggregate and removed deleted
1313 default constructor.
1314 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1315 * testsuite/experimental/type_traits/nonesuch.cc: New.
1317 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1319 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1320 (_Function_handler): Remove partial specializations for void return
1321 types and pointers to member.
1322 (_Function_handler::_M_manager): Adapt to removal of
1323 _Simple_type_wrapper.
1324 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1325 * include/std/functional (_Bind_result::__enable_if_void)
1326 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1327 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1329 * include/std/future (__future_base::_Task_state::_M_run)
1330 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1331 change return type of lambda expressions.
1333 * include/bits/invoke.h (__invoke_r): Define new function implementing
1334 the INVOKE<R> pseudo-function.
1335 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1336 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1338 * include/std/type_traits (__is_nt_convertible_helper): Define it
1339 unconditionally, not only for C++20.
1340 (__is_nothrow_convertible): Define internal trait for use in C++11.
1341 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1342 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1343 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1344 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1345 that has nothrow explicit conversion but potentially-throwing implicit
1347 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1348 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1349 function to only consider implicit conversions.
1350 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1352 * include/std/iterator: Include <iosfwd> instead of <istream> and
1355 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1356 Remove unused, non-standard function.
1358 * include/bits/regex.h (match_results::max_size()): Adjust return
1359 value to account for prefix/suffix/unmatched subs.
1360 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1361 reset the contained sub matches.
1362 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1363 function to set result state following a failed match.
1364 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1365 sub_match states after _M_resize. Use _M_establish_failed_match.
1368 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1369 Replace single _Callable parameter with variadic _Args pack, to
1370 forward them directly to the tuple of decayed copies.
1371 * testsuite/30_threads/thread/cons/69724.cc: New test.
1373 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1375 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1376 * include/bits/basic_string.h: (operator=(const basic_string&):
1377 Move allocator decision to assign.
1378 (assign(const basic_string&)): Move allocator decision here.
1379 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1381 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1384 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1386 * testsuite/util/testsuite_allocator.h (memory_resource)
1387 (default_resource_mgr): Fix indentation.
1389 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1390 Use operator-> to access raw pointer member.
1391 * testsuite/23_containers/vector/59829.cc: Likewise.
1392 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1393 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1394 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1396 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1397 its constructors and equality operators. Change converting
1398 constructors to use operator-> to access private member of the other
1400 (PointerBase_void::operator->()): Add, for access to private member.
1401 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1402 (operator==(PointerBase, PointerBase)): Remove.
1403 (operator!=(PointerBase, PointerBase)): Remove.
1405 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1406 not assume field called _M_head_impl is the first tuple element.
1407 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1408 implementation more accurate.
1409 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1410 empty pointer type and non-empty deleter.
1412 LWG 2899 - Make is_move_constructible correct for unique_ptr
1413 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1414 move assignment operator.
1415 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1416 (__uniq_ptr_data): New class template with conditionally deleted
1418 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1419 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1420 constructor and move assignment operator as defaulted.
1421 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1422 __uniq_ptr_impl::release().
1423 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1424 to __uniq_ptr_impl::reset(pointer).
1425 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1426 Check for new __uniq_ptr_data type.
1427 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1429 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1431 PR libstdc++/90454.cc path construction from void*
1432 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1433 pointers to void are rejected as well as void.
1434 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1435 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1437 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1439 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1440 <remark> elements. Fix formatting of bibliography references.
1442 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1444 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1446 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1448 Remove Profile Mode, deprecated since 7.1.0
1449 * doc/Makefile.am: Remove XML file for profile mode docs.
1450 * doc/Makefile.in: Regenerate.
1451 * doc/xml/authors.xml: Remove authors of profile mode docs.
1452 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1454 * doc/xml/manual/debug.xml: Likewise.
1455 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1456 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1457 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1458 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1460 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1462 * doc/html/*: Regenerate.
1463 * include/Makefile.am: Remove profile mode headers.
1464 * include/Makefile.in: Regenerate.
1465 * include/bits/c++config (std::__profile): Remove namespace.
1466 [_GLIBCXX_PROFILE]: Remove checks for macro.
1467 * include/profile/array: Remove.
1468 * include/profile/base.h: Remove.
1469 * include/profile/bitset: Remove.
1470 * include/profile/deque: Remove.
1471 * include/profile/forward_list: Remove.
1472 * include/profile/impl/profiler.h: Remove.
1473 * include/profile/impl/profiler_algos.h: Remove.
1474 * include/profile/impl/profiler_container_size.h: Remove.
1475 * include/profile/impl/profiler_hash_func.h: Remove.
1476 * include/profile/impl/profiler_hashtable_size.h: Remove.
1477 * include/profile/impl/profiler_list_to_slist.h: Remove.
1478 * include/profile/impl/profiler_list_to_vector.h: Remove.
1479 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1480 * include/profile/impl/profiler_node.h: Remove.
1481 * include/profile/impl/profiler_state.h: Remove.
1482 * include/profile/impl/profiler_trace.h: Remove.
1483 * include/profile/impl/profiler_vector_size.h: Remove.
1484 * include/profile/impl/profiler_vector_to_list.h: Remove.
1485 * include/profile/iterator_tracker.h: Remove.
1486 * include/profile/list: Remove.
1487 * include/profile/map: Remove.
1488 * include/profile/map.h: Remove.
1489 * include/profile/multimap.h: Remove.
1490 * include/profile/multiset.h: Remove.
1491 * include/profile/ordered_base.h: Remove.
1492 * include/profile/set: Remove.
1493 * include/profile/set.h: Remove.
1494 * include/profile/unordered_base.h: Remove.
1495 * include/profile/unordered_map: Remove.
1496 * include/profile/unordered_set: Remove.
1497 * include/profile/vector: Remove.
1498 * scripts/run_doxygen: Do not process profile mode headers.
1499 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1501 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1502 Remove dg-skip-if for profile mode.
1503 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1504 preprocessor check for profile mode.
1505 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1506 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1508 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1510 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1511 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1512 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1513 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1514 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1516 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1518 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1520 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1522 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1523 preprocessor check for profile mode.
1524 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1526 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1527 Remove dg-skip-if for profile mode.
1528 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1529 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1530 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1531 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1532 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1533 * testsuite/Makefile.am: Remove profile_flags variable and
1534 * testsuite/Makefile.am: Remove profile_flags variable and
1535 check-profile target.
1536 * testsuite/Makefile.in: Regenerate.
1537 * testsuite/ext/profile/all.cc: Remove.
1538 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1539 * testsuite/ext/profile/profiler_algos.cc: Remove.
1540 * testsuite/ext/profile/replace_new.cc: Remove.
1541 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1542 preprocessor check for profile mode.
1543 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1544 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1545 (check_v3_target_normal_mode): Do not check for profile mode macro.
1546 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1548 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1549 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1550 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1551 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1552 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1553 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1554 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1555 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1556 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1557 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1559 Remove array_allocator extension, deprecated since 4.9.0
1560 * doc/xml/manual/allocator.xml: Remove documentation for
1562 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1563 * doc/xml/manual/using.xml: Remove header from documentation.
1564 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1565 * include/Makefile.in: Regenerate.
1566 * include/ext/array_allocator.h: Remove.
1567 * include/precompiled/extc++.h: Do not include removed header.
1568 * testsuite/ext/array_allocator/1.cc: Remove.
1569 * testsuite/ext/array_allocator/2.cc: Remove.
1570 * testsuite/ext/array_allocator/26875.cc: Remove.
1571 * testsuite/ext/array_allocator/3.cc: Remove.
1572 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1573 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1574 * testsuite/ext/array_allocator/check_new.cc: Remove.
1575 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1576 * testsuite/ext/headers.cc: Do not include removed header.
1578 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1580 * include/bits/stl_bvector.h
1581 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1583 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1585 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1587 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1589 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1591 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1593 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1595 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1597 (_Bit_iterator::operator-(difference_type)): Likewise.
1598 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1599 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1601 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1602 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1604 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1607 * testsuite/util/thread/all.h: Do not use remove_pointer for
1608 std::thread::native_handle_type.
1611 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1612 (_Variant_storage<true, Types...>::_M_reset()))
1613 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1614 (__get_storage): Likewise.
1615 (variant): Add noexcept to friend declarations for __get and
1619 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1620 Use _Require for constraints.
1621 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1623 (__uniq_ptr_hash): New base class with conditionally-disabled call
1625 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1626 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1627 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1629 * include/bits/shared_ptr.h: Improve docs.
1630 * include/bits/shared_ptr_base.h: Likewise.
1631 * include/bits/stl_uninitialized.h: Likewise.
1632 * include/bits/unique_ptr.h: Likewise.
1633 * libsupc++/new: Likewise.
1635 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1637 * include/bits/stl_deque.h
1638 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1640 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1642 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1644 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1646 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1648 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1650 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1652 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1654 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
1657 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1658 (test01): Reserve for number of insertions to avoid rehash during test.
1659 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1661 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1666 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
1668 * include/experimental/bits/fs_path.h: Improve docs.
1669 * include/experimental/bits/net.h: Fix wrong header name in comment.
1670 Do not document implementation details.
1671 * include/experimental/netfwd: Fix doxygen grouping.
1673 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1675 * include/bits/stl_pair.h: Improve docs.
1676 * include/std/tuple: Likewise.
1678 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1680 * include/std/chrono: Improve docs.
1681 * include/std/ratio: Do not document implementation details.
1682 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1684 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1687 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1688 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1689 (__duration_common_type): New helper.
1690 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1691 __duration_common_type.
1692 (__timepoint_common_type_wrapper): Replace with ...
1693 (__timepoint_common_type): New helper.
1694 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1695 Use __time_point_common_type.
1696 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1697 (__common_type_impl): If either argument is transformed by decay,
1698 use the common_type of the decayed types.
1699 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1700 decayed, use __do_common_type_impl to get the common_type.
1701 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1702 (__do_member_type_wrapper, __member_type_wrapper)
1703 (__expanded_common_type_wrapper): Remove.
1704 (__common_type_pack, __common_type_fold): New helpers.
1705 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1706 __member_type_wrapper and __expanded_common_type_wrapper.
1707 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1708 Test zero-length template argument list.
1709 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1710 Test single argument cases and argument types that should decay.
1711 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1712 Adjust expected error.
1713 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1715 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1716 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1717 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1719 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1721 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1723 Make allocator propagation more consistent for
1724 operator+(basic_string) (P1165R1)
1725 * include/bits/basic_string.h
1726 (operator+(basic_string&&, basic_string&&): Changed resulting
1727 allocator to always be the one from the first parameter.
1728 * include/bits/basic_string.tcc
1729 (operator+(const _CharT*, const basic_string&)): Changed
1730 resulting allocator to be SOCCC on the second parameter's allocator.
1731 (operator+(_CharT, const basic_string&)): Likewise.
1732 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1734 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1737 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1739 * include/bits/regex.h: Improve docs.
1740 * include/bits/regex.tcc: Do not document implementation details.
1742 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1744 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1746 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1747 Add type printer for container types in std::__debug namespace.
1748 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1749 (gdb-tests): Use distinct parameters for the type of test and use of
1751 (gdb-test): Check for regex test even if 'whatis' test.
1752 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1754 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1755 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1756 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1757 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1758 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1759 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1760 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1762 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1764 * include/std/system_error (error_category): Fix comment.
1767 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1768 argument is an empty path.
1769 (absolute(const path&, error_code&)): Use invalid_argument as error
1770 code instead of no_such_file_or_directory.
1771 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1772 of non-existent paths and empty paths with both overloads of absolute.
1774 * include/std/system_error (error_category, error_code)
1775 (error_condition): Improve docs.
1776 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1777 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1778 to class documentation. Suppress documentation for implementation
1780 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1781 Suppress documentation for implementation details.
1783 * include/std/system_error (error_code): Remove friend declaration
1784 for hash<error_code>.
1785 (hash<error_code>::operator()): Use public member functions to access
1787 (hash<error_condition>::operator()): Use address of category, not
1788 its object representation.
1789 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1790 Use public member functions to access value and category.
1791 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1793 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1795 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1796 * include/bits/hashtable_policy.h
1797 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1798 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1799 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1800 smaller than input value rather than always greater. Preserve
1801 _M_next_resize if called with 0 input. Use __builtin_floorl.
1802 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1803 elements + number of insertions is greater than _M_next_resize. Start
1804 with 11 buckets if not told otherwise. Use __builtin_floorl.
1805 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1806 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1807 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1808 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1809 told otherwise. Use __builtin_floorl.
1810 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1811 to also validate _Power2_rehash_policy.
1812 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1815 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1818 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1822 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1823 overflow warning with -Wpedantic -Wsystem-headers.
1825 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1828 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1829 * include/bits/move.h (swap): Remove extra parentheses.
1831 * include/experimental/bits/lfts_config.h: Improve doc markup.
1832 * include/experimental/optional: Improve docs.
1833 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1834 (__constexpr_addressof): Remove.
1835 (optional::operator->()): Use std::__addressof().
1836 * include/std/optional (optional::operator->()): Adjust whitespace.
1837 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1838 that operator-> is still constexpr with overloaded operator&. Change
1839 to compile-only test.
1840 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1843 * include/bits/shared_ptr.h: Improve docs.
1844 * include/bits/shared_ptr_atomic.h: Likewise.
1845 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1847 * include/bits/basic_string.h: Fix iterator/index confusion in
1849 * include/bits/range_access.h: Fix Doxygen warnings.
1850 * include/bits/refwrap.h: Do not document implementation details.
1851 (ref, cref): Group docs with reference_wrapper.
1852 * include/std/fstream: Fix Doxygen markup.
1853 * libsupc++/initializer_list (begin, end): Group docs with
1856 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1858 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1859 * include/std/mutex: Likewise.
1860 * include/std/shared_mutex: Likewise.
1862 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1863 * include/bits/fs_fwd.h: Likewise.
1864 * include/bits/fs_ops.h: Likewise.
1865 * include/bits/fs_path.h: Likewise.
1866 * include/std/filesystem: Likewise.
1868 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1869 * include/experimental/buffer: Likewise.
1870 * include/experimental/executor: Likewise.
1871 * include/experimental/internet: Likewise.
1872 * include/experimental/io_context: Likewise.
1873 * include/experimental/net: Likewise.
1874 * include/experimental/netfwd: Likewise.
1875 * include/experimental/socket: Likewise.
1876 * include/experimental/timer: Likewise.
1878 * doc/doxygen/doxygroups.cc: Move description of experimental group
1880 * include/experimental/algorithm: Add to libfund-ts doc group.
1881 * include/experimental/any: Likewise. Do not document implementation
1883 * include/experimental/array: Add to libfund-ts doc group.
1884 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1885 for Library Fundamentals.
1886 * include/experimental/chrono: Add to libfund-ts doc group.
1887 * include/experimental/deque: Likewise.
1888 * include/experimental/forward_list: Likewise.
1889 * include/experimental/functional: Likewise.
1890 * include/experimental/iterator: Likewise.
1891 * include/experimental/list: Likewise.
1892 * include/experimental/map: Likewise.
1893 * include/experimental/memory: Likewise.
1894 * include/experimental/memory_resource: Likewise. Improve docs.
1896 * include/experimental/numeric: Add to libfund-ts doc group.
1897 * include/experimental/optional: Likewise.
1898 * include/experimental/propagate_const: Likewise.
1899 * include/experimental/random: Likewise.
1900 * include/experimental/ratio: Likewise.
1901 * include/experimental/regex: Likewise.
1902 * include/experimental/set: Likewise.
1903 * include/experimental/source_location: Likewise.
1904 * include/experimental/string: Likewise.
1905 * include/experimental/string_view: Likewise.
1906 * include/experimental/system_error: Likewise.
1907 * include/experimental/tuple: Likewise.
1908 * include/experimental/type_traits: Likewise.
1909 * include/experimental/unordered_map: Likewise.
1910 * include/experimental/unordered_set: Likewise.
1911 * include/experimental/utility: Likewise.
1912 * include/experimental/vector: Likewise.
1913 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1914 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1915 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1917 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1918 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1919 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1920 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1921 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1923 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1924 * include/experimental/bits/fs_fwd.h: Improve docs.
1925 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1926 * include/experimental/bits/fs_path.h: Likewise.
1927 (path, filesystem_error, u8path): Improve docs.
1928 * include/experimental/filesystem: Link to docs for TS.
1930 * config/allocator/new_allocator_base.h (__allocator_base): Add
1931 workaround for Doxygen bug #6945.
1932 * include/std/memory: Improve docs. Define group for pointer safety.
1933 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1934 conditional to suppress documentation for implementation details.
1936 * include/bits/specfun.h: Improve docs.
1937 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1940 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1941 (std::experimental): Add docs.
1942 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1943 namespace to nothing when generating docs.
1944 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1945 * include/std/chrono (std::chrono): Likewise.
1946 * include/std/functional (std::placeholders): Likewise.
1947 * include/std/thread (std::this_thread): Likewise.
1949 * include/parallel/settings.h: Fix Doxygen markup.
1951 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1952 anything unless PB_DS_CLASS_C_DEC is defined.
1953 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1954 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1955 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1956 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1957 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1958 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1959 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1961 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1962 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1963 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1964 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1965 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1966 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1967 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1968 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1969 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1970 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1971 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1973 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1974 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1976 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1979 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1980 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1981 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1984 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1986 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1987 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1988 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1989 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1990 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1991 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1993 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1994 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1997 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2000 * include/std/complex (__complex_proj): Return parameter unchanged.
2001 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2002 floating-point types to take std::complex arguments.
2003 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2004 floating-point types.
2005 * testsuite/26_numerics/complex/proj.cc: New test.
2007 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2009 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2010 to _Lock_policyE[012].
2011 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2013 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2015 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2016 macros accidentally left in.
2017 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2018 unnecessary -lstdc++fs option. Fix test for mingw.
2019 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2022 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2024 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2026 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2028 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2030 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2031 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2034 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2036 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2039 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2040 class template and partial specialization.
2043 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2045 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2046 functions to convert a value to an integral type.
2047 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2048 (fill_n): Convert _Size parameter to an integral type.
2049 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2050 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2051 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2052 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2053 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2054 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2056 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2058 Adding noexcept-specification on tuple constructors (LWG 2899)
2059 * libstdc++-v3/include/std/tuple:
2060 (tuple()): Add noexcept-specification.
2061 (tuple(const _Elements&...)): Likewise
2062 (tuple(_UElements&&...)): Likewise
2063 (tuple(const tuple<_UElements...>&)): Likewise
2064 (tuple(tuple<_UElements...>&&)): Likewise
2065 (tuple(const _T1&, const _T2&)): Likewise
2066 (tuple(_U1&&, _U2&&)): Likewise
2067 (tuple(const tuple<_U1, _U2>&): Likewise
2068 (tuple(tuple<_U1, _U2>&&): Likewise
2069 (tuple(const pair<_U1, _U2>&): Likewise
2070 (tuple(pair<_U1, _U2>&&): Likewise
2071 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2073 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2076 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2077 arguments with __restrict.
2079 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2081 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2083 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2085 * include/experimental/bits/fs_path.h
2086 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2087 avoid redundant call to _S_convert_loc with non-const pointers.
2089 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2090 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2091 * testsuite/21_strings/basic_string/hash/hash.cc
2092 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2093 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2094 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2096 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2097 wstring::_M_replace_dispatch with more specific patterns.
2098 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2099 Create const std::string to avoid redundant call to _S_convert_loc
2100 with non-const pointers.
2101 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2102 avoid unnecessary basic_string::assign instantiations.
2104 * include/std/memory (__uses_alloc_args): Add string-literal to
2105 static_assert, to match the one in __uses_alloc.
2106 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2107 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2108 for recursive uses-allocator construction of nested pairs.
2109 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2112 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2114 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2115 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2116 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2117 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2119 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2120 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2121 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2122 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2123 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2124 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2125 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2127 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2130 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2131 * include/std/scoped_allocator [__cplusplus > 201703L]
2132 (scoped_allocator_adaptor::construct): Define in terms of
2133 uses_allocator_construction_args, as per P0591R4.
2134 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2135 * testsuite/util/testsuite_allocator.h: Remove name of unused
2138 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2140 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2141 * doc/html/*: Regenerate.
2143 * include/bits/fs_path.h (operator<, operator<=, operator>)
2144 (operator>=, operator==, operator!=): Make hidden friends, as per
2146 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2147 string type in test.
2148 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2150 * include/std/any (any::any(ValueType&&)): Use __and_v.
2151 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2154 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2156 * include/std/type_traits (__result_of_memfun): Use remove_reference
2157 instead of __remove_cvref_t and remove redundant is_same check.
2158 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2160 * include/experimental/string_view (basic_string_view::pointer)
2161 (basic_string_view::reference): Fix to refer to non-const value_type.
2162 * include/bits/basic_string.h (basic_string): Use __sv_check and
2163 __sv_limit instead of basic_string_view::_M_check and
2164 basic_string_view::_M_limit.
2165 * include/std/string_view (__sv_check, __sv_limit): New
2166 helper functions to replace basic_string_view::_M_check and
2167 basic_string_view::_M_limit.
2168 (basic_string_view): Add static assertions to enforce ill-formed
2169 requirement for traits_type::char_type from P1148R0, and to enforce
2170 required properties of char-like types.
2171 (basic_string_view::pointer, basic_string_view::reference): Fix to
2172 refer to non-const value_type.
2173 (basic_string_view::operator[], basic_string_view::at)
2174 (basic_string_view::front, basic_string_view::back)
2175 (basic_string_view::data): Use const_reference and const_pointer
2176 typedefs for return types.
2177 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2178 (hash<wstring_view>): Fix argument_type typedef.
2179 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2180 char/1.cc: Fix expected return type of basic_string_view::data().
2181 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2182 wchar_t/1.cc: Likewise.
2183 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2184 char/1.cc: Likewise.
2185 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2186 wchar_t/1.cc: Likewise.
2187 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2189 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2190 Check reference and pointer typedefs.
2191 * testsuite/experimental/string_view/requirements/typedefs.cc:
2193 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2194 Fix expected return type of basic_string_view::data().
2195 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2197 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2199 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2203 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2204 Avoid a runtime check for types that can never be stored in std::any.
2205 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2208 PR libstdc++/90220 (partial)
2209 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2210 not attempt ill-formed static_cast to pointers to non-object types.
2211 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2214 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2215 prevent -Wcatch-value warning.
2217 * include/std/variant (__variant_construct): Use template parameter
2218 type instead of equivalent decltype-specifier.
2219 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2220 Replace forward with move.
2221 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2222 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2223 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2224 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2225 index after construction succeeds.
2226 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2227 if-constexpr checks that are always true. Use __remove_cvref_t instead
2228 of remove_reference so that is_nothrow_move_constructible check
2229 doesn't use a const rvalue parameter. In the potentially-throwing case
2230 construct a temporary and move assign it, as per LWG 2904.
2231 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2232 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2233 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2234 construct a temporary and move assign from it, as per LWG 2904.
2235 * testsuite/20_util/variant/exception_safety.cc: Check that
2236 assignment operators have strong exception safety guarantee.
2238 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2240 Document PSTL linker flags
2242 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2244 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2246 * include/std/variant (__detail::__variant::_Traits): Make
2247 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2248 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2250 (__detail::__variant::_Copy_assign_alias): Only depend on
2251 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2252 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2253 move assignment operators.
2256 * include/std/variant (variant::__not_self): New helper for the
2257 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2258 (variant::__to_type_impl): Remove.
2259 (variant::__to_type): Add default argument to check pack size, instead
2260 of using __to_type_impl.
2261 (variant::__accepted_type): Add default argument using __not_self.
2262 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2263 for variant(T&&) constructor constraint.
2264 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2265 Extract __accepted_type into a named template parameter for reuse in
2266 other constraints and in the exception specification.
2267 (variant::variant(in_place_type_t<T>, Args&&...))
2268 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2269 (variant::variant(in_place_index_t<T>, Args&&...))
2270 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2271 (variant::operator=T&&)): Remove redundant && from trait arguments.
2272 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2273 isn't used for in_place_type or in_place_index arguments.
2275 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2276 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2277 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2279 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2280 Bernd Edlinger <bernd.edlinger@hotmail.de>
2281 Jakub Jelinek <jakub@redhat.com>
2284 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2285 general-regs-only target attribute for ARM.
2287 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2290 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2291 specialization also depend on is_nothrow_move_constructible.
2292 * include/std/variant (__detail::__variant::__never_valueless()):
2293 Only true if the variant would have a move assignment operator.
2294 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2295 Check __never_valueless<T...>().
2296 (variant::emplace): Only perform non-throwing move assignments
2297 for never-valueless alternatives if the variant has a move assignment
2299 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2300 types can be emplaced into non-assignable variants.
2301 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2302 don't get copied when emplaced into non-assignable variants.
2304 * include/std/variant (__detail::__variant::__ref_cast): Remove
2306 (__detail::__variant::_Uninitialized::_M_get)
2307 (__detail::__variant::__get)
2308 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2310 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2312 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2314 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2315 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2316 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2317 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2319 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2321 Delegate PSTL configuration to pstl/pstl_config.h
2323 * include/bits/c++config: Remove explicit PSTL configuration
2324 macros and use definitions from <pstl/pstl_config.h>.
2326 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2328 Cleanup algorithm implementations
2329 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2331 (mismatch): Forward execution policy.
2332 (equal): Qualify call to std::equal().
2333 (partial_sort): Forward execution policy.
2334 (inplace_merge): Forward execution policy.
2336 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2338 Improve implementation of parallel equal()
2339 * include/pstl/algorithm_impl.h
2340 (__internal::__brick_equal): use "4 iterator" version of
2342 (__internal::__brick_equal): use simd for random access
2343 iterators on unsequenced execution policies.
2344 (__internal::__pattern_equal): add "4 iterator" version
2345 (__internal::__pattern_equal): dispatch to simd __brick_equal
2346 for vector-only execution policies.
2347 (__internal::__pattern_equal): dispatch to __parallel_or for
2348 parallel execution policies.
2349 * include/pstl/glue_algorithm_impl.h
2350 (std::equal): dispatch to "4 iterator" version of
2351 __internal::__pattern_equal().
2353 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2356 * include/bits/forward_list.h (operator==): Do not use operator!= to
2358 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2359 earlier in the list, so that sort is stable.
2360 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2361 * testsuite/23_containers/forward_list/comparable.cc: Test with
2362 types that meet the minimum EqualityComparable and LessThanComparable
2363 requirements. Remove irrelevant comment.
2365 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2366 Do not depend on whether all alternative types are move constructible.
2367 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2368 from the operand when deciding whether to perform the assignment.
2369 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2370 with deleted move constructor and deleted move assignment operator.
2371 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2372 behaviour of variants with DeletedMoves as an alternative.
2373 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2374 (move_ctor, move_assign): Check that moving a variant with a
2375 DeletedMoves alternative falls back to copying instead of moving.
2377 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2378 from static_assert declarations.
2380 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2381 actually match its name.
2382 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2383 (test_swap()): Fix result for MoveCtorOnly and check
2384 MoveCtorAndSwapOnly.
2386 * include/std/optional (optional::value_or(U&&) &&): Add missing
2387 constexpr specifier.
2388 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2389 for disengaged optionals and rvalue optionals.
2390 * testsuite/20_util/optional/observers/4.cc: Likewise.
2392 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2394 * include/pstl/algorithm_impl.h: Uglify identfiers.
2395 * include/pstl/numeric_impl.h: Uglify identfiers.
2396 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2398 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2400 * include/bits/c++config:
2401 Add definition for __PSTL_ASSERT.
2402 Add definition for __PSTL_ASSERT_MSG.
2403 * include/pstl/algorithm_impl.h: Replace use of assert().
2404 * include/pstl/numeric_impl.h: Replace use of assert().
2405 * include/pstl/parallel_backend_tbb.h:
2406 Replace use of assert().
2407 Replace use of __TBB_ASSERT().
2408 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2410 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2413 * src/c++17/memory_resource.cc
2414 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2415 needed to allow placing a _Chunk at the end of the buffer.
2416 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2418 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2420 * doc/xml/faq.xml: Add information about emergency EH pool.
2421 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2422 Move outdated information on mt_allocator to a separate section.
2423 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2424 doesn't affect the default allocator.
2426 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2430 * testsuite/20_util/variant/89851.cc: New test.
2432 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2434 * include/std/variant: Adjust whitespace. Add comments.
2435 (_Multi_array): Leave primary template undefined.
2436 (_Multi_array<_Tp>): Define partial specialization for base case of
2438 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2439 which is always a reference.
2440 (__gen_vtable::_S_apply()): Remove function, inline body into
2441 default member initializer.
2442 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2444 * include/std/variant (__variant_idx_cookie): Add member type.
2445 (__visitor_result_type): Remove.
2446 (__do_visit): Use invoke_result instead of __visitor_result_type.
2447 * testsuite/20_util/variant/visit.cc: New test.
2450 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2452 * testsuite/20_util/variant/90008.cc: New test.
2454 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2456 * include/pstl/algorithm_impl.h: Add namespace qualification.
2457 * include/pstl/execution_defs.h: Add namespace qualification.
2458 * include/pstl/execution_impl.h: Add namespace qualification.
2459 * include/pstl/numeric_impl.h: Add namespace qualification.
2460 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2461 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2462 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2464 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2466 Fix visit<R> for variant.
2467 * include/std/variant (__do_visit): Add a template parameter
2468 for enforcing same return types for visit.
2469 (__gen_vtable_impl): Likewise.
2470 (_S_apply_single_alt): Adjust.
2471 (__visit_invoke_impl): New. Handle casting to void.
2472 (__do_visit_invoke): New. Enforces same return types.
2473 (__do_visit_invoke_r): New. Converts return types.
2474 (__visit_invoke): Adjust.
2475 (__gen_vtable): Add a template parameter for enforcing
2476 same return types for visit.
2477 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2478 different return types.
2479 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2480 visitors with different return types don't accidentally
2481 compile with regular visitation.
2483 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2485 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2486 dg-require-filesystem-ts.
2488 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2490 * doc/xml/manual/status_cxx2020.xml: Update status.
2491 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2492 * testsuite/20_util/variant/visit_r.cc: New test.
2494 * include/bits/fs_dir.h (directory_iterator::operator*)
2495 (directory_iterator::operator->): Add noexcept.
2496 (operator==, operator!=): Replace namespace-scope equality operators
2497 for directory iterators with hidden friends.
2500 * config/abi/pre/gnu.ver: Add missing exports.
2501 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2504 * config/abi/pre/gnu.ver: Export new symbols.
2505 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2506 (recursive_directory_iterator::recursion_pending())
2507 (recursive_directory_iterator::disable_recursion_pending()): Remove
2508 inline definitions. Make noexcept.
2509 (recursive_directory_iterator::depth())
2510 (recursive_directory_iterator::operator*())
2511 (recursive_directory_iterator::operator->()): Make noexcept.
2512 (recursive_directory_iterator::_M_options)
2513 (recursive_directory_iterator::_M_pending): Remove data members.
2514 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2515 (recursive_directory_iterator::recursive_directory_iterator): Remove
2516 ctor-initializer. Use new constructor for _Dir_stack.
2517 (recursive_directory_iterator::options())
2518 (recursive_directory_iterator::recursion_pending())
2519 (recursive_directory_iterator::disable_recursion_pending()): Add
2520 non-inline definitions.
2521 (recursive_directory_iterator::depth()): Make noexcept.
2522 (recursive_directory_iterator::increment(error_code&))
2523 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2524 location of options and recursion_pending members.
2525 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2526 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2527 user-declared move constructor and assignment operator, to make the
2530 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2531 d_type == DT_UNKNOWN immediately.
2532 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2534 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2536 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2538 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2539 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2542 PR libstdc++/87431 (again)
2543 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2544 Define partial specialization for basic_string.
2545 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2546 shared_ptr and weak_ptr.
2547 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2549 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2551 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2553 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2555 * include/std/any (_Never_valueless_alt): Define explicit
2556 specialization for any.
2557 * include/std/variant (_Never_valueless_alt): Define primary template.
2558 (__never_valueless): Use _Never_valueless_alt instead of
2559 is_trivially_copyable.
2560 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2561 initializations to avoid try-catch overhead. Add special case for
2562 scalars produced by potentially-throwing conversions. Use
2563 _Never_valueless_alt instead of is_trivially_copyable for the
2564 remaining strong exception-safety cases.
2565 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2566 * testsuite/20_util/variant/87431.cc: Run both test functions.
2567 * testsuite/20_util/variant/exception_safety.cc: New test.
2568 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2569 so the variant becomes valueless.
2571 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2574 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2576 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2578 * include/std/string (__hash_string_base): New class template defining
2579 operator() for hashing strings.
2580 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2581 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2582 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2583 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2585 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2587 Use single-visitation in variant assignment and swap and relops.
2588 Also use indices instead of types when checking whether
2589 variants hold the same thing.
2590 * include/std/variant (__do_visit): Add a template parameter
2591 for index visitation, invoke with indices if index visitation
2593 (__variant_idx_cookie): New.
2594 (__visit_with_index): Likewise.
2595 (_Copy_assign_base::operator=): Do single-visitation with
2597 (_Move_assign_base::operator=): Likewise.
2598 (_Extra_visit_slot_needed): Adjust.
2599 (__visit_invoke): Call with indices if it's an index visitor.
2600 (relops): Do single-visitation with an index visitor.
2602 (__visitor_result_type): New.
2604 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2606 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2608 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2610 Don't revisit a variant we are already visiting.
2611 * include/std/variant (__variant_construct_single): New.
2612 (__variant_construct): Use it.
2613 (_M_destructive_move): Likewise.
2614 (_M_destructive_copy): Likewise.
2615 (_Copy_assign_base::operator=): Adjust.
2616 (_Move_assign_base::operator=): Likewise.
2619 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2622 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2623 destructor so they are not evaluated until the _Key type is complete.
2624 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2625 * testsuite/23_containers/set/85965.cc: New test.
2626 * testsuite/23_containers/unordered_set/85965.cc: New test.
2627 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2628 with regexp matching the corresponding _Rb_tree specialization.
2629 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2630 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2631 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2632 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2633 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2634 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2635 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2637 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2640 Fix based on a suggestion by Antony Polukhin.
2641 * include/std/variant (__never_valueless): New.
2643 (_Extra_visit_slot_needed): New.
2644 (_Multi_array): Use it.
2645 (_S_apply_all_alts): Likewise.
2647 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2650 Fix based on a suggestion by Antony Polukhin.
2651 * include/std/variant (__gen_vtable): Don't reserve an
2652 additional table slot, _Multi_array already does that.
2654 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2657 Fix based on a suggestion by Antony Polukhin.
2658 * include/std/variant (__variant_construct): Capture a pointer
2659 to the storage and visit just one variant.
2661 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
2663 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2664 Doxygen-generated pages with unstable URL.
2665 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2666 * doc/xml/manual/extensions.xml: Likewise.
2667 * doc/xml/manual/parallel_mode.xml: Likewise.
2668 * doc/xml/manual/support.xml: Likewise.
2670 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2671 avoid -Wconversion warnings.
2673 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
2675 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2676 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2677 (allstamped): Add stamp-pstl.
2678 (install-headers): Add ptsl_builddir.
2679 * include/Makefile.in: Regenerate.
2680 * include/bits/c++config: Add pstl configuration.
2681 * include/pstl/LICENSE.txt: New file.
2682 * include/pstl/algorithm_fwd.h: New file.
2683 * include/pstl/algorithm_impl.h: New file.
2684 * include/pstl/execution_defs.h: New file.
2685 * include/pstl/execution_impl.h: New file.
2686 * include/pstl/glue_algorithm_defs.h: New file.
2687 * include/pstl/glue_algorithm_impl.h: New file.
2688 * include/pstl/glue_execution_defs.h: New file.
2689 * include/pstl/glue_memory_defs.h: New file.
2690 * include/pstl/glue_memory_impl.h: New file.
2691 * include/pstl/glue_numeric_defs.h: New file.
2692 * include/pstl/glue_numeric_impl.h: New file.
2693 * include/pstl/memory_impl.h: New file.
2694 * include/pstl/numeric_fwd.h: New file.
2695 * include/pstl/numeric_impl.h: New file.
2696 * include/pstl/parallel_backend.h: New file.
2697 * include/pstl/parallel_backend_tbb.h: New file.
2698 * include/pstl/parallel_backend_utils.h: New file.
2699 * include/pstl/parallel_impl.h: New file.
2700 * include/pstl/pstl_config.h: New file.
2701 * include/pstl/unseq_backend_simd.h: New file.
2702 * include/pstl/utils.h: New file.
2703 * include/std/algorithm: Include parallel algorithm implementations.
2704 * include/std/execution: New file.
2705 * include/std/memory: Include parallel algorithm implementations.
2706 * include/std/numeric: Include parallel algorithm implementations.
2707 * include/std/version: Add parallel algorithms feature test macro.
2708 * testsuite/util/pstl/pstl_test_config.h: New file.
2709 * testsuite/util/pstl/test_utils.h: New file.
2710 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2711 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2712 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2713 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2714 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2715 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2716 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2717 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2718 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2719 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2720 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2721 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2722 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2723 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2724 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2725 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2726 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2727 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2728 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2729 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2730 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2731 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2732 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2733 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2734 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2735 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2736 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2737 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2738 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2739 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2740 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2741 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2742 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2743 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2744 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2745 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2746 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2747 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2748 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2749 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2750 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2751 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2752 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2753 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2754 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2755 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2756 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2757 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2758 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2759 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2760 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2761 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2762 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2763 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2764 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2765 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2766 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2767 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2768 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2769 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2770 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2771 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2772 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2773 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2774 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2775 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2776 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2777 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2778 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2779 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2780 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2781 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2782 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2783 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2784 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2785 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2786 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2787 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2788 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2789 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2790 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2791 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2792 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2793 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2794 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2795 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2796 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2797 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2798 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2799 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2800 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2801 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2802 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2803 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2804 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2805 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2806 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2807 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2808 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2809 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2810 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2811 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2812 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2813 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2814 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2815 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2817 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2819 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2820 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2821 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2822 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2823 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2824 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2825 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2826 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2827 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2828 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2829 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2830 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2831 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2832 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2833 when the special functions IS is enabled, not for C++17.
2834 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2836 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2837 without checks for special functions in C++17.
2838 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2842 * include/backward/hash_map: Use <> for includes not "".
2843 * include/backward/hash_set: Likewise.
2844 * include/backward/strstream: Likewise.
2845 * include/tr1/bessel_function.tcc: Likewise.
2846 * include/tr1/exp_integral.tcc: Likewise.
2847 * include/tr1/legendre_function.tcc: Likewise.
2848 * include/tr1/modified_bessel_func.tcc: Likewise.
2849 * include/tr1/riemann_zeta.tcc: Likewise.
2851 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2853 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2854 of extension allocators.
2855 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2856 Document new headers in 7.2, 8.1 and 9.1 releases.
2857 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2858 * doc/html/*: Regenerate.
2860 2019-03-12 John David Anglin <dave.anglin@bell.net>
2863 * testsuite/lib/libstdc++.exp: Locate libatomic.
2864 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2865 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2867 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2868 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2869 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2870 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2872 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2875 * configure.ac: Check for sockatmark.
2876 * crossconfig.m4: Check for sockatmark.
2877 * config.h.in: Regenerate.
2878 * configure: Regenerate.
2879 * include/experimental/internet (address_v4::_S_hton): Rename
2880 overloaded functions to _S_hton_16 and _S_ntoh_16.
2881 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2882 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2883 * include/experimental/socket (basic_socket::at_mark): Check
2884 _GLIBCXX_HAVE_SOCKATMARK.
2886 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2887 const variables instead of macros.
2890 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2891 Use correct type for len_aligned.
2892 * testsuite/20_util/hash/89629.cc: New test.
2894 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2897 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2898 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2899 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2900 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2901 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2902 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2903 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2904 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2905 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2906 memory_order_seq_cst to int.
2908 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2910 * doc/xml/manual/using.xml: Use link element instead of xref.
2911 * doc/html/*: Regenerate.
2913 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2915 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2918 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2919 parameters in deduction guides.
2920 * include/debug/multimap.h (multimap): Likewise.
2921 * include/debug/set.h (multimap): Likewise.
2922 * include/debug/multiset.h (multimap): Likewise.
2923 * include/debug/unordered_map (unordered_map): Likewise.
2924 (unordered_multimap): Likewise.
2925 * include/debug/unordered_set (unordered_set): Likewise.
2926 (unordered_multiset): Likewise.
2929 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2930 Invalidate all iterators in case of rehash.
2931 (unordered_multimap<>::_M_check_rehashed): Likewise.
2932 * include/debug/unordered_set
2933 (unordered_set<>::_M_check_rehashed): Likewise.
2934 (unordered_multiset<>::_M_check_rehashed): Likewise.
2935 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2937 2019-03-07 Andreas Schwab <schwab@suse.de>
2939 * config/abi/post/riscv64-linux-gnu: New directory.
2940 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2942 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2944 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2945 compile test to run. Fix typo.
2947 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2948 * doc/html/*: Regenerate.
2950 P0356R5 Simplified partial function application
2951 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2952 helpers for bind_front.
2953 (bind_front, __cpp_lib_bind_front): Define.
2954 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2956 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2958 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2959 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2960 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2961 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2963 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2965 PR libstdc++/86655 - std::assoc_legendre should not constrain
2966 the value of m (or x).
2967 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2968 __sph_legendre): If degree > order Don't throw, return 0.
2969 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2970 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2971 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2972 * testsuite/tr1/5_numerical_facilities/special_functions/
2973 02_assoc_legendre/pr86655.cc: New test.
2974 * testsuite/tr1/5_numerical_facilities/special_functions/
2975 22_sph_legendre/pr86655.cc: New test.
2977 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2980 Also PR libstdc++/85517
2981 * include/std/variant (__do_visit): New.
2982 (__variant_cast): Likewise.
2983 (__variant_cookie): Likewise.
2984 (__erased_*): Remove.
2985 (_Variant_storage::_S_vtable): Likewise.
2986 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2987 (_Variant_storage::__M_reset): Adjust.
2988 (__variant_construct): New.
2989 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2990 __variant_construct.
2991 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2992 (_Move_ctor_base::__M_destructive_copy): New.
2993 (_Move_ctor_base::__M_destructive_move): Adjust to use
2994 __variant_construct.
2995 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2996 (_Copy_assign_alias): Adjust to check both copy assignment
2997 and copy construction for triviality.
2998 (_Move_assign_base::operator=): Adjust to use __do_visit.
2999 (_Multi_array): Add support for visitors that accept and return
3001 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3002 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3003 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3004 a __variant_cookie temporary for a variant that is valueless and..
3005 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3006 (__gen_vtable::_Array_type): Conditionally make space for
3007 the __variant_cookie visitor case.
3008 (__variant_construct_by_index): New.
3009 (get_if): Adjust to use std::addressof.
3010 (relops): Adjust to use __do_visit.
3011 (variant): Add __variant_cast and __variant_construct_by_index
3013 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3014 instead of self-destruction.
3015 (variant::swap): Adjust to use __do_visit.
3016 (visit): Reimplement in terms of __do_visit.
3017 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3018 * testsuite/20_util/variant/compile.cc: Adjust.
3019 * testsuite/20_util/variant/run.cc: Likewise.
3021 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3023 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3025 * testsuite/experimental/feat-char8_t.cc: Likewise.
3027 * include/std/type_traits [C++20] (is_bounded_array)
3028 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3030 * testsuite/20_util/is_bounded_array/requirements/
3031 explicit_instantiation.cc: New test.
3032 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3034 * testsuite/20_util/is_bounded_array/value.cc: New test.
3035 * testsuite/20_util/is_unbounded_array/requirements/
3036 explicit_instantiation.cc: New test.
3037 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3039 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3041 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3043 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3045 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3047 * include/c_compatibility/math.h [C++20] (lerp): Add using
3049 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3050 (__lerp): Define function template to implement lerp.
3051 (lerp(float, float, float), lerp(double, double, double))
3052 (lerp(long double, long double, long double)): Define for C++20.
3053 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3054 (midpoint(T, T), midpoint(T*, T*)): Define.
3055 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3056 * testsuite/26_numerics/lerp.cc: New test.
3057 * testsuite/26_numerics/midpoint/floating.cc: New test.
3058 * testsuite/26_numerics/midpoint/integral.cc: New test.
3059 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3061 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3063 PR libstdc++/88996 Implement P0439R0
3064 Make std::memory_order a scoped enumeration.
3065 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3066 add variables for the old enumerators. Adjust calls.
3067 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3068 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3070 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3072 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3075 * include/std/memory_resource (polymorphic_allocator): Add default
3076 template argument for C++20.
3077 (polymorphic_allocator::allocate_bytes)
3078 (polymorphic_allocator::deallocate_bytes)
3079 (polymorphic_allocator::allocate_object)
3080 (polymorphic_allocator::deallocate_object)
3081 (polymorphic_allocator::new_object)
3082 (polymorphic_allocator::delete_object): New member functions for
3084 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3087 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3090 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3093 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3095 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3096 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3098 * include/std/memory (uses_allocator_construction_args): New set of
3099 overloaded functions.
3100 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3102 * include/std/memory_resource (polymorphic_allocator::construct)
3103 [__cplusplus > 201703l]: Replace all overloads with a single function
3104 using uses_allocator_construction_args.
3105 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3107 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3109 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3112 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3113 stylesheet directories before check for xsltproc. Try to use
3114 xmlcatalog to find local stylesheet directory before trying hardcoded
3115 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3116 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3117 use xsltproc if xmlcatalog fails to find a local stylesheet.
3118 * configure.ac: Check for xmlcatalog.
3119 * Makefile.in: Regenerate.
3120 * configure: Likewise.
3121 * doc/Makefile.in: Likewise.
3122 * include/Makefile.in: Likewise.
3123 * libsupc++/Makefile.in: Likewise.
3124 * po/Makefile.in: Likewise.
3125 * python/Makefile.in: Likewise.
3126 * src/Makefile.in: Likewise.
3127 * src/c++11/Makefile.in: Likewise.
3128 * src/c++17/Makefile.in: Likewise.
3129 * src/c++98/Makefile.in: Likewise.
3130 * src/filesystem/Makefile.in: Likewise.
3131 * testsuite/Makefile.in: Likewise.
3133 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3136 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3137 container deduction guides.
3138 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3139 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3140 parameters in deduction guides.
3141 * include/bits/stl_multimap.h (multimap): Likewise.
3142 * include/bits/stl_multiset.h (multiset): Likewise.
3143 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3144 * include/bits/stl_set.h (set): Likewise.
3145 * include/bits/stl_stack.h (stack): Likewise.
3146 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3147 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3148 constrain parameters in deduction guides.
3149 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3151 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3153 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3154 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3155 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3156 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3158 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3160 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3163 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3164 to class template and partial specialization using void_t.
3165 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3167 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3170 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3171 copy and move members public.
3173 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3175 * include/std/type_traits (__underlying_type_impl): New helper to
3176 make underlying_type SFINAE-friendly.
3177 (underlying_type): Derive from __underlying_type_impl.
3178 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3182 * include/bits/char_traits.h (__constant_char_array): Check index is
3183 in range before dereferencing.
3184 (char_traits<char>::compare, char_traits<char>::find)
3185 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3186 immediately if n is zero.
3187 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3188 Remove workarounds for PR 67026.
3189 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3191 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3194 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3196 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3197 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3199 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3202 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3203 type to std::size_t and argument to type to long double.
3205 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3207 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3208 * config/abi/post/sparc64-linux-gnu: New directory.
3209 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3210 * config/abi/post/sparc64-linux-gnu/32: New directory.
3211 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3213 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3215 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3216 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3219 2019-02-22 Tom Honermann <tom@honermann.net>
3221 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3222 printers for u8string and u8string_view.
3224 2019-02-22 Tom Honermann <tom@honermann.net>
3226 * testsuite/18_support/byte/ops.cc: Validate
3227 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3228 std::to_integer<char32_t>.
3229 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3230 std::numeric_limits<char8_t>.
3231 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3232 std::numeric_limits<char8_t>::lowest().
3233 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3234 std::numeric_limits<char8_t>::max_digits10.
3235 * testsuite/18_support/type_info/fundamental.cc: Validate
3236 typeinfo for char8_t.
3237 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3238 std::from_chars with char8_t.
3239 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3240 Validate explicit instantiation of std::hash<char8_t>.
3241 * testsuite/20_util/is_integral/value.cc: Validate
3242 std::is_integral<char8_t>.
3243 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3244 Validate std::make_signed<char8_t>.
3245 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3246 Validate u8string construction from char8_t sources.
3247 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3249 * testsuite/21_strings/basic_string_view/operations/compare/
3250 char/70483.cc: Validate substr operations on u8string_view.
3251 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3252 the u8string_view typedef is defined.
3253 * testsuite/21_strings/char_traits/requirements/
3254 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3256 * testsuite/21_strings/char_traits/requirements/
3257 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3258 constexpr member functions.
3259 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3260 that the u8string typedef is defined.
3261 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3262 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3263 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3264 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3266 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3267 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3269 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3270 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3271 Validate std::atomic<char8_t>::is_always_lock_free
3272 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3273 Update line numbers.
3274 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3276 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3278 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3279 Validate std::experimental::pmr::u8string.
3280 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3281 u8string_view typedef is defined.
3282 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3283 char32_t to the typelists.
3285 2019-02-22 Tom Honermann <tom@honermann.net>
3287 * include/ext/typelist.h: Constrain a partial specialization of
3288 typelist::detail::append_ to only match chain<T1,T2>.
3290 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3293 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3294 class template with class. Replace move and copy member types with
3295 member alias templates, so they are only instantiated when needed.
3296 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3297 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3298 test for C++11/14/17 as well.
3299 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3302 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3305 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3306 _GLIBCXX_PURE to the alias declaration.
3308 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3310 * testsuite/21_strings/basic_string/literals/types.cc
3311 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3312 * testsuite/21_strings/basic_string/literals/values.cc
3313 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3314 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3315 potentially having different type.
3316 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3317 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3319 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3320 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3321 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3322 string literals only using basic character set.
3323 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3324 u8 literals to char.
3325 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3326 Test ATOMIC_CHAR8_T_LOCK_FREE.
3327 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3328 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3329 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3330 * testsuite/experimental/string_view/literals/types.cc
3331 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3333 * testsuite/experimental/string_view/literals/values.cc
3334 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3336 2019-02-19 Tom Honermann <tom@honermann.net>
3338 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3339 from char16_32_t.cc; validates numeric_limits<char8_t>.
3340 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3341 test cloned from types.cc; validates operator""s for char8_t
3343 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3344 test cloned from values.cc; validates construction and comparison
3346 * testsuite/21_strings/basic_string/requirements/
3347 /explicit_instantiation/char8_t/1.cc: New test cloned from
3348 char16_t/1.cc; validates explicit instantiation of
3349 basic_string<char8_t>.
3350 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3351 New test cloned from types.cc; validates operator""sv for char8_t
3352 returns u8string_view.
3353 * testsuite/21_strings/basic_string_view/literals/
3354 values-char8_t.cc: New test cloned from values.cc; validates
3355 construction and comparison of u8string_view values.
3356 * testsuite/21_strings/basic_string_view/requirements/
3357 explicit_instantiation/char8_t/1.cc: New test cloned from
3358 char16_t/1.cc; validates explicit instantiation of
3359 basic_string_view<char8_t>.
3360 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3361 New test cloned from char16_t/65049.cc; validates that
3362 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3363 * testsuite/21_strings/char_traits/requirements/char8_t/
3364 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3365 that char_traits<char8_t> member typedefs are present and correct.
3366 * testsuite/21_strings/char_traits/requirements/
3367 explicit_instantiation/char8_t/1.cc: New test cloned from
3368 char16_t/1.cc; validates explicit instantiation of
3369 char_traits<char8_t>.
3370 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3371 from char16_t.cc: validates
3372 codecvt<char16_t, char8_t, mbstate_t>.
3373 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3374 from char32_t.cc: validates
3375 codecvt<char32_t, char8_t, mbstate_t>.
3376 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3377 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3378 codecvt<char32_t, char8_t, std::mbstate_t>.
3379 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3380 test cloned from string.cc; validates filesystem::path construction
3382 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3383 the __cpp_lib_char8_t feature test macro is defined with the
3385 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3386 New test cloned from string.cc; validates filesystem::path
3387 construction from char8_t input.
3388 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3389 test cloned from types.cc; validates operator""sv for char8_t
3390 returns u8string_view.
3391 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3392 New test cloned from values.cc; validates construction and
3393 comparison of u8string_view values.
3394 * testsuite/experimental/string_view/requirements/
3395 explicit_instantiation/char8_t/1.cc: New test cloned from
3396 char16_t/1.cc; validates explicit instantiation of
3397 basic_string_view<char8_t>.
3398 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3399 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3402 2019-02-19 Tom Honermann <tom@honermann.net>
3404 P0482R5 char8_t: Standard library support
3405 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3406 typeinfo symbols for char8_t.
3407 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3408 (GLIBCXX_3.4.26): Add symbols for specializations of
3409 numeric_limits and codecvt that involve char8_t.
3410 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3411 * include/bits/atomic_base.h: Add atomic_char8_t.
3412 * include/bits/basic_string.h: Add std::hash<u8string> and
3413 operator""s(const char8_t*, size_t).
3414 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3416 * include/bits/char_traits.h: Add char_traits<char8_t>.
3417 * include/bits/codecvt.h: Add
3418 codecvt<char16_t, char8_t, mbstate_t>,
3419 codecvt<char32_t, char8_t, mbstate_t>,
3420 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3421 codecvt_byname<char32_t, char8_t, mbstate_t>.
3422 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3423 recognize char8_t as an integral type.
3424 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3426 (path::u8string): Return std::u8string when char8_t support is
3428 (path::generic_u8string): Likewise.
3429 (path::_S_convert): Handle conversion from char8_t input.
3430 (path::_S_str_convert): Likewise.
3431 * include/bits/functional_hash.h: Add hash<char8_t>.
3432 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3434 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3435 for new char8_t specializations.
3436 * include/bits/localefwd.h: Add missing declarations of
3437 codecvt<char16_t, char, mbstate_t> and
3438 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3439 codecvt<char16_t, char8_t, mbstate_t> and
3440 codecvt<char32_t, char8_t, mbstate_t>.
3441 * include/bits/postypes.h: Add u8streampos
3442 * include/bits/stringfwd.h: Add declarations of
3443 char_traits<char8_t> and u8string.
3444 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3445 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3447 (path::u8string): Return std::u8string when char8_t support is
3449 (path::generic_u8string): Likewise.
3450 (path::_S_convert): Handle conversion from char8_t input.
3451 (path::_S_str_convert): Likewise.
3452 * include/experimental/string: Add u8string.
3453 * include/experimental/string_view: Add u8string_view,
3454 hash<experimental::u8string_view>, and
3455 operator""sv(const char8_t*, size_t).
3456 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3457 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3458 as a character type.
3459 * include/std/limits: Add numeric_limits<char8_t>.
3460 * include/std/string_view: Add u8string_view,
3461 hash<experimental::u8string_view>, and
3462 operator""sv(const char8_t*, size_t).
3463 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3464 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3465 * libsupc++/atomic_lockfree_defines.h: Define
3466 ATOMIC_CHAR8_T_LOCK_FREE.
3467 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3468 codecvt.cc and limits.cc so that char8_t specializations of
3469 numeric_limits and codecvt and emitted.
3470 * src/c++11/Makefile.in: Likewise.
3471 * src/c++11/codecvt.cc: Define members of
3472 codecvt<char16_t, char8_t, mbstate_t>,
3473 codecvt<char32_t, char8_t, mbstate_t>,
3474 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3475 codecvt_byname<char32_t, char8_t, mbstate_t>.
3476 * src/c++11/limits.cc: Define members of
3477 numeric_limits<char8_t>.
3478 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3479 locale_init.cc and localename.cc.
3480 * src/c++98/Makefile.in: Likewise.
3481 * src/c++98/locale_init.cc: Add initialization for the
3482 codecvt<char16_t, char8_t, mbstate_t> and
3483 codecvt<char32_t, char8_t, mbstate_t> facets.
3484 * src/c++98/localename.cc: Likewise.
3485 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3487 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3489 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3490 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3491 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3493 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3495 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3496 * doc/html/*: Regenerate.
3498 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3499 * doc/html/*: Regenerate.
3501 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3502 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3503 allocator type in is_constructible checks.
3504 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3505 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3506 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3507 problematic type from LWG 2586 discussion.
3508 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3509 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3511 * configure.ac: Check for C11 timespec_get function.
3512 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3514 * config.h.in: Regenerate.
3515 * configure: Regenerate.
3516 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3517 std for C++17 and up.
3519 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3520 * include/bits/stl_queue.h
3521 (priority_queue(const Compare&, const Container&, const Alloc&))
3522 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3524 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3526 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3527 * include/bits/stl_queue.h (queue, priority_queue): Add static
3528 assertions to enforce LWG 2566 requirement on value_type.
3529 * include/bits/stl_stack.h (stack): Likewise.
3532 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3534 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3535 * include/bits/std_abs.h: Add comment about LWG 2735.
3536 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3538 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3541 * include/std/version [__cpp_impl_destroying_delete]
3542 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3543 * libsupc++/new [__cpp_impl_destroying_delete]
3544 (__cpp_lib_destroying_delete): Likewise.
3545 (destroying_delete_t, destroying_delete): Likewise, but define even
3546 when __cpp_impl_destroying_delete is not defined.
3547 * testsuite/18_support/destroying_delete.cc: New test.
3549 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3552 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3553 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3554 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3555 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3557 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3560 * include/bits/fs_path.h (path::has_root_name)
3561 (path::has_root_directory, path::has_root_path)
3562 (path::has_relative_path, path::has_parent_path)
3563 (path::has_filename, path::has_stem, path::has_extension)
3564 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3566 * src/c++17/fs_path.cc (path::has_root_name)
3567 (path::has_root_directory, path::has_root_path)
3568 (path::has_relative_path, path::has_parent_path)
3569 (path::has_filename, path::_M_find_extension): Add noexcept.
3571 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3573 PR libstdc++/89102 (partial)
3574 * include/std/type_traits (common_type<>): Define.
3575 (common_type<T>): Derive from common_type<T, T>.
3576 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3577 Test zero-length template argument list.
3578 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3579 Test additional single argument cases.
3580 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3581 Adjust expected error.
3583 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3586 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3588 * include/bits/stl_stack.h (stack): Likewise.
3589 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3590 * testsuite/23_containers/queue/deduction.cc: New test.
3591 * testsuite/23_containers/stack/deduction.cc: New test.
3594 * include/std/type_traits (__is_convertible_helper)
3595 (__is_convertible_helper<_From, _To, false>): Revert changes to
3596 support is_nothrow_convertible.
3597 (__is_nt_convertible_helper): New helper.
3598 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3600 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3601 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3604 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3605 __is_alloc_insertable_impl. Replace single type member with two
3606 members, one for each of copy and move insertable.
3607 (__is_move_insertable): New trait for internal use.
3608 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3609 (vector::_S_nothrow_relocate(true_type)): New functions to
3610 conditionally check if __relocate_a can throw.
3611 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3612 on __is_move_insertable.
3613 (vector::_S_do_relocate): New overloaded functions to conditionally
3615 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3616 based on _S_use_relocate.
3617 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3618 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3619 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3622 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3623 parameter unnamed. Add message to static assertion.
3624 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3625 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3628 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3631 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3633 (__is_bitwise_relocatable): ... to this.
3634 (__relocate_a_1): Adapt.
3635 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3636 (__is_bitwise_relocatable): ... to this.
3638 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3641 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3642 final component as well as from _M_pathname. Append the dot using
3643 operator+= instead of only to _M_pathname.
3644 (path::_M_find_extension): Reformat slightly.
3645 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3646 Add more test cases.
3648 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3650 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3652 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3654 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3655 constexpr specifiers from arg and proj.
3657 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3658 __shared_ptr instantiations used by gcc4-compatible ABI.
3660 * include/experimental/forward_list (experimental::erase): Qualify
3662 * include/experimental/list (experimental::erase): Likewise.
3663 * include/std/forward_list (std::erase): Likewise.
3664 * include/std/list (std::erase): Likewise.
3666 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3668 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3669 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3670 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3671 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3672 * testsuite/ext/array_allocator/26875.cc: Likewise.
3673 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3674 * testsuite/util/replacement_memory_operators.h: Likewise.
3675 * testsuite/util/testsuite_allocator.h: Likewise.
3677 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3678 normal mode vector, even for debug mode.
3679 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3680 Define alias template for normal mode vector.
3682 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3685 * config/locale/generic/c_locale.h (__convert_from_v)
3686 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3687 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3688 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3689 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3691 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3694 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3695 data member with static member function _S_use_relocate().
3696 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3697 (vector::_M_default_append): Use _S_use_relocate() instead of
3700 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3703 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3706 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3707 write to stderr instead of using printf.
3709 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3712 * include/bits/char_traits.h (__constant_string_p,
3713 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3716 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3718 Implement C++20 P0600r1.
3719 * include/backward/hash_map: Add nodiscard attribute to empty.
3720 * include/backward/hash_set: Likewise.
3721 * backward/hashtable.h: Likewise.
3722 * include/bits/basic_string.h: Likewise.
3723 * include/bits/forward_list.h: Likewise.
3724 * include/bits/hashtable.h: Likewise.
3725 * include/bits/regex.h: Likewise.
3726 * include/bits/stl_deque.h: Likewise.
3727 * include/bits/stl_list.h: Likewise.
3728 * include/bits/stl_map.h: Likewise.
3729 * include/bits/stl_multimap.h: Likewise.
3730 * include/bits/stl_multiset.h: Likewise.
3731 * include/bits/stl_queue.h: Likewise.
3732 * include/bits/stl_set.h: Likewise.
3733 * include/bits/stl_stack.h: Likewise.
3734 * include/bits/stl_tree.h: Likewise.
3735 * include/bits/stl_vector.h: Likewise.
3736 * include/bits/unordered_map.h: Likewise.
3737 * include/bits/unordered_set.h: Likewise.
3738 * include/debug/array: Likewise.
3739 * include/experimental/any: Likewise.
3740 * include/experimental/bits/fs_path.h: Likewise.
3741 * include/experimental/internet: Likewise.
3742 * include/experimental/string_view: Likewise.
3743 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3745 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3747 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3749 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3751 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3753 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3755 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3757 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3759 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3760 info_fn_imps.hpp: Likewise.
3761 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3762 left_child_next_sibling_heap_.hpp: Likewise.
3763 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3765 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3767 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3769 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3771 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3773 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3775 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3777 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3778 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3779 * include/ext/rope: Likewise.
3780 * include/ext/slist: Likewise.
3781 * include/ext/vstring.h: Likewise.
3782 * include/profile/array: Likewise.
3783 * include/std/array: Likewise.
3784 * include/tr1/array: Likewise.
3785 * include/tr1/hashtable.h: Likewise.
3786 * include/tr1/regex: Likewise.
3787 * include/tr2/dynamic_bitset: Likewise.
3788 * include/bits/alloc_traits.h: Add nodiscard attribute to
3790 * include/experimental/memory_resource: Likewise.
3791 * include/ext/alloc_traits.h: Likewise.
3792 * include/ext/array_allocator.h: Likewise.
3793 * include/ext/bitmap_allocator.h: Likewise.
3794 * include/ext/debug_allocator.h: Likewise.
3795 * include/ext/extptr_allocator.h: Likewise.
3796 * include/ext/mt_allocator.h: Likewise.
3797 * include/ext/new_allocator.h: Likewise.
3798 * include/ext/pool_allocator.h: Likewise.
3799 * include/ext/throw_allocator.h: Likewise.
3800 * include/std/scoped_allocator: Likewise.
3801 * libsupc++/eh_alloc.cc: Likewise.
3802 * include/std/future: Add nodiscard attribute to async.
3803 * libsupc++/new: Add nodiscard attribute to new.
3805 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3810 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3811 * include/bits/shared_ptr.h
3812 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3813 (allocate_shared): Change to use new tag type.
3814 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3815 Declare new member function.
3816 (_Sp_alloc_shared_tag): Define new type.
3817 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3818 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3819 _Sp_make_shared_tag::_S_eq to check type_info.
3820 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3821 Constrain to prevent being called with _Sp_alloc_shared_tag.
3822 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3823 Replace constructor with ...
3824 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3825 reference parameter so address of the new object can be returned to
3826 the caller. Obtain the allocator from the tag type.
3827 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3828 constructor with ...
3829 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3830 to the __shared_count constructor.
3831 (__allocate_shared): Change to use new tag type.
3832 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3834 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3836 * src/c++17/fs_ops.cc
3837 (equivalent(const path&, const path&, error_code&))
3838 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3839 compare files instead of relying on incomplete info returned by stat.
3842 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3843 if the path is already absolute.
3844 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3845 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3848 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3849 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3850 of filesystem::exists.
3851 (create_directories(const path&, error_code&)): Add assertions.
3852 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3853 Add workaround for bug in _wstat for paths with trailing slash.
3854 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3855 for expected behaviour on mingw.
3856 * testsuite/experimental/filesystem/operations/create_directories.cc:
3858 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3859 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3860 not test permissions on mingw targets.
3862 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3864 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3865 constructors and open members taking wide strings. Fix patterns for
3866 filesystem::path members to match wstring_view parameters. Add
3867 exports for shared_ptr members used by directory iterators.
3868 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3869 error code parameter if the file doesn't exist.
3870 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3872 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3873 values for mingw targets, where "/" is not an absolute path. Do not
3874 test symlinks on mingw targets.
3875 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3876 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3878 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3879 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3880 that each component of the path is created.
3881 * testsuite/experimental/filesystem/operations/create_directories.cc:
3883 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3884 permissions on mingw targets.
3885 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3886 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3887 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3888 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3890 * testsuite/experimental/filesystem/operations/permissions.cc:
3892 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3893 symlinks or permissions on mingw targets.
3894 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3895 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3896 symlinks on mingw targets.
3897 * testsuite/experimental/filesystem/operations/remove_all.cc:
3899 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3900 permissions on mingw targets.
3901 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3902 test symlinks on mingw targets.
3903 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3906 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3909 Warn about unused comparisons of shared_ptr/unique_ptr
3910 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3911 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3912 <, <=, >, >= for shared_ptr.
3913 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3915 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3917 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3918 as 201611L, because P0497R0 changes are supported.
3919 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3921 * include/bits/erase_if.h [__cplusplus > 201703L]
3922 (__cpp_lib_erase_if): Only define for C++2a.
3923 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3924 (__cpp_lib_null_iterators): Define.
3925 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3926 (__cpp_lib_null_iterators): Define.
3927 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3929 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3931 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3933 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3934 changes are supported.
3935 * include/std/optional (__cpp_lib_optional): Likewise.
3936 * include/std/variant (__cpp_lib_variant): Likewise.
3937 * include/std/version [!__STRICT_ANSI__]
3938 (__cpp_lib_uncaught_exceptions): Define as long integer.
3939 [__cplusplus >= 201703L] (__cpp_lib_any)
3940 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3941 (__cpp_lib_variant): Define for C++17.
3942 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3944 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3947 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3949 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3953 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3955 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3958 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3960 * doc/xml/manual/intro.xml: Include new section.
3961 * doc/xml/manual/status_cxx2017.xml: Document more
3962 implementation-defined properties of the library.
3963 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3964 * doc/html/*: Regenerate.
3966 * include/bits/refwrap.h [__cplusplus > 201703L]
3967 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3968 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3969 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3971 (reference_wrapper::operator()): Add static assertion.
3972 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3974 * include/std/chrono (duration_values::zero(), duration_values::min())
3975 (duration_values::max()): Add noexcept.
3976 (duration::zero(), duration::min(), duration::max()): Likewise.
3977 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3978 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3979 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3981 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3983 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3985 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3986 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3988 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3991 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3992 specialization for C++17 (P0513R0, LWG 2817).
3993 * testsuite/20_util/hash/nullptr.cc: New test.
3996 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3997 pattern for std::basic_stringbuf::str().
3999 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4000 basic_ostream::operator<< patterns.
4002 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4004 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4005 test failures on targets with 32-bit time_t.
4007 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4008 * include/std/deque: Likewise.
4009 * include/std/forward_list: Likewise.
4010 * include/std/list: Likewise.
4011 * include/std/string: Likewise.
4012 * include/std/vector: Likewise.
4013 * include/std/version: Likewise.
4014 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4015 * testsuite/23_containers/deque/erasure.cc: Likewise.
4016 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4017 * testsuite/23_containers/list/erasure.cc: Likewise.
4018 * testsuite/23_containers/map/erasure.cc: Likewise.
4019 * testsuite/23_containers/set/erasure.cc: Likewise.
4020 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4021 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4022 * testsuite/23_containers/vector/erasure.cc: Likewise.
4024 * include/experimental/internet [AI_NUMERICSERV]
4025 (resolver_base::numeric_service): Define conditionally.
4026 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4028 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4031 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4032 Jonathan Wakely <jwakely@redhat.com>
4035 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4036 (GLIBCXX_3.4.26): Add new exports.
4037 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4038 correct list of sources.
4039 * include/Makefile.in: Regenerate.
4040 * include/std/ostream (operator<<(nullptr_t)): New member function.
4041 * src/c++17/ostream-inst.cc: New file.
4042 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4045 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4047 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4048 of the source file containing the caller.
4049 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4050 directories created by test.
4051 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4053 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4055 * testsuite/experimental/filesystem/iterators/
4056 recursive_directory_iterator.cc: Likewise.
4058 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4060 PR tree-optimization/88775
4061 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4062 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4063 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4064 instead of __builtin_constant_p if available. Don't bother with
4065 the pointer comparison in C++11 and earlier.
4067 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4071 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4074 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4076 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4077 for filesystem::path. Give variables more distinctive names.
4079 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4080 member function to perform non-trivial assignment.
4081 (_Optional_payload_base::_M_move_assign): Likewise.
4082 (_Optional_payload<T, true, false, true>::operator=)
4083 (_Optional_payload<T, true, true, false>::operator=)
4084 (_Optional_payload<T, true, false, false>::operator=): Call
4085 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4088 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4089 test std::complex<long double> if long double format is IBM128.
4090 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4093 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4095 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4096 for old std::unique_ptr layout.
4097 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4098 to become valueless. Add filesystem::path tests.
4101 * include/std/optional (_Optional_payload_base): New class template
4102 for common code hoisted from _Optional_payload specializations. Use
4103 a template for the union, to allow a partial specialization for
4104 types with non-trivial destructors. Add constructors for in-place
4105 initialization to the union.
4106 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4107 to perform non-trivial copy construction, instead of relying on
4108 non-standard copy elision in a delegating constructor.
4109 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4110 non-trivial move construction.
4111 (_Optional_payload): Derive from _Optional_payload_base and use it
4112 for everything except the non-trivial assignment operators, which are
4114 (_Optional_payload<false, C, M>): Derive from the specialization
4115 _Optional_payload<true, false, false> and add a destructor.
4116 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4117 Forward to corresponding members of _Optional_payload.
4118 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4119 Hoist common members from _Optional_base.
4120 (_Optional_base): Make all members and base class public.
4121 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4122 _Optional_base_impl.
4123 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4124 support for new std::optional layout.
4125 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4128 * include/bits/locale_conv.h: Use <> for includes not "".
4129 * include/ext/random: Likewise.
4130 * include/ext/vstring.h: Likewise.
4132 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4134 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4135 (GLIBCXX_3.4.21): Likewise.
4137 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4140 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4141 to match the one that controls whether utimbuf and utime are declared.
4143 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4146 * include/bits/char_traits.h (char_traits::move): Do not pass null
4147 pointers to memmove.
4148 * include/bits/locale_facets.h
4149 (ctype<char>::widen(const char*, const char*, char*)): Do not
4150 pass null pointers to memcpy.
4151 (ctype<char>::narrow(const char*, const char*, char, char*)):
4153 (ctype<char>::do_widen(const char*, const char*, char*)):
4155 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4158 * doc/xml/manual/spine.xml: Update copyright years.
4159 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4160 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4161 for C++17 filesystem library.
4162 * doc/html/*: Regenerate.
4164 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4165 * config.h.in: Regenerate.
4166 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4167 alphabetically and add missing entries for copy_symlink,
4168 hard_link_count, rename, and resize_file.
4169 * configure: Regenerate.
4170 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4171 used unconditionally.
4172 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4173 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4174 supports truncating to zero length.
4175 * testsuite/27_io/filesystem/operations/all.cc: New test.
4176 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4178 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4181 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4182 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4183 * config.h.in: Regenerate.
4184 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4185 remaining std::filesystem types and functions.
4186 * configure: Regenerate.
4187 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4188 * src/c++17/Makefile.in: Regenerate.
4189 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4190 here, and change name of included file.
4191 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4192 here, and change name of included file.
4193 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4194 path to dir-common.h.
4195 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4196 path to ops-common.h. Disable -Wunused-parameter warnings.
4197 (internal_file_clock): Define unconditionally.
4198 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4200 (do_copy_file, do_space): Move definitions to ops.common.h.
4201 (copy, file_size, hard_link_count, last_write_time, space): Only
4202 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4204 (last_write_time, read_symlink): Remove unused attributes from
4206 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4207 * src/filesystem/Makefile.in: Regenerate.
4208 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4209 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4210 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4211 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4212 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4213 dummy types and functions instead of using #error.
4214 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4215 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4217 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4218 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4219 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4220 to account for new namespace.
4221 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4222 -lstdc++fs from dg-options.
4223 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4224 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4225 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4226 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4227 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4229 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4230 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4232 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4233 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4234 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4235 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4236 * testsuite/27_io/filesystem/operations/create_directories.cc:
4238 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4239 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4240 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4241 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4242 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4243 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4244 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4245 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4246 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4247 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4248 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4249 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4250 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4251 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4252 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4253 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4254 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4255 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4257 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4261 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4262 typeinfo and vtables less greedy.
4263 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4264 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4265 * src/c++17/Makefile.in: Regenerate.
4266 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4267 here, and change name of included file.
4268 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4269 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4271 * src/filesystem/Makefile.in: Regenerate.
4272 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4273 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4274 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4275 from dg-options and remove dg-require-filesystem-ts.
4276 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4277 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4278 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4279 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4280 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4281 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4282 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4283 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4284 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4285 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4286 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4287 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4288 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4289 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4290 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4291 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4292 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4293 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4294 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4295 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4296 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4298 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4299 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4300 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4301 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4302 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4303 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4304 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4305 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4306 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4307 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4308 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4309 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4311 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4313 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4315 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4317 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4318 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4319 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4320 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4321 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4322 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4323 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4324 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4325 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4326 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4328 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4329 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4330 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4331 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4332 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4335 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4336 Check is_trivially_copyable instead of is_scalar.
4337 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4338 contained value can throw and its type is trivially copyable then
4339 construct into a temporary variant and move from it, to provide the
4340 strong exception safety guarantee.
4341 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4343 * testsuite/20_util/variant/87431.cc: New test.
4344 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4345 conversion causes valueless state.
4348 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4349 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4350 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4351 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4352 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4354 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4356 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4357 (file_time_type): Redefine in terms of __file_clock.
4358 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4360 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4362 (internal_file_lock): New helper type for accessing __file_clock.
4363 (do_copy_file): Use internal_file_lock to convert system time to
4365 (last_write_time(const path&, error_code&)): Likewise.
4366 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4368 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4370 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4371 for const member functions of std::basic_string.
4372 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4374 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4375 Make non-standard constructor private.
4376 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4378 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4379 explicit instantiations for C++17 as well as earlier dialects.
4380 * src/c++17/Makefile.am: Add new source files.
4381 * src/c++17/Makefile.in: Regenerate.
4382 * src/c++17/cow-string-inst.cc: New file defining explicit
4383 instantiations for basic_string member functions added in C++17.
4384 * src/c++17/string-inst.cc: Likewise.
4386 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4387 copy/move constructors for old std::basic_string.
4388 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4389 (basic_string::reference, basic_string::const_reference): Define
4390 as plain references for C++11 and later.
4391 (basic_string::basic_string()): Put constructor body outside
4392 preprocessor conditional groups.
4393 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4394 instead of copying it.
4395 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4397 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4399 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4400 cases for old basic_string.
4401 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4402 allocator-extended constructors unconditionally. Add extra members to
4403 allocator type when using old string ABI.
4404 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4406 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4408 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4409 -fno-inline added to test flags.
4411 * testsuite/21_strings/basic_string/requirements/
4412 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4414 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4415 assertion failures with old std::string ABI.
4417 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4419 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4420 functions that will only erase elements at the end.
4421 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4422 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4423 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4425 (path::_List::pop_back()): Define.
4426 (path::_List::_M_erase_from(const_iterator)): Define.
4427 (path::operator/=(const path&)): Use pop_back to remove last component
4428 and _M_erase_from to remove multiple components.
4429 (path::_M_append(basic_string_view<value_type>)): Likewise.
4430 (path::operator+=(const path&)): Likewise.
4431 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4432 (path::remove_filename()): Likewise.
4433 (path::lexically_normal()): Use _List::_Impl iterators instead of
4434 path::iterator. Use pop_back to remove components from the end. Clear
4435 trailing filename, instead of using erase(const_iterator) to remove
4436 a non-final component.
4437 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4439 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4441 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4442 incorrect treatment of empty filename after trailing slash.
4443 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4445 * testsuite/21_strings/basic_string/modifiers/assign/char/
4446 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4448 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4449 move_assign_optim.cc: Likewise.
4451 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4452 Jakub Jelinek <jakub@redhat.com>
4455 * include/experimental/memory: Replace UTF-8 quote characters.
4456 * include/std/future: Replace UTF-8 "em dash" characters.
4458 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4461 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4462 * include/debug/forward_list: Likewise.
4463 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4465 * include/experimental/chrono: Likewise.
4466 * include/experimental/functional: Likewise.
4467 * include/experimental/ratio: Likewise.
4468 * include/experimental/system_error: Likewise.
4469 * include/experimental/tuple: Likewise.
4470 * include/experimental/type_traits: Likewise.
4471 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4472 * include/parallel/multiseq_selection.h: Likewise.
4475 * config/abi/pre/gnu.ver: Add missing exports.
4476 * testsuite/22_locale/collate_byname/88681.cc: New test.
4477 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4478 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4480 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4482 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4483 initializer_list<value_type> and from input iterator ranges.
4484 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4486 * testsuite/experimental/string_view/element_access/char/empty.cc:
4487 Fix year range in copyright header.
4489 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4491 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4492 Fix year range in copyright header.
4494 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4496 Update copyright years.
4498 Copyright (C) 2019 Free Software Foundation, Inc.
4500 Copying and distribution of this file, with or without modification,
4501 are permitted in any medium without royalty provided the copyright
4502 notice and this notice are preserved.