1 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
4 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
6 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
9 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
11 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
14 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
15 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
16 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
19 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
21 * include/std/type_traits (__do_common_type_impl): Implement
22 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
23 (basic_common_reference, common_reference, common_reference_t): Define
25 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
27 * testsuite/20_util/common_reference/requirements/
28 explicit_instantiation.cc: New test.
29 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
32 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
33 non-template overloads for each signed and unsigned integer type and
34 char. Define deleted overload for bool (LWG 3266).
35 * testsuite/20_util/to_chars/1_neg.cc: Remove.
36 * testsuite/20_util/to_chars/3.cc: New test.
37 * testsuite/20_util/to_chars/lwg3266.cc: New test.
39 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
41 * acinclude.m4: Handle uclinux*.
42 * configure: Regenerate.
43 * configure.host: Handle uclinux*
45 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
46 Mickaël Guêné <mickael.guene@st.com>
48 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
51 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
54 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
55 0ul being a valid null pointer constant.
57 * include/std/type_traits (__remove_cv_t): New alias template.
58 (is_void, is_integral, is_floating_point, is_pointer)
59 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
60 (is_member_point), __is_signed_integer, __is_unsigned_integer)
61 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
62 (__decay_selector): Use __remove_cv_t.
63 (remove_cv): Add partial specializations for cv-qualified types.
64 (__decay_t): New alias template.
65 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
67 (__enable_if_t): Move earlier in the file.
68 (_Require): Use __enable_if_t.
69 (swap(T&, T&)): Use _Require.
70 (swap(T(&)[N])): Use __enable_if_t.
72 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
74 Implement C++20 p1424 - 'constexpr' feature macro concerns,
75 Issue 3256 - Feature testing macro for constexpr algorithms,
76 and Issue 3257 - Missing feature testing macro update from P0858.
77 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
78 * include/bits/algorithmfwd.h: Ditto.
79 * include/std/utility: Ditto.
80 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
81 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
82 __cpp_lib_constexpr macro in <algorith>.
83 * testsuite/20_util/exchange/constexpr.cc: Add check for
84 __cpp_lib_constexpr macro in <utility>.
85 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
86 __cpp_lib_constexpr_algorithms.
87 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
88 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
89 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
90 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
91 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
92 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
93 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
94 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
95 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
96 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
97 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
98 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
99 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
100 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
101 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
102 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
103 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
104 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
105 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
106 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
107 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
108 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
109 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
110 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
111 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
112 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
113 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
114 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
115 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
116 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
117 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
118 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
119 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
120 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
121 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
122 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
123 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
124 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
125 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
126 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
127 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
128 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
129 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
130 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
131 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
132 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
133 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
134 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
135 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
136 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
137 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
138 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
139 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
141 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
143 Update docs for recent <span> and constexpr lib changes.
144 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
145 p1023r0, p1085r2 status.
146 * doc/html/manual/status.html: Regenerate.
148 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
150 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
151 final offsets with constants.
153 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
155 * include/bits/range_access.h (__adl_to_address): Remove.
156 * include/std/span (__is_base_derived_safe_convertible_v): Replace
157 with span::__is_compatible.
158 (__is_std_array_v): Replace with __is_std_array class template and
159 partial specializations.
160 (__is_std_array, __is_std_span): New class templates and partial
162 (span::__is_compatible): New alias template for SFINAE constraints.
163 (span::span(element_type (&)[N])): Remove redundant constraints. Do
164 not use __adl_data to obtain a pointer.
165 (span::span(array<value_type, N>&)): Likewise.
166 (span::span(const array<value_type, N>&)): Likewise.
167 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
168 (span::iter_value_t, span::derived_from): New alias templates for
169 SFINAE constraints, until the equivalents are supported in <concepts>
171 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
172 for SFINAE constraints.
173 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
175 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
176 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
177 Use std::to_address instead of __adl_to_address.
178 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
179 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
180 template for SFINAE constraints.
181 [!_GLIBCXX_P1394] (span::span(Container&))
182 (span::span(const Container&)): Improve constraints.
183 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
184 (span::span(pointer, pointer)): Remove redundant cast of pointer.
185 (span(const span<OType, OExtent>&)): New constructor.
187 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
189 * include/bits/range_access.h (ssize): Define for C++20.
190 * testsuite/24_iterators/range_access_cpp20.cc: New test.
191 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
192 * doc/html/*: Regenerate.
194 2019-09-06 Florian Weimer <fweimer@redhat.com>
196 * configure: Regenerate.
198 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
200 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
201 P1024R3. Remove entry for P0920R2.
202 * include/std/span (__cpp_lib_span): Change value.
203 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
205 (span): Replace __extent_storage base class with data member.
206 (span::_S_subspan_extent): New function.
207 (span::empty()): Add nodiscard attribute.
208 (span::front, span::back, span::operator[]): Check preconditions.
209 (span::first, span::last, span::subspan): Add noexcept. Improve
210 precondition checks (LWG 3103).
211 (get): Remove redundant condition from static_assert.
212 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
213 (as_writable_bytes): Add inline specifier.
214 * include/std/version (__cpp_lib_span): Change value.
215 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
216 * testsuite/23_containers/span/front_neg.cc: Likewise.
217 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
218 * testsuite/23_containers/span/last_neg.cc: Improve test.
219 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
220 * testsuite/23_containers/span/1.cc: New test.
221 * testsuite/23_containers/span/2.cc: New test.
222 * testsuite/23_containers/span/back_assert_neg.cc: New test.
223 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
224 * testsuite/23_containers/span/first_assert_neg.cc: New test.
225 * testsuite/23_containers/span/first_neg.cc: New test.
226 * testsuite/23_containers/span/front_assert_neg.cc: New test.
227 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
228 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
229 * testsuite/23_containers/span/last_assert_neg.cc: New test.
230 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
231 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
232 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
233 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
234 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
235 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
237 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
239 * include/Makefile.am: Add <span> header.
240 * include/Makefile.in: Regenerate.
241 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
242 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
243 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
244 New functions for performing argument-dependent lookup of range
245 customization points.
246 * include/bits/stl_iterator.h (__normal_iterator): Add
247 _GLIBCXX20_CONSTEXPR to all functions.
248 * include/std/span: New header.
249 * include/std/version (__cpp_lib_span): Define feature test macro.
250 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
251 * testsuite/23_containers/span/everything.cc: New test.
252 * testsuite/23_containers/span/get_neg.cc: New test.
253 * testsuite/23_containers/span/last_neg.cc: New test.
254 * testsuite/23_containers/span/subspan_neg.cc: New test.
255 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
256 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
257 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
259 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
261 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
262 * doc/html/*: Regenerate.
264 2019-09-04 Mike Crowe <mac@mcrowe.com>
267 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
268 pthread_cond_clockwait function.
269 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
270 * configure: Regenerate.
271 * config.h.in: Regenerate.
272 * include/std/condition_variable: (condition_variable): Rename
273 __steady_clock_t typedef and add system_clock. Change __clock_t to be
274 a typedef for the preferred clock to convert arbitrary other clocks to.
275 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
277 (wait_until): Change __clock_t overload to use system_clock.
278 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
279 steady_clock overload that calls pthread_cond_clockwait.
280 (__wait_until_impl): Change __clock_t overload to use system_clock.
281 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
282 steady_clock for __clock_t if pthread_cond_clockwait is available.
284 2019-09-04 Mike Crowe <mac@mcrowe.com>
286 * testsuite/30_threads/condition_variable/members/2.cc (test01):
287 Parameterise so that test can be run against an arbitrary clock.
288 (main): Test using std::chrono::steady_clock and a user-defined
289 clock in addition to the previous std::chrono::system_clock.
290 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
292 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
294 * crossconfig.m4: Remove references to spu.
295 * configure: Regenerate.
296 * doc/xml/manual/appendix_contributing.xml: Remove references
297 to __ea as "badword" for spu.
298 * doc/html/manual/source_code_style.html: Regenerate.
299 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
300 to avoid __ea (as "badword" for spu).
301 (__ellint_rj): Likewise.
303 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
306 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
307 scanning to conform to the GNU Coding Standards.
308 * configure: Regenerate.
310 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
312 * src/c++17/memory_resource.cc: Use __constinit keyword.
314 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
316 * doc/xml/manual/abi.xml: Document 9.x library versions.
317 * doc/html/*: Regenerate.
319 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
321 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
322 (__detail::__to_chars_8_len): Remove.
323 (__detail::__to_chars_8): Inline length calculation here.
324 (__detail::__from_chars_binary): Use numeric_limits instead of
327 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
329 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
330 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
331 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
332 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
335 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
337 * testsuite_files/util/testsuite_performance.h
338 (resource_counter::start): Ignore unused malloc(0) result.
340 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
342 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
343 Model Object Technologies): Adjust name and link.
345 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
347 * include/std/charconv (__detail::__to_chars_8)
348 __detail::__to_chars_16): Replace array of precomputed digits with
349 arithmetic operations to avoid CPU cache misses. Remove zero
350 termination from array of digits to allow symbol merge with generic
351 implementation of __detail::__to_chars. Replace final offsets with
352 constants. Use __detail::__to_chars_len_2 instead of a generic
353 __detail::__to_chars_len.
354 (__detail::__to_chars): Remove zero termination from array of digits.
355 (__detail::__to_chars_2): Leading digit is always '1'.
357 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
359 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
361 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
363 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
365 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
368 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
369 to template parameters.
370 * include/bits/stl_uninitialized.h (uninitialized_copy)
371 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
372 diagnose invalid uses.
373 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
374 Adjust expected error.
375 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
377 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
379 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
381 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
383 * testsuite/23_containers/vector/cons/89164.cc: New test.
384 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
386 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
389 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
390 * configure: Regenerate.
391 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
393 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
395 * testsuite/util/testsuite_abi.cc: Add new symbol version.
397 2019-08-29 Jakub Jelinek <jakub@redhat.com>
399 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
400 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
402 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
404 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
405 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
406 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
407 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
408 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
409 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
410 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
412 2019-08-23 Joseph Myers <joseph@codesourcery.com>
414 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
415 (std::filesystem::__gnu_posix::lstat): Add return type.
417 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
419 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
421 * include/std/numeric (reduce): Fix Doxygen markup.
424 * include/std/type_traits (is_function): Simplify definition. Remove
425 partial specializations for function types.
426 (__is_referenceable): Simplify definition.
427 * testsuite/20_util/bind/91371.cc: New test.
428 * testsuite/20_util/is_function/91371.cc: New test.
429 * testsuite/20_util/is_function/value.cc: Check more pointer types.
430 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
431 * testsuite/20_util/is_object/91371.cc: New test.
433 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
435 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
437 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
440 * include/bits/std_function.h (__check_func_return_type): Remove.
441 (function::_Callable): Use std::__is_invocable_impl instead of
442 __check_func_return_type.
443 * include/std/type_traits (__is_invocable_impl): Add another defaulted
444 template parameter. Define a separate partial specialization for
445 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
446 with a check that models delayed temporary materialization.
447 * testsuite/20_util/function/91456.cc: New test.
448 * testsuite/20_util/is_invocable/91456.cc: New test.
450 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
452 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
454 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
456 Implement C++20 p0879 - Constexpr for swap and swap related functions.
457 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
458 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
460 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
461 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
462 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
463 * include/bits/move.h (swap): Add constexpr.
464 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
465 (__gcd, __rotate, rotate, __partition, __heap_select)
466 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
467 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
468 (__introselect, __chunk_insertion_sort, next_permutation)
469 (prev_permutation, partition, partial_sort, nth_element, sort)
470 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
471 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
472 (swap_ranges): Add constexpr.
473 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
474 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
476 * include/std/type_traits (swap): Add constexpr.
477 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
478 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
479 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
480 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
481 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
482 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
483 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
484 * testsuite/25_algorithms/partition/constexpr.cc: New test.
485 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
486 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
487 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
488 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
489 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
490 * testsuite/25_algorithms/sort/constexpr.cc: New test.
491 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
492 * testsuite/25_algorithms/swap/constexpr.cc: New test.
493 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
495 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
498 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
500 * include/std/tuple (__unpack_std_tuple): New variable template and
501 partial specializations.
502 (apply, make_from_tuple): Add noexcept-specifier.
503 * testsuite/20_util/tuple/apply/2.cc: New test.
504 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
506 2019-08-09 Corentin Gay <gay@adacore.com>
508 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
509 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
510 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
511 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
512 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
513 Add call to `VERIFY`.
515 2019-08-09 Alexandre Oliva <oliva@adacore.com>
518 (normal_mv_distribution::param_type::param_type): New private
519 ctor taking a decomposed varcov matrix, for use by...
520 (operator>>): ... this, befriended.
521 * include/ext/random.tcc (operator>>): Use it.
522 (normal_mv_distribution::param_type::_M_init_lower): Adjust
523 member function name in exception message.
525 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
527 P0325R4 to_array from LFTS with updates
528 * include/experimental/array (to_array): Qualify call to __to_array.
529 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
530 * include/std/version (__cpp_lib_to_array): Likewise.
531 * testsuite/23_containers/array/creation/1.cc: New test.
532 * testsuite/23_containers/array/creation/2.cc: New test.
533 * testsuite/23_containers/array/creation/3_neg.cc: New test.
534 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
535 Use zero for dg-error line number.
537 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
539 P1651R0 bind_front should not unwrap reference_wrapper
540 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
541 * include/std/version (__cpp_lib_bind_front): Update value.
542 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
544 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
546 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
547 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
548 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
549 specializations for __float128.
550 * testsuite/26_numerics/numbers/float128.cc: New test.
552 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
554 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
557 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
559 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
560 in <algorithm> and <utility> Headers.
561 Implement C++20 p1023 - constexpr comparison operators for std::array.
562 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
563 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
564 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
565 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
566 none_of, partition_copy, partition_point, remove, remove_if,
567 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
568 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
569 count_if, equal, find, find_first_of, find_if, for_each, generate,
570 generate_n, lexicographical_compare, merge, mismatch, replace,
571 replace_if, search, search_n, set_difference, set_intersection,
572 set_symmetric_difference, set_union, transform, unique_copy):
574 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
575 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
576 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
577 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
578 Use const ref instead of ref arg;
579 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
580 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
581 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
582 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
583 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
584 __iter_comp_iter): Mark constexpr.
585 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
586 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
587 none_of, any_of, find_if_not, is_partitioned, partition_point,
588 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
589 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
590 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
591 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
592 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
593 __equal_range, equal_range, binary_search, __includes, includes,
594 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
595 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
596 is_sorted_until, __is_permutation, is_permutation, for_each, find,
597 find_if, find_first_of, adjacent_find, count, count_if, search,
598 search_n, transform, replace, replace_if, generate, generate_n,
599 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
600 set_intersection, __set_difference, set_difference,
601 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
602 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
603 wrappers around __builtin_memmove and __builtin_memcmp
605 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
606 copy, move, __copy_move_b, __copy_move_backward_a,
607 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
608 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
609 __lexicographical_compare_impl, __lexicographical_compare,
610 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
611 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
612 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
613 is_heap): Mark constexpr.
614 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
615 is_heap): Mark constexpr.
616 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
617 * include/std/array: Make comparison ops constexpr.
618 * include/std/utility: Make exchange constexpr.
619 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
620 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
621 * testsuite/23_containers/array/tuple_interface/
622 tuple_element_neg.cc: Adjust.
623 * testsuite/20_util/exchange/constexpr.cc: New.
624 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
625 * testsuite/25_algorithms/constexpr_macro.cc: New.
626 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
627 * testsuite/25_algorithms/all_of/constexpr.cc: New.
628 * testsuite/25_algorithms/any_of/constexpr.cc: New.
629 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
630 * testsuite/25_algorithms/copy/constexpr.cc: New.
631 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
632 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
633 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
634 * testsuite/25_algorithms/count/constexpr.cc: New.
635 * testsuite/25_algorithms/count_if/constexpr.cc: New.
636 * testsuite/25_algorithms/equal/constexpr.cc: New.
637 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
638 * testsuite/25_algorithms/fill/constexpr.cc: New.
639 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
640 * testsuite/25_algorithms/find/constexpr.cc: New.
641 * testsuite/25_algorithms/find_end/constexpr.cc: New.
642 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
643 * testsuite/25_algorithms/find_if/constexpr.cc: New.
644 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
645 * testsuite/25_algorithms/for_each/constexpr.cc: New.
646 * testsuite/25_algorithms/generate/constexpr.cc: New.
647 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
648 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
649 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
650 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
651 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
652 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
653 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
654 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
655 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
656 * testsuite/25_algorithms/merge/constexpr.cc: New.
657 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
658 * testsuite/25_algorithms/none_of/constexpr.cc: New.
659 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
660 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
661 * testsuite/25_algorithms/remove/constexpr.cc: New.
662 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
663 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
664 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
665 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
666 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
667 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
668 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
669 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
670 * testsuite/25_algorithms/search/constexpr.cc: New.
671 * testsuite/25_algorithms/search_n/constexpr.cc: New.
672 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
673 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
674 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
675 * testsuite/25_algorithms/set_union/constexpr.cc: New.
676 * testsuite/25_algorithms/transform/constexpr.cc: New.
677 * testsuite/25_algorithms/unique/constexpr.cc: New.
678 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
679 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
681 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
683 * include/std/memory (make_obj_using_allocator): Qualify call to
684 uses_allocator_construction_args.
686 P0631R4 Math Constants
687 * include/Makefile.am: Add new header.
688 * include/Makefile.in: Regenerate.
689 * include/precompiled/stdc++.h: Include new header.
690 * include/std/numbers: New header.
691 * include/std/version (__cpp_lib_math_constants): Define.
692 * testsuite/26_numerics/numbers/1.cc: New test.
693 * testsuite/26_numerics/numbers/2.cc: New test.
694 * testsuite/26_numerics/numbers/3.cc: New test.
695 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
697 * include/std/bit: Add Doxygen comments.
700 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
701 constraints on deleter that should only apply to the constructor.
702 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
703 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
704 constraints on deleter here.
705 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
707 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
710 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
712 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
714 * testsuite/18_support/51333.cc: New test.
716 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
718 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
719 to the Doxygen manual. Avoid a "here" link on the way.
720 Fix another broken link to Doxygen docblocks.
722 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
724 * include/std/bit (__cpp_lib_endian): Define.
725 * include/std/version (__cpp_lib_endian): Define.
726 * testsuite/26_numerics/endian/2.cc: New.
727 * testsuite/26_numerics/endian/3.cc: New.
728 * testsuite/26_numerics/endian/4.cc: New.
730 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
732 * testsuite/util/testsuite_iterators.h
733 (bidirectional_iterator_wrapper): Fix type comment.
734 (random_access_iterator_wrapper): Likewise.
736 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
738 * include/std/bit (endian): Move definition here as per P1612R1.
739 * include/std/type_traits (endian): Remove definition from here.
740 * testsuite/20_util/endian/1.cc: Rename to ...
741 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
743 2019-07-25 Martin Liska <mliska@suse.cz>
744 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
747 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
749 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
750 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
751 * testsuite/ext/new_allocator/check_new.cc: Likewise.
753 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
755 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
756 * testsuite/26_numerics/bit/bit.count/*: Here.
758 * include/std/bit (__rotl, __rotr): Change second parameter from
759 unsigned int to int and handle negative values.
760 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
761 parameter from unsigned int to int. Add nodiscard attribute.
762 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
763 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
765 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
766 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
769 * include/std/bit (__ceil2): Make unrepresentable results undefined,
770 as per P1355R2. Add debug assertion. Perform one left shift, not two,
771 so that out of range values cause undefined behaviour. Ensure that
772 shift will still be undefined if left operand is promoted.
773 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
774 unrepresentable values with checks that they are not core constant
776 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
778 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
780 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
781 sized deallocation size computation.
783 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
785 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
787 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
789 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
790 (~_Temporary_buffer()): Use latter.
791 (_Temporary_buffer(_FIterator, size_type)): Likewise.
793 2019-07-17 Andreas Schwab <schwab@suse.de>
795 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
797 2019-07-16 Jason Merrill <jason@redhat.com>
799 * include/std/memory (uses_allocator_construction_args): Add parens
802 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
804 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
806 * include/experimental/string_view (__detail::__idt): Remove.
807 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
808 Use __type_identity_t instead of __detail::__idt;
809 * include/std/string_view (__detail::__idt): Remove.
810 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
811 Use __type_identity_t instead of __detail::__idt;
812 * include/std/type_traits (__type_identity_t): New alias template.
814 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
815 and floating point atomics.
817 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
819 * doc/xml/manual/configure.xml: Improve documentation of
820 --enable-libstdcxx-time option.
822 * include/bits/atomic_base.h (__atomic_impl): New namespace for
823 wrappers around atomic built-ins.
824 (__atomic_float, __atomic_ref): New class templates for use as base
826 * include/std/atomic (atomic<float>, atomic<double>)
827 (atomic<long double>): New explicit specializations.
828 (atomic_ref): New class template.
829 (__cpp_lib_atomic_ref): Define.
830 * include/std/version (__cpp_lib_atomic_ref): Define.
831 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
832 * testsuite/29_atomics/atomic_float/1.cc: New test.
833 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
834 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
835 * testsuite/29_atomics/atomic_ref/float.cc: New test.
836 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
837 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
838 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
839 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
841 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
843 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
844 throw() with _GLIBCXX_NOTHROW.
845 (__atomic_add_dispatch): Return after performing atomic increment.
847 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
849 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
850 (__exchange_and_add): Replace static specifier with always_inline
852 (__exchange_and_add_single, __atomic_add_single): Likewise.
853 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
854 combine !__gthread_active_p() and !__GTHREADS branches.
856 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
859 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
860 * configure: Regenerate.
861 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
863 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
864 * testsuite/util/testsuite_abi.cc: Add new symbol version.
866 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
868 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
869 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
870 instead of __is_identifier to detect Clang support.
872 2019-07-02 Jim Wilson <jimw@sifive.com>
874 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
876 * configure: Regenerate.
878 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
881 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
882 for the what_arg parameters.
883 (filesystem_error::filesystem_error): Pass system_error::what() to
884 the _Impl constructor.
885 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
886 filesystem_error::what() contains system_error::what().
888 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
890 * include/std/charconv (chars_format): Define bitmask type.
891 * testsuite/20_util/to_chars/chars_format.cc: New test.
893 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
894 * include/std/bit (_If_is_unsigned_integer_type): Remove.
895 (_If_is_unsigned_integer): Use __is_unsigned_integer.
896 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
897 (countl_one(byte), countr_zero(byte), countr_one(byte))
898 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
899 (log2p1(byte)): Remove.
900 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
901 (__detail::__is_int_to_chars_type): Remove.
902 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
903 and __is_unsigned_integer.
904 * include/std/type_traits (__is_one_of): Move here from <charconv>.
905 (__is_signed_integer, __is_unsigned_integer): New helpers.
906 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
908 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
909 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
910 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
911 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
912 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
913 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
914 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
915 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
916 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
917 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
919 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
921 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
924 2019-06-25 Jakub Jelinek <jakub@redhat.com>
926 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
927 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
928 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
929 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
931 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
933 * include/std/numeric (midpoint(T, T)): Change implementation for
934 floating-point types to avoid incorrect rounding of denormals.
935 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
936 rounding with denormals.
937 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
938 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
940 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
942 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
944 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
946 * configure: Regenerate.
948 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
949 Qualify calls to __never_valueless.
951 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
954 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
955 vector<bool> for test.
956 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
958 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
960 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
962 (istream_iterator::_M_read()): Do not check stream state before
963 attempting extraction. Set stream pointer to null when extraction
965 (operator==(const istream_iterator&, const istream_iterator&)): Change
966 to be a hidden friend of istream_iterator.
967 (operator!=(const istream_iterator&, const istream_iterator&)):
969 (ostream_iterator::ostream_iterator()): Add default constructor.
970 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
972 * testsuite/24_iterators/istream_iterator/1.cc: New test.
973 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
974 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
975 constructor taking a string.
976 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
979 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
980 Jonathan Wakely <jwakely@redhat.com>
983 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
984 values of type bool for vector<bool> elements.
985 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
986 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
988 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
990 PR libstdc++/90920 partially revert r263433
991 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
992 (rotate): Remove checks.
993 * testsuite/25_algorithms/rotate/90920.cc: New test.
995 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
996 category used in invocable check.
997 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
998 * testsuite/26_numerics/reduce/2.cc: New test.
1000 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1002 * include/bits/algorithmfwd.h: Change title of doc group.
1003 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1005 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1006 * include/std/numeric (__is_random_access_iter): New internal trait.
1007 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1008 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1009 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1010 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1011 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1012 * testsuite/26_numerics/reduce/1.cc: New test.
1013 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1014 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1015 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1016 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1019 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1020 in unsigned int to avoid promotion (LWG 2950).
1022 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1024 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1027 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1029 PR libstdc++/90281 Fix string conversions for filesystem::path
1030 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1031 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1032 __str_codecvt_in_all to fail for partial conversions and throw on
1034 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1035 (path::_Cvt<char8_t>): Add explicit specialization.
1036 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1038 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1039 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1040 instead of codecvt_utf8. Use __str_codecvt_in_all and
1041 __str_codecvt_out_all.
1042 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1043 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1044 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1045 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1046 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1047 after converting to UTF-8.
1048 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1049 __str_codecvt_in_all.
1050 (path::string): Fix initialization of string types with different
1052 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1053 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1054 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1056 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1057 return false for partial conversions.
1058 * include/experimental/bits/fs_path.h (u8path):
1059 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1060 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1061 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1062 instead of codecvt_utf8. Use __str_codecvt_in_all and
1063 __str_codecvt_out_all.
1064 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1065 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1066 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1067 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1068 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1069 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1070 __str_codecvt_in_all.
1071 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1072 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1073 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1074 __str_codecvt_in_all.
1075 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1076 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1077 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1078 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1079 strings and with Unicode characters outside the basic multilingual
1081 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1082 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1083 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1084 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1085 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1086 empty strings and with Unicode characters outside the basic
1089 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1090 Jonathan Wakely <jwakely@redhat.com>
1092 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1093 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1094 deallocate node if insertion fails.
1095 (_Hashtable::_M_insert_multi_node): Likewise.
1096 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1097 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1098 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1099 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1100 (_Hashtable::extract(const _Key&)): Likewise.
1101 (_Hashtable::_M_merge_unique): Pass additional key argument.
1102 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1104 (_Hashtable::_M_insert): Likewise.
1105 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1106 (_Hashtable_alloc): Add comments to functions with misleading names.
1108 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1110 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1112 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1113 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1114 header for std::allocator.
1115 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1116 using-declaration for std::size_t.
1117 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1119 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1121 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1122 * testsuite/experimental/map/erasure.cc: Include <string> for
1124 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1126 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1128 * include/experimental/type_traits (experimental::nonesuch): Use
1129 pragma to disable -Wctor-dtor-privacy warnings.
1130 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1131 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1133 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1135 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1137 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1138 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1139 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1140 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1142 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1143 (variant::emplace): Change static_assert messages from "should be"
1145 (hash<monostate>::operator()): Remove name of unused parameter.
1147 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1150 * include/Makefile.am: Add new <bits/charconv.h> header.
1151 * include/Makefile.in: Regenerate.
1152 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1153 (to_string(long), to_string(unsigned long), to_string(long long))
1154 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1155 * include/bits/charconv.h: New header.
1156 (__detail::__to_chars_len): Move here from <charconv>.
1157 (__detail::__to_chars_10_impl): New function extracted from
1158 __detail::__to_chars_10.
1159 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1160 (__to_chars_unsigned_type): New class template that reuses
1161 __make_unsigned_selector_base::__select to pick a type.
1162 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1163 (__detail::__to_chars_len): Move to new header.
1164 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1165 output to __detail::__to_chars_10_impl and call that.
1166 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1167 * testsuite/21_strings/basic_string/numeric_conversions/char/
1168 to_string.cc: Fix reference in comment. Remove unused variable.
1169 * testsuite/21_strings/basic_string/numeric_conversions/char/
1170 to_string_int.cc: New test.
1172 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1174 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1175 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1176 Replace copy with hand-rolled loop.
1177 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1180 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1182 Test for C++20 p0858 - ConstexprIterator requirements.
1183 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1185 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1188 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1190 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1192 * include/bits/c++config: Rename all macros of the form __PSTL* to
1194 * include/std/algorithm: Likewise.
1195 * include/std/execution: Likewise.
1196 * include/std/numeric: Likewise.
1197 * include/std/memory: Likewise.
1198 * include/pstl/glue_memory_impl.h: Likewise.
1199 * include/pstl/numeric_impl.h: Likewise.
1200 * include/pstl/glue_memory_defs.h: Likewise.
1201 * include/pstl/execution_defs.h: Likewise.
1202 * include/pstl/utils.h: Likewise.
1203 * include/pstl/algorithm_fwd.h: Likewise.
1204 * include/pstl/unseq_backend_simd.h: Likewise.
1205 * include/pstl/glue_execution_defs.h: Likewise.
1206 * include/pstl/algorithm_impl.h: Likewise.
1207 * include/pstl/parallel_impl.h: Likewise.
1208 * include/pstl/memory_impl.h: Likewise.
1209 * include/pstl/glue_numeric_defs.h: Likewise.
1210 * include/pstl/parallel_backend_utils.h: Likewise.
1211 * include/pstl/glue_algorithm_defs.h: Likewise.
1212 * include/pstl/parallel_backend.h: Likewise.
1213 * include/pstl/glue_numeric_impl.h: Likewise.
1214 * include/pstl/parallel_backend_tbb.h: Likewise.
1215 * include/pstl/numeric_fwd.h: Likewise.
1216 * include/pstl/glue_algorithm_impl.h: Likewise.
1217 * include/pstl/execution_impl.h: Likewise.
1218 * include/pstl/pstl_config.h: Likewise.
1219 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1220 * testsuite/util/pstl/test_utils.h: Likewise.
1221 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1223 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1225 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1227 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1228 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1229 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1230 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1231 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1233 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1234 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1235 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1236 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1237 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1239 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1240 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1241 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1242 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1243 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1245 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1246 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1247 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1249 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1251 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1252 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1253 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1255 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1257 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1259 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1261 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1263 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1265 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1267 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1269 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1271 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1273 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1275 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1277 Rename header guards to be consistent with upstream project's
1279 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1280 _PSTL_(.*)_H to _PSTL_\U\1_H.
1281 * include/pstl/numeric_impl.h: Likewise.
1282 * include/pstl/glue_memory_defs.h: Likewise.
1283 * include/pstl/execution_defs.h: Likewise.
1284 * include/pstl/utils.h: Likewise.
1285 * include/pstl/algorithm_fwd.h: Likewise.
1286 * include/pstl/unseq_backend_simd.h: Likewise.
1287 * include/pstl/glue_execution_defs.h: Likewise.
1288 * include/pstl/algorithm_impl.h: Likewise.
1289 * include/pstl/parallel_impl.h: Likewise.
1290 * include/pstl/memory_impl.h: Likewise.
1291 * include/pstl/glue_numeric_defs.h: Likewise.
1292 * include/pstl/parallel_backend_utils.h: Likewise.
1293 * include/pstl/glue_algorithm_defs.h: Likewise.
1294 * include/pstl/parallel_backend.h: Likewise.
1295 * include/pstl/glue_numeric_impl.h: Likewise.
1296 * include/pstl/parallel_backend_tbb.h: Likewise.
1297 * include/pstl/numeric_fwd.h: Likewise.
1298 * include/pstl/glue_algorithm_impl.h: Likewise.
1299 * include/pstl/execution_impl.h: Likewise.
1300 * include/pstl/pstl_config.h: Likewise.
1301 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1303 Synchronize libstdc++ parallel algorithms with upstream
1305 * include/pstl/algorithm_fwd.h: Synchronize with
1306 upstream PSTL project.
1307 * include/pstl/algorithm_impl.h: Likewise.
1308 * include/pstl/execution_defs.h: Likewise.
1309 * include/pstl/execution_impl.h: Likewise.
1310 * include/pstl/glue_algorithm_impl.h: Likewise.
1311 * include/pstl/glue_execution_defs.h: Likewise.
1312 * include/pstl/numeric_fwd.h: Likewise.
1313 * include/pstl/numeric_impl.h: Likewise.
1314 * include/pstl/parallel_backend.h: Likewise.
1315 * include/pstl/pstl_config.h: Likewise.
1316 * include/pstl/unseq_backend_simd.h: Likewise.
1317 * include/pstl/parallel_backend_serial.h: New file.
1318 * include/Makefile.am (pstl_headers): Add
1319 parallel_backend_serial.h.
1320 * include/Makefile.in: Regenerate.
1322 Clean up non-conforming names
1323 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1324 Uglfiy copy_range1 and copy_range2
1325 (__pattern_walk2_n): Rename local n to __n
1326 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1327 Rename parameter _T to _Tp.
1329 Integrate non-TBB serial backend support
1330 * include/bits/c++config: Adjust TBB detection logic to select serial
1331 PSTL backend if no TBB present.
1332 * testsuite/utils/pstl/test_utils.h: Remove check for
1333 _PSTL_USE_PAR_POLICIES
1335 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1337 * testsuite/24_iterators/container_access.cc: Move dg-options before
1338 dg-do directive so the target check uses the -std option.
1341 * configure: Regenerate.
1342 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1343 * src/Makefile.in: Regenerate.
1345 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1347 * include/std/array: Do not include <stdexcept>.
1348 * include/std/optional: Include <exception> and
1349 <bits/exception_defines.h> instead of <stdexcept>.
1350 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1352 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1354 * testsuite/23_containers/map/erasure.cc: Include <string>.
1355 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1357 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1358 dg-prune-output for different C++98 diagnostic.
1359 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1361 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1363 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1365 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1367 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1369 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1371 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1373 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1375 * testsuite/23_containers/vector/requirements/dr438/
1376 constructor_1_neg.cc: Likewise.
1377 * testsuite/23_containers/vector/requirements/dr438/
1378 constructor_2_neg.cc: Likewise.
1379 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1381 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1383 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1384 Do not test allocator rebinding extension for C++2a.
1385 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1386 dg-do directive for C++17 and C++2a.
1388 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1389 1_c++0x.cc: Remove redundant test.
1390 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1391 2.cc: Use target selector instead of preprocessor condition.
1392 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1393 3.cc: Do not run test for C++2a.
1394 * testsuite/23_containers/forward_list/requirements/
1395 explicit_instantiation/3.cc: Likewise.
1396 * testsuite/23_containers/forward_list/requirements/
1397 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1399 * testsuite/23_containers/list/requirements/explicit_instantiation/
1400 1_c++0x.cc: Remove redundant test.
1401 * testsuite/23_containers/list/requirements/explicit_instantiation/
1402 2.cc: Use target selector instead of preprocessor condition.
1403 * testsuite/23_containers/list/requirements/explicit_instantiation/
1404 3.cc: Do not run test for C++2a.
1405 * testsuite/23_containers/list/requirements/explicit_instantiation/
1406 5.cc: Do not test allocator rebinding extension for C++2a.
1407 * testsuite/23_containers/map/requirements/explicit_instantiation/
1408 1_c++0x.cc: Remove redundant test.
1409 * testsuite/23_containers/map/requirements/explicit_instantiation/
1410 2.cc: Adjust comment.
1411 * testsuite/23_containers/map/requirements/explicit_instantiation/
1412 3.cc: Do not run test for C++2a.
1413 * testsuite/23_containers/map/requirements/explicit_instantiation/
1414 5.cc: Do not test allocator rebinding extension for C++2a.
1415 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1416 1_c++0x.cc: Remove redundant test.
1417 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1418 3.cc: Do not run test for C++2a.
1419 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1420 5.cc: Do not test allocator rebinding extension for C++2a.
1421 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1422 3.cc: Do not run test for C++2a.
1423 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1424 5.cc: Do not test allocator rebinding extension for C++2a.
1425 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1426 Do not run test for C++2a.
1427 * testsuite/23_containers/set/requirements/explicit_instantiation/
1428 1_c++0x.cc: Remove redundant test.
1429 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1430 Do not test allocator rebinding extension for C++2a.
1431 * testsuite/23_containers/unordered_map/requirements/
1432 explicit_instantiation/3.cc: Likewise.
1433 * testsuite/23_containers/unordered_map/requirements/
1434 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1436 * testsuite/23_containers/unordered_multimap/requirements/
1437 explicit_instantiation/3.cc: Do not run test for C++2a.
1438 * testsuite/23_containers/unordered_multimap/requirements/
1439 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1441 * testsuite/23_containers/unordered_multiset/requirements/
1442 explicit_instantiation/3.cc: Do not run test for C++2a.
1443 * testsuite/23_containers/unordered_multiset/requirements/
1444 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1446 * testsuite/23_containers/unordered_set/requirements/
1447 explicit_instantiation/3.cc: Do not run test for C++2a.
1448 * testsuite/23_containers/unordered_set/requirements/
1449 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1451 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1452 2.cc: Remove redundant test.
1453 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1454 3.cc: Do not run test for C++2a.
1455 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1458 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1459 (is_abstract, is_aggregate): Remove static_assert.
1460 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1462 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1463 missing -std=gnu++17 option.
1464 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1465 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1466 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1469 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1470 * testsuite/18_support/set_unexpected.cc: Likewise.
1471 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1473 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1474 function to be valid in C++11.
1475 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1476 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1477 include Library Fundamentals or Networking headers in C++11 mode.
1478 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1480 * include/std/tuple (_TC): Replace with _TupleConstraints.
1481 (_TupleConstraints): New helper for SFINAE constraints, with more
1482 expressive member functions to reduce duplication when used.
1483 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1484 (tuple::_TCC): Replace dummy type parameter with bool non-type
1485 parameter that can be used to check the pack size.
1486 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1487 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1488 checking constraints in constructors.
1489 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1491 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1492 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1493 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1494 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1495 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1496 constraints in constructors.
1497 (tuple::__is_alloc_arg()): New SFINAE helpers.
1498 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1500 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1501 * testsuite/20_util/tuple/cons/90700.cc: New test.
1502 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1503 to meet new constraint on allocator-extended default constructor.
1505 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1507 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1508 * include/bits/stl_multimap.h (multimap): Likewise.
1510 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1512 Rename variables and cleanup comments.
1513 * include/bits/hashtable_policy.h
1514 * include/bits/hashtable.h
1516 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1518 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1519 Fix bgcolor for P0340R3.
1520 * doc/html/*: Regenerate.
1523 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1524 <experimental/memory_resource>.
1525 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1526 P0339R6, P0340R3, P1164R1 and P1357R1.
1527 * doc/html/*: Regenerate.
1529 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1530 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1531 allocator::value_type assertion for C++2a.
1532 * include/bits/hashtable.h: Likewise.
1533 * include/bits/stl_deque.h: Likewise.
1534 * include/bits/stl_list.h: Likewise.
1535 * include/bits/stl_map.h: Likewise.
1536 * include/bits/stl_multimap.h: Likewise.
1537 * include/bits/stl_multiset.h: Likewise.
1538 * include/bits/stl_set.h: Likewise.
1539 * include/bits/stl_vector.h: Likewise.
1540 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1541 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1542 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1543 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1544 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1545 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1546 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1547 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1548 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1549 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1550 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1551 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1553 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1555 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1557 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1559 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1561 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1563 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1565 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1567 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1570 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1571 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1572 * libsupc++/eh_term_handler.h: New header defining
1573 _GLIBCXX_DEFAULT_TERM_HANDLER.
1574 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1575 (set_terminate): Restore default handler when argument is null.
1576 (set_unexpected): Likewise.
1577 * testsuite/18_support/set_terminate.cc: New test.
1578 * testsuite/18_support/set_unexpected.cc: New test.
1580 * include/backward/hashtable.h (size_t, ptrdiff_t)
1581 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1582 (distance, vector, pair, __iterator_category): Remove
1583 using-declarations that add these names to namespace __gnu_cxx.
1584 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1585 * include/ext/debug_allocator.h (size_t): Likewise.
1586 * include/ext/functional (size_t, unary_function, binary_function)
1587 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1589 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1590 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1591 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1592 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1593 * include/ext/numeric (iota): Fix outdated comment.
1594 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1595 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1596 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1597 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1598 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1600 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1601 (allocator, __true_type, __false_type): Likewise.
1603 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1606 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1607 New helpers for checking preconditions in traits.
1608 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1609 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1610 (is_destructible, is_nothrow_destructible, is_constructible)
1611 (is_default_constructible, is_copy_constructible)
1612 (is_move_constructible, is_nothrow_default_constructible)
1613 (is_nothrow_constructible, is_nothrow_copy_constructible)
1614 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1615 (is_nothrow_assignable, is_nothrow_copy_assignable)
1616 (is_nothrow_move_assignable, is_trivially_constructible)
1617 (is_trivially_copy_constructible, is_trivially_move_constructible)
1618 is_trivially_assignable, is_trivially_copy_assignable)
1619 (is_trivially_move_assignable, is_trivially_destructible)
1620 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1621 (is_invocable_r, is_nothrow_invocable)
1622 (has_unique_object_representations, is_aggregate): Add static_asserts
1623 to make sure that type traits are not misused with incomplete types.
1624 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1625 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1626 base characteristics without assertions that can be reused in other
1628 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1629 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1631 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1632 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1633 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1634 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1635 * testsuite/20_util/is_function/value.cc: Likewise.
1636 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1637 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1639 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1640 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1641 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1642 * testsuite/20_util/is_union/value.cc: Likewise.
1643 * testsuite/20_util/is_void/value.cc: Likewise.
1644 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1646 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1648 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1649 Add new private member function.
1650 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1651 (random_device::_M_init_pretr1(const string&)): Call new private
1652 member with string data.
1653 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1655 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1656 test using COW strings.
1657 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1658 a value from the device.
1659 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1660 Fix typo in token string.
1662 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1664 LWG2788 basic_string spurious use of a default constructible allocator
1665 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1666 (basic_string::_M_replace_dispatch): Construct temporary string with
1667 the current allocator.
1668 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1669 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1671 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1673 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1675 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1676 section about new/delete overloads. Improve section on verbose
1678 * doc/html/*: Regenerate.
1680 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1681 P0811R3. Change status of P1353R0.
1682 * doc/html/*: Regenerate.
1684 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1685 documentation of implementation-defined types for [thread.req.native].
1686 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1687 implementation-defined strings for [variant.bad.access]. Fix typo in
1688 documentation of implementation-defined support for [fs.conform.9945].
1689 * doc/html/*: Regenerate.
1691 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1694 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1695 that fails on mingw-w64.
1698 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1699 (status(const path&, error_code&)): Use parent_path() to remove
1701 (symlink_status(const path&, error_code&)): Duplicate workaround for
1702 bug in _wstat for paths with trailing slash.
1703 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1704 with trailing slash.
1705 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1706 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1708 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1709 once instead of building it iteratively.
1711 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1713 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1714 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1715 the assembler supports rdseed.
1716 * config.h.in: Regenerate.
1717 * configure: Regenerate.
1718 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1719 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1720 * doc/html/*: Regenerate.
1721 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1722 * include/bits/random.h (random_device::random_device()): Always call
1723 _M_init rather than _M_init_pretr1.
1724 (random_device::random_device(const string&)): Likewise.
1725 (random_device::operator()()): Always call _M_getval().
1726 (random_device::_M_file): Replace first member of union with an
1727 anonymous struct, with _M_file as its first member.
1728 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1729 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1730 (USE_MT19937): Define if none of the above are defined.
1731 (USE_POSIX_FILE_IO): Define.
1732 (_M_strtoul): Remove.
1733 [USE_RDSEED] (__x86_rdseed): Define new function.
1734 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1735 (random_device::_M_init(const string&)): Initialize new union members.
1736 Add support for "rdseed" and "rand_s" tokens. Decide what the
1737 "default" token does according to which USE_* macros are defined.
1738 [USE_POSIX_FILE_IO]: Store a file descriptor.
1739 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1740 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1741 code from _M_strtoul.
1742 [!USE_MT19937]: Call _M_init, transforming the old default token or
1743 numeric tokens to "default".
1744 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1745 (random_device::_M_getval()): Use new union members to obtain a
1746 random number from the stored function pointer or file descriptor.
1747 [USE_MT19937]: Obtain a value from the mt19937 engine.
1748 (random_device::_M_getval_pretr1()): Call _M_getval().
1749 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1751 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1752 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1754 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1757 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1758 _M_split_cmpts() for a path with multiple components.
1759 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1760 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1761 components and reserve space in vector. Return early when there is
1763 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1764 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1766 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1767 form of std::equals for C++11 compatibility.
1769 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1771 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1772 C++ standard at ansi.org.
1774 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1776 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1777 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1780 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1781 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1783 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1785 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1787 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1788 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1789 "compile" test to "run".
1791 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1792 * doc/html/*: Regenerate.
1793 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1794 rvalue aliasing constructor.
1795 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1796 (reinterpret_pointer_cast): Add overloads taking rvalues.
1797 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1798 Add rvalue aliasing constructor.
1799 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1800 "run" and check return values as well as types.
1801 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1802 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1803 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1804 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1807 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1808 * doc/xml/manual/intro.xml: Likewise.
1809 * include/std/future (__create_task_state): Add default arguments
1810 to make providing an allocator optional.
1811 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1812 instead of delegating to another constructor.
1813 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1814 define allocator-extended constructors for C++17 and later.
1815 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1817 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1818 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1819 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1821 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1823 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1824 Don't run the libstdc++/83237 part on simulator targets.
1826 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1828 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1830 * doc/html/*: Regenerate.
1832 * include/experimental/any (__any_caster): Use RTTI if comparing
1833 addresses fails, to support non-unique addresses in shared libraries.
1834 * include/std/any (__any_caster): Likewise.
1837 * include/experimental/any (__any_caster): Constrain to only be
1838 callable for object types. Use remove_cv_t instead of decay_t.
1839 If the type decays or isn't copy constructible, compare the manager
1840 function to a dummy specialization.
1841 (__any_caster): Add overload constrained for non-object types.
1842 (any::_Manager_internal<_Op>): Add dummy specialization.
1843 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1846 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1849 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1850 reversed arguments to uninitialized_copy_n.
1851 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1852 is unchanged by copy assignment.
1853 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1854 compare path components.
1857 * include/experimental/memory_resource: Add system header pragma and
1858 do not define anything unless compiled as C++14 or later.
1859 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1860 (__resource_adaptor_imp::do_allocate): If the requested alignment
1861 is a fundamental alignment then either allocate directly from _M_alloc
1862 or call the new _M_allocate function.
1863 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1864 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1865 of the allocator rebound to a POD type with the specified alignment.
1866 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1867 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1868 Adjust expected allocation sizes.
1869 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1870 xfail for Solaris x86.
1872 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1874 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1875 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1876 Use std::__remove_cvref_t when building with GCC.
1878 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1881 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1882 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1883 Use check_v3_target_prop_cached to cache the result of the test.
1885 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1887 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1890 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1891 Changed v3_target_compile check from preprocess to executable.
1892 Added "-ltbb" to v3_target_compile flags.
1894 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1896 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1897 Add check for Thread Building Blocks 2018 or later.
1899 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1901 * testsuite/experimental/names.cc: Only include Networking TS headers
1902 on targets with the necessary Gthreads support.
1904 2019-05-20 Marek Polacek <polacek@redhat.com>
1906 CWG 2094 - volatile scalars are trivially copyable.
1908 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1909 result for volatile int.
1911 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1913 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1914 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1917 PR c++/90532 Ensure __is_constructible(T[]) is false
1918 * include/std/type_traits (__do_is_default_constructible_impl)
1919 (__is_default_constructible_atom, __is_default_constructible_safe):
1921 (is_default_constructible): Use is_constructible.
1922 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1923 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1924 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1925 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1928 2019-05-20 Pádraig Brady <pbrady@fb.com>
1930 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1931 to the deallocator with -fsized-deallocation.
1933 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1935 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1936 test by passing correct alignment to deallocate function.
1938 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1941 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1942 Raise exception if unique_ptr tuple member has unknown structure.
1943 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1944 Adjust worker to support new __uniq_ptr_data base class. Do not
1945 assume field called _M_head_impl is the first tuple element.
1947 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1949 * include/bits/stl_deque.h
1950 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1951 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1952 (_Deque_base::_Deque_impl_data): New.
1953 (_Deque_base::_Deque_impl): Inherit latter.
1954 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1955 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1956 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1957 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1958 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1959 (deque<>::deque()): Default.
1960 (deque<>::deque(deque&&)): Default.
1961 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1962 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1963 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1964 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1965 _M_range_initialize.
1966 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1967 (deque<>::resize(size_type, const value_type&)): Share a single
1969 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1970 _M_range_insert_aux.
1971 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1972 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1973 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1974 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1976 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1979 * include/std/variant (holds_alternative, get, get_if): Improve
1980 static assertion messages.
1981 (bad_variant_access::bad_variant_access()): Change default message.
1982 (__throw_bad_variant_access(bool)): New overload.
1983 (get): Use new overload.
1984 (visit, visit<R>): Improve exception message.
1986 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1987 targets. Add more cases from P0608R3.
1988 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1990 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1991 * include/experimental/type_traits (is_detected_exact)
1992 (is_detected_exact_v): Likewise.
1993 * include/pstl/execution_defs.h (is_execution_policy)
1994 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1995 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1996 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1997 * testsuite/experimental/names.cc: New test.
2000 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2001 assertions from the destructor.
2002 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2003 Move static_assert for hash function to here.
2004 (_Hash_table_base::_M_equals): Move static_assert for equality
2006 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2008 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2009 the value directly instead of calling _S_value.
2010 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2011 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2012 _S_key(_Const_Link_type).
2013 * testsuite/23_containers/set/85965.cc: Check construction,
2014 destruction, assignment and size() do not trigger the assertions.
2015 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2016 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2018 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2019 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2020 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2021 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2022 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2023 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2024 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2026 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2027 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2030 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2032 * doc/html/*: Regenerate.
2033 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2034 of decay_t (P0777R1).
2036 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2038 Move from state of allocators (LWG2593)
2039 * include/bits/stl_deque.h
2040 (_Deque_base(_Deque_base&&, false_type)): Remove.
2041 (_Deque_base(_Deque_base&&, true_type)): Remove.
2042 (_Deque_base(_Deque_base&&)): Adapt.
2043 (_Deque_base::_M_move_impl()): Remove.
2044 * testsuite/util/testsuite_allocator.h
2045 (propagating_allocator(propagating_allocator&&)): Preserve move from
2047 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2049 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2051 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2052 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2053 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2055 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2057 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2058 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2060 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2062 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2064 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2066 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2068 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2070 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2072 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2075 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2077 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2078 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2080 * include/std/variant (__overload_set): Remove.
2082 (_Build_FUN): New class template to define a single FUN overload,
2083 with specializations to prevent unwanted conversions, as per P0608R3.
2084 (_Build_FUNs): New class template to build an overload set of FUN.
2085 (_FUN_type): New alias template to perform overload resolution.
2086 (__accepted_type): Use integer_constant base for failure case. Use
2087 _FUN_type for successful case.
2088 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2089 (variant::variant(_Tp&&)): Likewise.
2090 (variant::operator=(_Tp&&)): Likewise.
2092 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2093 Replace raw visitation with a runtime check for the valueless state
2094 and a non-raw visitor.
2095 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2096 (variant::index()): Remove branch.
2097 (variant::swap(variant&)): Use valueless_by_exception() instead of
2098 comparing the index to variant_npos, and add likelihood attribute.
2100 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2101 (_Hashtable_base::_Equal_hash_code): Define new class template.
2102 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2105 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2106 Replace with _M_get non-static member function.
2107 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2109 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2110 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2112 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2113 _S_get accessors for members in EBO helpers.
2114 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2115 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2117 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2119 (_Hashtable_base::_M_eq()): Remove non-const overload.
2121 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2123 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2125 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2127 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2130 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2132 * config/os/solaris/solaris2.10: Move to ...
2133 * config/os/solaris: ... this.
2134 * configure.host (os_include_dir): Adapt.
2135 (abi_baseline_pair): Remove Solaris 10 handling.
2136 * config/abi/post/i386-solaris2.10: Remove.
2137 * config/abi/post/sparc-solaris2.10: Remove.
2138 * config/abi/post/i386-solaris2.11: Rename to ...
2139 * config/abi/post/i386-solaris: ... this.
2140 * config/abi/post/sparc-solaris2.11: Rename to ...
2141 * config/abi/post/sparc-solaris: ... this.
2143 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2146 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2149 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2151 * include/std/variant (__visit_with_index): Remove typedef.
2152 (__deduce_visit_result): New tag type.
2153 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2154 visitation of possibly-valueless variants, forwarding to __do_visit
2155 with the relevant tag type.
2156 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2157 and make lambda return void.
2158 (__variant_construct): Likewise.
2159 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2160 __raw_idx_visit and make lambda return void.
2161 (_Multi_array::__untag_result): Add metafunction to check the function
2162 pointer type for a tag type that dictates the kind of visitation.
2163 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2164 Use decltype(auto) instead of tagged function pointer type.
2165 (__gen_vtable_impl): Remove bool non-type parameter and unused
2166 _Variant_tuple parameter.
2167 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2168 (__gen_vtable_impl::__do_visit_invoke): Remove.
2169 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2170 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2171 for the visit<R> case, rather than dispatching to separate functions.
2172 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2174 (variant::swap): Likewise.
2175 (__do_visit): Replace two non-type template parameters with a single
2176 type parameter, so that the caller must specify the visitor's return
2177 type (or one of the tag types).
2178 (visit): Deduce a return type from the visitor and use the
2179 __deduce_visit_result tag to enforce that all overloads return the
2181 (visit<R>): Call __do_visit<R> with explicit result type.
2182 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2185 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2187 nonesuch is insufficiently useless (lwg2996)
2188 * include/std/type_traits (struct __nonesuch): Added private base
2189 class to make __nonesuch not an aggregate and removed deleted default
2191 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2192 (operator=(const pair&)): Use __nonesuch instead of
2193 __nonesuch_no_braces.
2194 (operator=(pair&&)): Likewise
2195 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2196 of __nonesuch_no_braces.
2197 (operator=(tuple&&)): Likewise
2198 * include/experimental/type_traits (struct nonesuch): Added private
2199 base class to make nonesuch not an aggregate and removed deleted
2200 default constructor.
2201 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2202 * testsuite/experimental/type_traits/nonesuch.cc: New.
2204 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2206 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2207 (_Function_handler): Remove partial specializations for void return
2208 types and pointers to member.
2209 (_Function_handler::_M_manager): Adapt to removal of
2210 _Simple_type_wrapper.
2211 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2212 * include/std/functional (_Bind_result::__enable_if_void)
2213 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2214 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2216 * include/std/future (__future_base::_Task_state::_M_run)
2217 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2218 change return type of lambda expressions.
2220 * include/bits/invoke.h (__invoke_r): Define new function implementing
2221 the INVOKE<R> pseudo-function.
2222 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2223 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2225 * include/std/type_traits (__is_nt_convertible_helper): Define it
2226 unconditionally, not only for C++20.
2227 (__is_nothrow_convertible): Define internal trait for use in C++11.
2228 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2229 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2230 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2231 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2232 that has nothrow explicit conversion but potentially-throwing implicit
2234 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2235 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2236 function to only consider implicit conversions.
2237 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2239 * include/std/iterator: Include <iosfwd> instead of <istream> and
2242 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2243 Remove unused, non-standard function.
2245 * include/bits/regex.h (match_results::max_size()): Adjust return
2246 value to account for prefix/suffix/unmatched subs.
2247 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2248 reset the contained sub matches.
2249 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2250 function to set result state following a failed match.
2251 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2252 sub_match states after _M_resize. Use _M_establish_failed_match.
2255 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2256 Replace single _Callable parameter with variadic _Args pack, to
2257 forward them directly to the tuple of decayed copies.
2258 * testsuite/30_threads/thread/cons/69724.cc: New test.
2260 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2262 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2263 * include/bits/basic_string.h: (operator=(const basic_string&):
2264 Move allocator decision to assign.
2265 (assign(const basic_string&)): Move allocator decision here.
2266 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2268 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2271 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2273 * testsuite/util/testsuite_allocator.h (memory_resource)
2274 (default_resource_mgr): Fix indentation.
2276 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2277 Use operator-> to access raw pointer member.
2278 * testsuite/23_containers/vector/59829.cc: Likewise.
2279 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2280 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2281 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2283 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2284 its constructors and equality operators. Change converting
2285 constructors to use operator-> to access private member of the other
2287 (PointerBase_void::operator->()): Add, for access to private member.
2288 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2289 (operator==(PointerBase, PointerBase)): Remove.
2290 (operator!=(PointerBase, PointerBase)): Remove.
2292 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2293 not assume field called _M_head_impl is the first tuple element.
2294 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2295 implementation more accurate.
2296 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2297 empty pointer type and non-empty deleter.
2299 LWG 2899 - Make is_move_constructible correct for unique_ptr
2300 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2301 move assignment operator.
2302 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2303 (__uniq_ptr_data): New class template with conditionally deleted
2305 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2306 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2307 constructor and move assignment operator as defaulted.
2308 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2309 __uniq_ptr_impl::release().
2310 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2311 to __uniq_ptr_impl::reset(pointer).
2312 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2313 Check for new __uniq_ptr_data type.
2314 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2316 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2318 PR libstdc++/90454.cc path construction from void*
2319 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2320 pointers to void are rejected as well as void.
2321 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2322 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2324 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2326 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2327 <remark> elements. Fix formatting of bibliography references.
2329 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2331 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2333 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2335 Remove Profile Mode, deprecated since 7.1.0
2336 * doc/Makefile.am: Remove XML file for profile mode docs.
2337 * doc/Makefile.in: Regenerate.
2338 * doc/xml/authors.xml: Remove authors of profile mode docs.
2339 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2341 * doc/xml/manual/debug.xml: Likewise.
2342 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2343 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2344 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2345 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2347 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2349 * doc/html/*: Regenerate.
2350 * include/Makefile.am: Remove profile mode headers.
2351 * include/Makefile.in: Regenerate.
2352 * include/bits/c++config (std::__profile): Remove namespace.
2353 [_GLIBCXX_PROFILE]: Remove checks for macro.
2354 * include/profile/array: Remove.
2355 * include/profile/base.h: Remove.
2356 * include/profile/bitset: Remove.
2357 * include/profile/deque: Remove.
2358 * include/profile/forward_list: Remove.
2359 * include/profile/impl/profiler.h: Remove.
2360 * include/profile/impl/profiler_algos.h: Remove.
2361 * include/profile/impl/profiler_container_size.h: Remove.
2362 * include/profile/impl/profiler_hash_func.h: Remove.
2363 * include/profile/impl/profiler_hashtable_size.h: Remove.
2364 * include/profile/impl/profiler_list_to_slist.h: Remove.
2365 * include/profile/impl/profiler_list_to_vector.h: Remove.
2366 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2367 * include/profile/impl/profiler_node.h: Remove.
2368 * include/profile/impl/profiler_state.h: Remove.
2369 * include/profile/impl/profiler_trace.h: Remove.
2370 * include/profile/impl/profiler_vector_size.h: Remove.
2371 * include/profile/impl/profiler_vector_to_list.h: Remove.
2372 * include/profile/iterator_tracker.h: Remove.
2373 * include/profile/list: Remove.
2374 * include/profile/map: Remove.
2375 * include/profile/map.h: Remove.
2376 * include/profile/multimap.h: Remove.
2377 * include/profile/multiset.h: Remove.
2378 * include/profile/ordered_base.h: Remove.
2379 * include/profile/set: Remove.
2380 * include/profile/set.h: Remove.
2381 * include/profile/unordered_base.h: Remove.
2382 * include/profile/unordered_map: Remove.
2383 * include/profile/unordered_set: Remove.
2384 * include/profile/vector: Remove.
2385 * scripts/run_doxygen: Do not process profile mode headers.
2386 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2388 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2389 Remove dg-skip-if for profile mode.
2390 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2391 preprocessor check for profile mode.
2392 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2393 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2395 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2397 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2398 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2399 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2400 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2401 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2403 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2405 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2407 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2409 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2410 preprocessor check for profile mode.
2411 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2413 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2414 Remove dg-skip-if for profile mode.
2415 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2416 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2417 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2418 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2419 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2420 * testsuite/Makefile.am: Remove profile_flags variable and
2421 * testsuite/Makefile.am: Remove profile_flags variable and
2422 check-profile target.
2423 * testsuite/Makefile.in: Regenerate.
2424 * testsuite/ext/profile/all.cc: Remove.
2425 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2426 * testsuite/ext/profile/profiler_algos.cc: Remove.
2427 * testsuite/ext/profile/replace_new.cc: Remove.
2428 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2429 preprocessor check for profile mode.
2430 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2431 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2432 (check_v3_target_normal_mode): Do not check for profile mode macro.
2433 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2435 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2436 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2437 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2438 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2439 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2440 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2441 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2442 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2443 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2444 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2446 Remove array_allocator extension, deprecated since 4.9.0
2447 * doc/xml/manual/allocator.xml: Remove documentation for
2449 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2450 * doc/xml/manual/using.xml: Remove header from documentation.
2451 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2452 * include/Makefile.in: Regenerate.
2453 * include/ext/array_allocator.h: Remove.
2454 * include/precompiled/extc++.h: Do not include removed header.
2455 * testsuite/ext/array_allocator/1.cc: Remove.
2456 * testsuite/ext/array_allocator/2.cc: Remove.
2457 * testsuite/ext/array_allocator/26875.cc: Remove.
2458 * testsuite/ext/array_allocator/3.cc: Remove.
2459 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2460 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2461 * testsuite/ext/array_allocator/check_new.cc: Remove.
2462 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2463 * testsuite/ext/headers.cc: Do not include removed header.
2465 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2467 * include/bits/stl_bvector.h
2468 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2470 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2472 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2474 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2476 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2478 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2480 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2482 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2484 (_Bit_iterator::operator-(difference_type)): Likewise.
2485 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2486 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2488 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2489 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2491 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2494 * testsuite/util/thread/all.h: Do not use remove_pointer for
2495 std::thread::native_handle_type.
2498 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2499 (_Variant_storage<true, Types...>::_M_reset()))
2500 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2501 (__get_storage): Likewise.
2502 (variant): Add noexcept to friend declarations for __get and
2506 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2507 Use _Require for constraints.
2508 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2510 (__uniq_ptr_hash): New base class with conditionally-disabled call
2512 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2513 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2514 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2516 * include/bits/shared_ptr.h: Improve docs.
2517 * include/bits/shared_ptr_base.h: Likewise.
2518 * include/bits/stl_uninitialized.h: Likewise.
2519 * include/bits/unique_ptr.h: Likewise.
2520 * libsupc++/new: Likewise.
2522 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2524 * include/bits/stl_deque.h
2525 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2527 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2529 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2531 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2533 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2535 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2537 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2539 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2541 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2544 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2545 (test01): Reserve for number of insertions to avoid rehash during test.
2546 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2548 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2553 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2555 * include/experimental/bits/fs_path.h: Improve docs.
2556 * include/experimental/bits/net.h: Fix wrong header name in comment.
2557 Do not document implementation details.
2558 * include/experimental/netfwd: Fix doxygen grouping.
2560 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2562 * include/bits/stl_pair.h: Improve docs.
2563 * include/std/tuple: Likewise.
2565 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2567 * include/std/chrono: Improve docs.
2568 * include/std/ratio: Do not document implementation details.
2569 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2571 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2574 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2575 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2576 (__duration_common_type): New helper.
2577 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2578 __duration_common_type.
2579 (__timepoint_common_type_wrapper): Replace with ...
2580 (__timepoint_common_type): New helper.
2581 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2582 Use __time_point_common_type.
2583 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2584 (__common_type_impl): If either argument is transformed by decay,
2585 use the common_type of the decayed types.
2586 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2587 decayed, use __do_common_type_impl to get the common_type.
2588 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2589 (__do_member_type_wrapper, __member_type_wrapper)
2590 (__expanded_common_type_wrapper): Remove.
2591 (__common_type_pack, __common_type_fold): New helpers.
2592 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2593 __member_type_wrapper and __expanded_common_type_wrapper.
2594 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2595 Test zero-length template argument list.
2596 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2597 Test single argument cases and argument types that should decay.
2598 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2599 Adjust expected error.
2600 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2602 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2603 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2604 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2606 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2608 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2610 Make allocator propagation more consistent for
2611 operator+(basic_string) (P1165R1)
2612 * include/bits/basic_string.h
2613 (operator+(basic_string&&, basic_string&&): Changed resulting
2614 allocator to always be the one from the first parameter.
2615 * include/bits/basic_string.tcc
2616 (operator+(const _CharT*, const basic_string&)): Changed
2617 resulting allocator to be SOCCC on the second parameter's allocator.
2618 (operator+(_CharT, const basic_string&)): Likewise.
2619 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2621 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2624 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2626 * include/bits/regex.h: Improve docs.
2627 * include/bits/regex.tcc: Do not document implementation details.
2629 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2631 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2633 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2634 Add type printer for container types in std::__debug namespace.
2635 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2636 (gdb-tests): Use distinct parameters for the type of test and use of
2638 (gdb-test): Check for regex test even if 'whatis' test.
2639 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2641 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2642 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2643 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2644 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2645 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2646 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2647 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2649 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2651 * include/std/system_error (error_category): Fix comment.
2654 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2655 argument is an empty path.
2656 (absolute(const path&, error_code&)): Use invalid_argument as error
2657 code instead of no_such_file_or_directory.
2658 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2659 of non-existent paths and empty paths with both overloads of absolute.
2661 * include/std/system_error (error_category, error_code)
2662 (error_condition): Improve docs.
2663 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2664 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2665 to class documentation. Suppress documentation for implementation
2667 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2668 Suppress documentation for implementation details.
2670 * include/std/system_error (error_code): Remove friend declaration
2671 for hash<error_code>.
2672 (hash<error_code>::operator()): Use public member functions to access
2674 (hash<error_condition>::operator()): Use address of category, not
2675 its object representation.
2676 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2677 Use public member functions to access value and category.
2678 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2680 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2682 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2683 * include/bits/hashtable_policy.h
2684 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2685 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2686 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2687 smaller than input value rather than always greater. Preserve
2688 _M_next_resize if called with 0 input. Use __builtin_floorl.
2689 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2690 elements + number of insertions is greater than _M_next_resize. Start
2691 with 11 buckets if not told otherwise. Use __builtin_floorl.
2692 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2693 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2694 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2695 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2696 told otherwise. Use __builtin_floorl.
2697 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2698 to also validate _Power2_rehash_policy.
2699 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2702 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2705 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2709 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2710 overflow warning with -Wpedantic -Wsystem-headers.
2712 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2715 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2716 * include/bits/move.h (swap): Remove extra parentheses.
2718 * include/experimental/bits/lfts_config.h: Improve doc markup.
2719 * include/experimental/optional: Improve docs.
2720 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2721 (__constexpr_addressof): Remove.
2722 (optional::operator->()): Use std::__addressof().
2723 * include/std/optional (optional::operator->()): Adjust whitespace.
2724 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2725 that operator-> is still constexpr with overloaded operator&. Change
2726 to compile-only test.
2727 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2730 * include/bits/shared_ptr.h: Improve docs.
2731 * include/bits/shared_ptr_atomic.h: Likewise.
2732 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2734 * include/bits/basic_string.h: Fix iterator/index confusion in
2736 * include/bits/range_access.h: Fix Doxygen warnings.
2737 * include/bits/refwrap.h: Do not document implementation details.
2738 (ref, cref): Group docs with reference_wrapper.
2739 * include/std/fstream: Fix Doxygen markup.
2740 * libsupc++/initializer_list (begin, end): Group docs with
2743 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2745 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2746 * include/std/mutex: Likewise.
2747 * include/std/shared_mutex: Likewise.
2749 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2750 * include/bits/fs_fwd.h: Likewise.
2751 * include/bits/fs_ops.h: Likewise.
2752 * include/bits/fs_path.h: Likewise.
2753 * include/std/filesystem: Likewise.
2755 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2756 * include/experimental/buffer: Likewise.
2757 * include/experimental/executor: Likewise.
2758 * include/experimental/internet: Likewise.
2759 * include/experimental/io_context: Likewise.
2760 * include/experimental/net: Likewise.
2761 * include/experimental/netfwd: Likewise.
2762 * include/experimental/socket: Likewise.
2763 * include/experimental/timer: Likewise.
2765 * doc/doxygen/doxygroups.cc: Move description of experimental group
2767 * include/experimental/algorithm: Add to libfund-ts doc group.
2768 * include/experimental/any: Likewise. Do not document implementation
2770 * include/experimental/array: Add to libfund-ts doc group.
2771 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2772 for Library Fundamentals.
2773 * include/experimental/chrono: Add to libfund-ts doc group.
2774 * include/experimental/deque: Likewise.
2775 * include/experimental/forward_list: Likewise.
2776 * include/experimental/functional: Likewise.
2777 * include/experimental/iterator: Likewise.
2778 * include/experimental/list: Likewise.
2779 * include/experimental/map: Likewise.
2780 * include/experimental/memory: Likewise.
2781 * include/experimental/memory_resource: Likewise. Improve docs.
2783 * include/experimental/numeric: Add to libfund-ts doc group.
2784 * include/experimental/optional: Likewise.
2785 * include/experimental/propagate_const: Likewise.
2786 * include/experimental/random: Likewise.
2787 * include/experimental/ratio: Likewise.
2788 * include/experimental/regex: Likewise.
2789 * include/experimental/set: Likewise.
2790 * include/experimental/source_location: Likewise.
2791 * include/experimental/string: Likewise.
2792 * include/experimental/string_view: Likewise.
2793 * include/experimental/system_error: Likewise.
2794 * include/experimental/tuple: Likewise.
2795 * include/experimental/type_traits: Likewise.
2796 * include/experimental/unordered_map: Likewise.
2797 * include/experimental/unordered_set: Likewise.
2798 * include/experimental/utility: Likewise.
2799 * include/experimental/vector: Likewise.
2800 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2801 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2802 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2804 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2805 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2806 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2807 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2808 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2810 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2811 * include/experimental/bits/fs_fwd.h: Improve docs.
2812 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2813 * include/experimental/bits/fs_path.h: Likewise.
2814 (path, filesystem_error, u8path): Improve docs.
2815 * include/experimental/filesystem: Link to docs for TS.
2817 * config/allocator/new_allocator_base.h (__allocator_base): Add
2818 workaround for Doxygen bug #6945.
2819 * include/std/memory: Improve docs. Define group for pointer safety.
2820 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2821 conditional to suppress documentation for implementation details.
2823 * include/bits/specfun.h: Improve docs.
2824 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2827 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2828 (std::experimental): Add docs.
2829 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2830 namespace to nothing when generating docs.
2831 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2832 * include/std/chrono (std::chrono): Likewise.
2833 * include/std/functional (std::placeholders): Likewise.
2834 * include/std/thread (std::this_thread): Likewise.
2836 * include/parallel/settings.h: Fix Doxygen markup.
2838 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2839 anything unless PB_DS_CLASS_C_DEC is defined.
2840 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2841 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2842 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2843 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2844 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2845 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2846 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2848 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2849 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2850 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2851 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2852 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2853 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2854 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2855 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2856 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2857 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2858 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2860 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2861 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2863 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2866 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2867 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2868 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2871 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2873 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2874 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2875 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2876 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2877 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2878 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2880 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2881 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2884 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2887 * include/std/complex (__complex_proj): Return parameter unchanged.
2888 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2889 floating-point types to take std::complex arguments.
2890 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2891 floating-point types.
2892 * testsuite/26_numerics/complex/proj.cc: New test.
2894 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2896 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2897 to _Lock_policyE[012].
2898 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2900 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2902 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2903 macros accidentally left in.
2904 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2905 unnecessary -lstdc++fs option. Fix test for mingw.
2906 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2909 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2911 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2913 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2915 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2917 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2918 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2921 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2923 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2926 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2927 class template and partial specialization.
2930 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2932 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2933 functions to convert a value to an integral type.
2934 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2935 (fill_n): Convert _Size parameter to an integral type.
2936 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2937 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2938 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2939 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2940 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2941 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2943 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2945 Adding noexcept-specification on tuple constructors (LWG 2899)
2946 * libstdc++-v3/include/std/tuple:
2947 (tuple()): Add noexcept-specification.
2948 (tuple(const _Elements&...)): Likewise
2949 (tuple(_UElements&&...)): Likewise
2950 (tuple(const tuple<_UElements...>&)): Likewise
2951 (tuple(tuple<_UElements...>&&)): Likewise
2952 (tuple(const _T1&, const _T2&)): Likewise
2953 (tuple(_U1&&, _U2&&)): Likewise
2954 (tuple(const tuple<_U1, _U2>&): Likewise
2955 (tuple(tuple<_U1, _U2>&&): Likewise
2956 (tuple(const pair<_U1, _U2>&): Likewise
2957 (tuple(pair<_U1, _U2>&&): Likewise
2958 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2960 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2963 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2964 arguments with __restrict.
2966 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2968 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2970 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2972 * include/experimental/bits/fs_path.h
2973 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2974 avoid redundant call to _S_convert_loc with non-const pointers.
2976 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2977 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2978 * testsuite/21_strings/basic_string/hash/hash.cc
2979 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2980 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2981 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2983 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2984 wstring::_M_replace_dispatch with more specific patterns.
2985 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2986 Create const std::string to avoid redundant call to _S_convert_loc
2987 with non-const pointers.
2988 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2989 avoid unnecessary basic_string::assign instantiations.
2991 * include/std/memory (__uses_alloc_args): Add string-literal to
2992 static_assert, to match the one in __uses_alloc.
2993 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2994 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2995 for recursive uses-allocator construction of nested pairs.
2996 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2999 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3001 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3002 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3003 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3004 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3006 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3007 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3008 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3009 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3010 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3011 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3012 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3014 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3017 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3018 * include/std/scoped_allocator [__cplusplus > 201703L]
3019 (scoped_allocator_adaptor::construct): Define in terms of
3020 uses_allocator_construction_args, as per P0591R4.
3021 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3022 * testsuite/util/testsuite_allocator.h: Remove name of unused
3025 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3027 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3028 * doc/html/*: Regenerate.
3030 * include/bits/fs_path.h (operator<, operator<=, operator>)
3031 (operator>=, operator==, operator!=): Make hidden friends, as per
3033 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3034 string type in test.
3035 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3037 * include/std/any (any::any(ValueType&&)): Use __and_v.
3038 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3041 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3043 * include/std/type_traits (__result_of_memfun): Use remove_reference
3044 instead of __remove_cvref_t and remove redundant is_same check.
3045 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3047 * include/experimental/string_view (basic_string_view::pointer)
3048 (basic_string_view::reference): Fix to refer to non-const value_type.
3049 * include/bits/basic_string.h (basic_string): Use __sv_check and
3050 __sv_limit instead of basic_string_view::_M_check and
3051 basic_string_view::_M_limit.
3052 * include/std/string_view (__sv_check, __sv_limit): New
3053 helper functions to replace basic_string_view::_M_check and
3054 basic_string_view::_M_limit.
3055 (basic_string_view): Add static assertions to enforce ill-formed
3056 requirement for traits_type::char_type from P1148R0, and to enforce
3057 required properties of char-like types.
3058 (basic_string_view::pointer, basic_string_view::reference): Fix to
3059 refer to non-const value_type.
3060 (basic_string_view::operator[], basic_string_view::at)
3061 (basic_string_view::front, basic_string_view::back)
3062 (basic_string_view::data): Use const_reference and const_pointer
3063 typedefs for return types.
3064 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3065 (hash<wstring_view>): Fix argument_type typedef.
3066 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3067 char/1.cc: Fix expected return type of basic_string_view::data().
3068 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3069 wchar_t/1.cc: Likewise.
3070 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3071 char/1.cc: Likewise.
3072 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3073 wchar_t/1.cc: Likewise.
3074 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3076 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3077 Check reference and pointer typedefs.
3078 * testsuite/experimental/string_view/requirements/typedefs.cc:
3080 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3081 Fix expected return type of basic_string_view::data().
3082 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3084 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3086 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3090 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3091 Avoid a runtime check for types that can never be stored in std::any.
3092 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3095 PR libstdc++/90220 (partial)
3096 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3097 not attempt ill-formed static_cast to pointers to non-object types.
3098 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3101 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3102 prevent -Wcatch-value warning.
3104 * include/std/variant (__variant_construct): Use template parameter
3105 type instead of equivalent decltype-specifier.
3106 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3107 Replace forward with move.
3108 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3109 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3110 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3111 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3112 index after construction succeeds.
3113 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3114 if-constexpr checks that are always true. Use __remove_cvref_t instead
3115 of remove_reference so that is_nothrow_move_constructible check
3116 doesn't use a const rvalue parameter. In the potentially-throwing case
3117 construct a temporary and move assign it, as per LWG 2904.
3118 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3119 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3120 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3121 construct a temporary and move assign from it, as per LWG 2904.
3122 * testsuite/20_util/variant/exception_safety.cc: Check that
3123 assignment operators have strong exception safety guarantee.
3125 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3127 Document PSTL linker flags
3129 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3131 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3133 * include/std/variant (__detail::__variant::_Traits): Make
3134 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3135 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3137 (__detail::__variant::_Copy_assign_alias): Only depend on
3138 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3139 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3140 move assignment operators.
3143 * include/std/variant (variant::__not_self): New helper for the
3144 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3145 (variant::__to_type_impl): Remove.
3146 (variant::__to_type): Add default argument to check pack size, instead
3147 of using __to_type_impl.
3148 (variant::__accepted_type): Add default argument using __not_self.
3149 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3150 for variant(T&&) constructor constraint.
3151 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3152 Extract __accepted_type into a named template parameter for reuse in
3153 other constraints and in the exception specification.
3154 (variant::variant(in_place_type_t<T>, Args&&...))
3155 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3156 (variant::variant(in_place_index_t<T>, Args&&...))
3157 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3158 (variant::operator=T&&)): Remove redundant && from trait arguments.
3159 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3160 isn't used for in_place_type or in_place_index arguments.
3162 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3163 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3164 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3166 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3167 Bernd Edlinger <bernd.edlinger@hotmail.de>
3168 Jakub Jelinek <jakub@redhat.com>
3171 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3172 general-regs-only target attribute for ARM.
3174 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3177 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3178 specialization also depend on is_nothrow_move_constructible.
3179 * include/std/variant (__detail::__variant::__never_valueless()):
3180 Only true if the variant would have a move assignment operator.
3181 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3182 Check __never_valueless<T...>().
3183 (variant::emplace): Only perform non-throwing move assignments
3184 for never-valueless alternatives if the variant has a move assignment
3186 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3187 types can be emplaced into non-assignable variants.
3188 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3189 don't get copied when emplaced into non-assignable variants.
3191 * include/std/variant (__detail::__variant::__ref_cast): Remove
3193 (__detail::__variant::_Uninitialized::_M_get)
3194 (__detail::__variant::__get)
3195 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3197 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3199 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3201 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3202 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3203 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3204 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3206 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3208 Delegate PSTL configuration to pstl/pstl_config.h
3210 * include/bits/c++config: Remove explicit PSTL configuration
3211 macros and use definitions from <pstl/pstl_config.h>.
3213 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3215 Cleanup algorithm implementations
3216 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3218 (mismatch): Forward execution policy.
3219 (equal): Qualify call to std::equal().
3220 (partial_sort): Forward execution policy.
3221 (inplace_merge): Forward execution policy.
3223 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3225 Improve implementation of parallel equal()
3226 * include/pstl/algorithm_impl.h
3227 (__internal::__brick_equal): use "4 iterator" version of
3229 (__internal::__brick_equal): use simd for random access
3230 iterators on unsequenced execution policies.
3231 (__internal::__pattern_equal): add "4 iterator" version
3232 (__internal::__pattern_equal): dispatch to simd __brick_equal
3233 for vector-only execution policies.
3234 (__internal::__pattern_equal): dispatch to __parallel_or for
3235 parallel execution policies.
3236 * include/pstl/glue_algorithm_impl.h
3237 (std::equal): dispatch to "4 iterator" version of
3238 __internal::__pattern_equal().
3240 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3243 * include/bits/forward_list.h (operator==): Do not use operator!= to
3245 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3246 earlier in the list, so that sort is stable.
3247 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3248 * testsuite/23_containers/forward_list/comparable.cc: Test with
3249 types that meet the minimum EqualityComparable and LessThanComparable
3250 requirements. Remove irrelevant comment.
3252 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3253 Do not depend on whether all alternative types are move constructible.
3254 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3255 from the operand when deciding whether to perform the assignment.
3256 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3257 with deleted move constructor and deleted move assignment operator.
3258 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3259 behaviour of variants with DeletedMoves as an alternative.
3260 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3261 (move_ctor, move_assign): Check that moving a variant with a
3262 DeletedMoves alternative falls back to copying instead of moving.
3264 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3265 from static_assert declarations.
3267 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3268 actually match its name.
3269 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3270 (test_swap()): Fix result for MoveCtorOnly and check
3271 MoveCtorAndSwapOnly.
3273 * include/std/optional (optional::value_or(U&&) &&): Add missing
3274 constexpr specifier.
3275 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3276 for disengaged optionals and rvalue optionals.
3277 * testsuite/20_util/optional/observers/4.cc: Likewise.
3279 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3281 * include/pstl/algorithm_impl.h: Uglify identfiers.
3282 * include/pstl/numeric_impl.h: Uglify identfiers.
3283 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3285 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3287 * include/bits/c++config:
3288 Add definition for __PSTL_ASSERT.
3289 Add definition for __PSTL_ASSERT_MSG.
3290 * include/pstl/algorithm_impl.h: Replace use of assert().
3291 * include/pstl/numeric_impl.h: Replace use of assert().
3292 * include/pstl/parallel_backend_tbb.h:
3293 Replace use of assert().
3294 Replace use of __TBB_ASSERT().
3295 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3297 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3300 * src/c++17/memory_resource.cc
3301 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3302 needed to allow placing a _Chunk at the end of the buffer.
3303 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3305 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3307 * doc/xml/faq.xml: Add information about emergency EH pool.
3308 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3309 Move outdated information on mt_allocator to a separate section.
3310 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3311 doesn't affect the default allocator.
3313 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3317 * testsuite/20_util/variant/89851.cc: New test.
3319 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3321 * include/std/variant: Adjust whitespace. Add comments.
3322 (_Multi_array): Leave primary template undefined.
3323 (_Multi_array<_Tp>): Define partial specialization for base case of
3325 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3326 which is always a reference.
3327 (__gen_vtable::_S_apply()): Remove function, inline body into
3328 default member initializer.
3329 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3331 * include/std/variant (__variant_idx_cookie): Add member type.
3332 (__visitor_result_type): Remove.
3333 (__do_visit): Use invoke_result instead of __visitor_result_type.
3334 * testsuite/20_util/variant/visit.cc: New test.
3337 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3339 * testsuite/20_util/variant/90008.cc: New test.
3341 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3343 * include/pstl/algorithm_impl.h: Add namespace qualification.
3344 * include/pstl/execution_defs.h: Add namespace qualification.
3345 * include/pstl/execution_impl.h: Add namespace qualification.
3346 * include/pstl/numeric_impl.h: Add namespace qualification.
3347 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3348 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3349 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3351 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3353 Fix visit<R> for variant.
3354 * include/std/variant (__do_visit): Add a template parameter
3355 for enforcing same return types for visit.
3356 (__gen_vtable_impl): Likewise.
3357 (_S_apply_single_alt): Adjust.
3358 (__visit_invoke_impl): New. Handle casting to void.
3359 (__do_visit_invoke): New. Enforces same return types.
3360 (__do_visit_invoke_r): New. Converts return types.
3361 (__visit_invoke): Adjust.
3362 (__gen_vtable): Add a template parameter for enforcing
3363 same return types for visit.
3364 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3365 different return types.
3366 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3367 visitors with different return types don't accidentally
3368 compile with regular visitation.
3370 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3372 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3373 dg-require-filesystem-ts.
3375 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3377 * doc/xml/manual/status_cxx2020.xml: Update status.
3378 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3379 * testsuite/20_util/variant/visit_r.cc: New test.
3381 * include/bits/fs_dir.h (directory_iterator::operator*)
3382 (directory_iterator::operator->): Add noexcept.
3383 (operator==, operator!=): Replace namespace-scope equality operators
3384 for directory iterators with hidden friends.
3387 * config/abi/pre/gnu.ver: Add missing exports.
3388 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3391 * config/abi/pre/gnu.ver: Export new symbols.
3392 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3393 (recursive_directory_iterator::recursion_pending())
3394 (recursive_directory_iterator::disable_recursion_pending()): Remove
3395 inline definitions. Make noexcept.
3396 (recursive_directory_iterator::depth())
3397 (recursive_directory_iterator::operator*())
3398 (recursive_directory_iterator::operator->()): Make noexcept.
3399 (recursive_directory_iterator::_M_options)
3400 (recursive_directory_iterator::_M_pending): Remove data members.
3401 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3402 (recursive_directory_iterator::recursive_directory_iterator): Remove
3403 ctor-initializer. Use new constructor for _Dir_stack.
3404 (recursive_directory_iterator::options())
3405 (recursive_directory_iterator::recursion_pending())
3406 (recursive_directory_iterator::disable_recursion_pending()): Add
3407 non-inline definitions.
3408 (recursive_directory_iterator::depth()): Make noexcept.
3409 (recursive_directory_iterator::increment(error_code&))
3410 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3411 location of options and recursion_pending members.
3412 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3413 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3414 user-declared move constructor and assignment operator, to make the
3417 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3418 d_type == DT_UNKNOWN immediately.
3419 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3421 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3423 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3425 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3426 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3429 PR libstdc++/87431 (again)
3430 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3431 Define partial specialization for basic_string.
3432 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3433 shared_ptr and weak_ptr.
3434 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3436 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3438 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3440 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3442 * include/std/any (_Never_valueless_alt): Define explicit
3443 specialization for any.
3444 * include/std/variant (_Never_valueless_alt): Define primary template.
3445 (__never_valueless): Use _Never_valueless_alt instead of
3446 is_trivially_copyable.
3447 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3448 initializations to avoid try-catch overhead. Add special case for
3449 scalars produced by potentially-throwing conversions. Use
3450 _Never_valueless_alt instead of is_trivially_copyable for the
3451 remaining strong exception-safety cases.
3452 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3453 * testsuite/20_util/variant/87431.cc: Run both test functions.
3454 * testsuite/20_util/variant/exception_safety.cc: New test.
3455 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3456 so the variant becomes valueless.
3458 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3461 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3463 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3465 * include/std/string (__hash_string_base): New class template defining
3466 operator() for hashing strings.
3467 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3468 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3469 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3470 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3472 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3474 Use single-visitation in variant assignment and swap and relops.
3475 Also use indices instead of types when checking whether
3476 variants hold the same thing.
3477 * include/std/variant (__do_visit): Add a template parameter
3478 for index visitation, invoke with indices if index visitation
3480 (__variant_idx_cookie): New.
3481 (__visit_with_index): Likewise.
3482 (_Copy_assign_base::operator=): Do single-visitation with
3484 (_Move_assign_base::operator=): Likewise.
3485 (_Extra_visit_slot_needed): Adjust.
3486 (__visit_invoke): Call with indices if it's an index visitor.
3487 (relops): Do single-visitation with an index visitor.
3489 (__visitor_result_type): New.
3491 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3493 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3495 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3497 Don't revisit a variant we are already visiting.
3498 * include/std/variant (__variant_construct_single): New.
3499 (__variant_construct): Use it.
3500 (_M_destructive_move): Likewise.
3501 (_M_destructive_copy): Likewise.
3502 (_Copy_assign_base::operator=): Adjust.
3503 (_Move_assign_base::operator=): Likewise.
3506 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3509 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3510 destructor so they are not evaluated until the _Key type is complete.
3511 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3512 * testsuite/23_containers/set/85965.cc: New test.
3513 * testsuite/23_containers/unordered_set/85965.cc: New test.
3514 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3515 with regexp matching the corresponding _Rb_tree specialization.
3516 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3517 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3518 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3519 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3520 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3521 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3522 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3524 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3527 Fix based on a suggestion by Antony Polukhin.
3528 * include/std/variant (__never_valueless): New.
3530 (_Extra_visit_slot_needed): New.
3531 (_Multi_array): Use it.
3532 (_S_apply_all_alts): Likewise.
3534 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3537 Fix based on a suggestion by Antony Polukhin.
3538 * include/std/variant (__gen_vtable): Don't reserve an
3539 additional table slot, _Multi_array already does that.
3541 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3544 Fix based on a suggestion by Antony Polukhin.
3545 * include/std/variant (__variant_construct): Capture a pointer
3546 to the storage and visit just one variant.
3548 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3550 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3551 Doxygen-generated pages with unstable URL.
3552 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3553 * doc/xml/manual/extensions.xml: Likewise.
3554 * doc/xml/manual/parallel_mode.xml: Likewise.
3555 * doc/xml/manual/support.xml: Likewise.
3557 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3558 avoid -Wconversion warnings.
3560 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3562 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3563 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3564 (allstamped): Add stamp-pstl.
3565 (install-headers): Add ptsl_builddir.
3566 * include/Makefile.in: Regenerate.
3567 * include/bits/c++config: Add pstl configuration.
3568 * include/pstl/LICENSE.txt: New file.
3569 * include/pstl/algorithm_fwd.h: New file.
3570 * include/pstl/algorithm_impl.h: New file.
3571 * include/pstl/execution_defs.h: New file.
3572 * include/pstl/execution_impl.h: New file.
3573 * include/pstl/glue_algorithm_defs.h: New file.
3574 * include/pstl/glue_algorithm_impl.h: New file.
3575 * include/pstl/glue_execution_defs.h: New file.
3576 * include/pstl/glue_memory_defs.h: New file.
3577 * include/pstl/glue_memory_impl.h: New file.
3578 * include/pstl/glue_numeric_defs.h: New file.
3579 * include/pstl/glue_numeric_impl.h: New file.
3580 * include/pstl/memory_impl.h: New file.
3581 * include/pstl/numeric_fwd.h: New file.
3582 * include/pstl/numeric_impl.h: New file.
3583 * include/pstl/parallel_backend.h: New file.
3584 * include/pstl/parallel_backend_tbb.h: New file.
3585 * include/pstl/parallel_backend_utils.h: New file.
3586 * include/pstl/parallel_impl.h: New file.
3587 * include/pstl/pstl_config.h: New file.
3588 * include/pstl/unseq_backend_simd.h: New file.
3589 * include/pstl/utils.h: New file.
3590 * include/std/algorithm: Include parallel algorithm implementations.
3591 * include/std/execution: New file.
3592 * include/std/memory: Include parallel algorithm implementations.
3593 * include/std/numeric: Include parallel algorithm implementations.
3594 * include/std/version: Add parallel algorithms feature test macro.
3595 * testsuite/util/pstl/pstl_test_config.h: New file.
3596 * testsuite/util/pstl/test_utils.h: New file.
3597 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3598 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3599 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3600 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3601 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3602 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3603 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3604 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3605 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3606 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3607 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3608 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3609 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3610 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3611 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3612 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3613 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3614 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3615 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3616 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3617 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3618 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3619 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3620 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3621 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3622 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3623 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3624 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3625 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3626 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3627 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3628 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3629 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3630 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3631 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3632 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3633 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3634 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3635 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3636 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3637 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3638 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3639 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3640 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3641 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3642 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3643 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3644 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3645 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3646 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3647 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3648 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3649 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3650 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3651 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3652 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3653 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3654 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3655 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3656 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3657 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3658 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3659 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3660 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3661 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3662 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3663 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3664 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3665 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3666 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3667 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3668 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3669 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3670 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3671 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3672 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3673 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3674 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3675 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3676 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3677 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3678 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3679 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3680 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3681 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3682 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3683 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3684 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3685 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3686 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3687 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3688 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3689 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3690 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3691 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3692 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3693 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3694 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3695 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3696 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3697 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3698 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3699 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3700 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3701 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3702 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3704 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3706 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3707 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3708 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3709 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3710 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3711 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3712 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3713 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3714 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3715 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3716 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3717 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3718 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3719 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3720 when the special functions IS is enabled, not for C++17.
3721 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3723 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3724 without checks for special functions in C++17.
3725 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3729 * include/backward/hash_map: Use <> for includes not "".
3730 * include/backward/hash_set: Likewise.
3731 * include/backward/strstream: Likewise.
3732 * include/tr1/bessel_function.tcc: Likewise.
3733 * include/tr1/exp_integral.tcc: Likewise.
3734 * include/tr1/legendre_function.tcc: Likewise.
3735 * include/tr1/modified_bessel_func.tcc: Likewise.
3736 * include/tr1/riemann_zeta.tcc: Likewise.
3738 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3740 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3741 of extension allocators.
3742 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3743 Document new headers in 7.2, 8.1 and 9.1 releases.
3744 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3745 * doc/html/*: Regenerate.
3747 2019-03-12 John David Anglin <dave.anglin@bell.net>
3750 * testsuite/lib/libstdc++.exp: Locate libatomic.
3751 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3752 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3754 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3755 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3756 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3757 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3759 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3762 * configure.ac: Check for sockatmark.
3763 * crossconfig.m4: Check for sockatmark.
3764 * config.h.in: Regenerate.
3765 * configure: Regenerate.
3766 * include/experimental/internet (address_v4::_S_hton): Rename
3767 overloaded functions to _S_hton_16 and _S_ntoh_16.
3768 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3769 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3770 * include/experimental/socket (basic_socket::at_mark): Check
3771 _GLIBCXX_HAVE_SOCKATMARK.
3773 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3774 const variables instead of macros.
3777 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3778 Use correct type for len_aligned.
3779 * testsuite/20_util/hash/89629.cc: New test.
3781 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3784 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3785 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3786 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3787 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3788 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3789 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3790 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3791 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3792 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3793 memory_order_seq_cst to int.
3795 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3797 * doc/xml/manual/using.xml: Use link element instead of xref.
3798 * doc/html/*: Regenerate.
3800 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3802 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3805 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3806 parameters in deduction guides.
3807 * include/debug/multimap.h (multimap): Likewise.
3808 * include/debug/set.h (multimap): Likewise.
3809 * include/debug/multiset.h (multimap): Likewise.
3810 * include/debug/unordered_map (unordered_map): Likewise.
3811 (unordered_multimap): Likewise.
3812 * include/debug/unordered_set (unordered_set): Likewise.
3813 (unordered_multiset): Likewise.
3816 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3817 Invalidate all iterators in case of rehash.
3818 (unordered_multimap<>::_M_check_rehashed): Likewise.
3819 * include/debug/unordered_set
3820 (unordered_set<>::_M_check_rehashed): Likewise.
3821 (unordered_multiset<>::_M_check_rehashed): Likewise.
3822 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3824 2019-03-07 Andreas Schwab <schwab@suse.de>
3826 * config/abi/post/riscv64-linux-gnu: New directory.
3827 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3829 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3831 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3832 compile test to run. Fix typo.
3834 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3835 * doc/html/*: Regenerate.
3837 P0356R5 Simplified partial function application
3838 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3839 helpers for bind_front.
3840 (bind_front, __cpp_lib_bind_front): Define.
3841 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3843 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3845 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3846 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3847 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3848 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3850 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3852 PR libstdc++/86655 - std::assoc_legendre should not constrain
3853 the value of m (or x).
3854 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3855 __sph_legendre): If degree > order Don't throw, return 0.
3856 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3857 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3858 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3859 * testsuite/tr1/5_numerical_facilities/special_functions/
3860 02_assoc_legendre/pr86655.cc: New test.
3861 * testsuite/tr1/5_numerical_facilities/special_functions/
3862 22_sph_legendre/pr86655.cc: New test.
3864 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3867 Also PR libstdc++/85517
3868 * include/std/variant (__do_visit): New.
3869 (__variant_cast): Likewise.
3870 (__variant_cookie): Likewise.
3871 (__erased_*): Remove.
3872 (_Variant_storage::_S_vtable): Likewise.
3873 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3874 (_Variant_storage::__M_reset): Adjust.
3875 (__variant_construct): New.
3876 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3877 __variant_construct.
3878 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3879 (_Move_ctor_base::__M_destructive_copy): New.
3880 (_Move_ctor_base::__M_destructive_move): Adjust to use
3881 __variant_construct.
3882 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3883 (_Copy_assign_alias): Adjust to check both copy assignment
3884 and copy construction for triviality.
3885 (_Move_assign_base::operator=): Adjust to use __do_visit.
3886 (_Multi_array): Add support for visitors that accept and return
3888 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3889 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3890 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3891 a __variant_cookie temporary for a variant that is valueless and..
3892 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3893 (__gen_vtable::_Array_type): Conditionally make space for
3894 the __variant_cookie visitor case.
3895 (__variant_construct_by_index): New.
3896 (get_if): Adjust to use std::addressof.
3897 (relops): Adjust to use __do_visit.
3898 (variant): Add __variant_cast and __variant_construct_by_index
3900 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3901 instead of self-destruction.
3902 (variant::swap): Adjust to use __do_visit.
3903 (visit): Reimplement in terms of __do_visit.
3904 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3905 * testsuite/20_util/variant/compile.cc: Adjust.
3906 * testsuite/20_util/variant/run.cc: Likewise.
3908 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3910 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3912 * testsuite/experimental/feat-char8_t.cc: Likewise.
3914 * include/std/type_traits [C++20] (is_bounded_array)
3915 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3917 * testsuite/20_util/is_bounded_array/requirements/
3918 explicit_instantiation.cc: New test.
3919 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3921 * testsuite/20_util/is_bounded_array/value.cc: New test.
3922 * testsuite/20_util/is_unbounded_array/requirements/
3923 explicit_instantiation.cc: New test.
3924 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3926 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3928 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3930 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3932 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3934 * include/c_compatibility/math.h [C++20] (lerp): Add using
3936 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3937 (__lerp): Define function template to implement lerp.
3938 (lerp(float, float, float), lerp(double, double, double))
3939 (lerp(long double, long double, long double)): Define for C++20.
3940 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3941 (midpoint(T, T), midpoint(T*, T*)): Define.
3942 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3943 * testsuite/26_numerics/lerp.cc: New test.
3944 * testsuite/26_numerics/midpoint/floating.cc: New test.
3945 * testsuite/26_numerics/midpoint/integral.cc: New test.
3946 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3948 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3950 PR libstdc++/88996 Implement P0439R0
3951 Make std::memory_order a scoped enumeration.
3952 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3953 add variables for the old enumerators. Adjust calls.
3954 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3955 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3957 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3959 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3962 * include/std/memory_resource (polymorphic_allocator): Add default
3963 template argument for C++20.
3964 (polymorphic_allocator::allocate_bytes)
3965 (polymorphic_allocator::deallocate_bytes)
3966 (polymorphic_allocator::allocate_object)
3967 (polymorphic_allocator::deallocate_object)
3968 (polymorphic_allocator::new_object)
3969 (polymorphic_allocator::delete_object): New member functions for
3971 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3974 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3977 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3980 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3982 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3983 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3985 * include/std/memory (uses_allocator_construction_args): New set of
3986 overloaded functions.
3987 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3989 * include/std/memory_resource (polymorphic_allocator::construct)
3990 [__cplusplus > 201703l]: Replace all overloads with a single function
3991 using uses_allocator_construction_args.
3992 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3994 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3996 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3999 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4000 stylesheet directories before check for xsltproc. Try to use
4001 xmlcatalog to find local stylesheet directory before trying hardcoded
4002 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4003 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4004 use xsltproc if xmlcatalog fails to find a local stylesheet.
4005 * configure.ac: Check for xmlcatalog.
4006 * Makefile.in: Regenerate.
4007 * configure: Likewise.
4008 * doc/Makefile.in: Likewise.
4009 * include/Makefile.in: Likewise.
4010 * libsupc++/Makefile.in: Likewise.
4011 * po/Makefile.in: Likewise.
4012 * python/Makefile.in: Likewise.
4013 * src/Makefile.in: Likewise.
4014 * src/c++11/Makefile.in: Likewise.
4015 * src/c++17/Makefile.in: Likewise.
4016 * src/c++98/Makefile.in: Likewise.
4017 * src/filesystem/Makefile.in: Likewise.
4018 * testsuite/Makefile.in: Likewise.
4020 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4023 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4024 container deduction guides.
4025 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4026 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4027 parameters in deduction guides.
4028 * include/bits/stl_multimap.h (multimap): Likewise.
4029 * include/bits/stl_multiset.h (multiset): Likewise.
4030 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4031 * include/bits/stl_set.h (set): Likewise.
4032 * include/bits/stl_stack.h (stack): Likewise.
4033 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4034 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4035 constrain parameters in deduction guides.
4036 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4038 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4040 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4041 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4042 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4043 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4045 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4047 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4050 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4051 to class template and partial specialization using void_t.
4052 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4054 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4057 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4058 copy and move members public.
4060 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4062 * include/std/type_traits (__underlying_type_impl): New helper to
4063 make underlying_type SFINAE-friendly.
4064 (underlying_type): Derive from __underlying_type_impl.
4065 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4069 * include/bits/char_traits.h (__constant_char_array): Check index is
4070 in range before dereferencing.
4071 (char_traits<char>::compare, char_traits<char>::find)
4072 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4073 immediately if n is zero.
4074 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4075 Remove workarounds for PR 67026.
4076 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4078 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4081 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4083 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4084 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4086 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4089 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4090 type to std::size_t and argument to type to long double.
4092 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4094 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4095 * config/abi/post/sparc64-linux-gnu: New directory.
4096 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4097 * config/abi/post/sparc64-linux-gnu/32: New directory.
4098 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4100 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4102 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4103 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4106 2019-02-22 Tom Honermann <tom@honermann.net>
4108 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4109 printers for u8string and u8string_view.
4111 2019-02-22 Tom Honermann <tom@honermann.net>
4113 * testsuite/18_support/byte/ops.cc: Validate
4114 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4115 std::to_integer<char32_t>.
4116 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4117 std::numeric_limits<char8_t>.
4118 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4119 std::numeric_limits<char8_t>::lowest().
4120 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4121 std::numeric_limits<char8_t>::max_digits10.
4122 * testsuite/18_support/type_info/fundamental.cc: Validate
4123 typeinfo for char8_t.
4124 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4125 std::from_chars with char8_t.
4126 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4127 Validate explicit instantiation of std::hash<char8_t>.
4128 * testsuite/20_util/is_integral/value.cc: Validate
4129 std::is_integral<char8_t>.
4130 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4131 Validate std::make_signed<char8_t>.
4132 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4133 Validate u8string construction from char8_t sources.
4134 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4136 * testsuite/21_strings/basic_string_view/operations/compare/
4137 char/70483.cc: Validate substr operations on u8string_view.
4138 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4139 the u8string_view typedef is defined.
4140 * testsuite/21_strings/char_traits/requirements/
4141 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4143 * testsuite/21_strings/char_traits/requirements/
4144 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4145 constexpr member functions.
4146 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4147 that the u8string typedef is defined.
4148 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4149 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4150 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4151 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4153 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4154 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4156 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4157 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4158 Validate std::atomic<char8_t>::is_always_lock_free
4159 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4160 Update line numbers.
4161 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4163 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4165 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4166 Validate std::experimental::pmr::u8string.
4167 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4168 u8string_view typedef is defined.
4169 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4170 char32_t to the typelists.
4172 2019-02-22 Tom Honermann <tom@honermann.net>
4174 * include/ext/typelist.h: Constrain a partial specialization of
4175 typelist::detail::append_ to only match chain<T1,T2>.
4177 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4180 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4181 class template with class. Replace move and copy member types with
4182 member alias templates, so they are only instantiated when needed.
4183 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4184 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4185 test for C++11/14/17 as well.
4186 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4189 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4192 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4193 _GLIBCXX_PURE to the alias declaration.
4195 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4197 * testsuite/21_strings/basic_string/literals/types.cc
4198 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4199 * testsuite/21_strings/basic_string/literals/values.cc
4200 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4201 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4202 potentially having different type.
4203 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4204 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4206 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4207 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4208 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4209 string literals only using basic character set.
4210 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4211 u8 literals to char.
4212 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4213 Test ATOMIC_CHAR8_T_LOCK_FREE.
4214 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4215 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4216 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4217 * testsuite/experimental/string_view/literals/types.cc
4218 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4220 * testsuite/experimental/string_view/literals/values.cc
4221 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4223 2019-02-19 Tom Honermann <tom@honermann.net>
4225 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4226 from char16_32_t.cc; validates numeric_limits<char8_t>.
4227 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4228 test cloned from types.cc; validates operator""s for char8_t
4230 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4231 test cloned from values.cc; validates construction and comparison
4233 * testsuite/21_strings/basic_string/requirements/
4234 /explicit_instantiation/char8_t/1.cc: New test cloned from
4235 char16_t/1.cc; validates explicit instantiation of
4236 basic_string<char8_t>.
4237 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4238 New test cloned from types.cc; validates operator""sv for char8_t
4239 returns u8string_view.
4240 * testsuite/21_strings/basic_string_view/literals/
4241 values-char8_t.cc: New test cloned from values.cc; validates
4242 construction and comparison of u8string_view values.
4243 * testsuite/21_strings/basic_string_view/requirements/
4244 explicit_instantiation/char8_t/1.cc: New test cloned from
4245 char16_t/1.cc; validates explicit instantiation of
4246 basic_string_view<char8_t>.
4247 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4248 New test cloned from char16_t/65049.cc; validates that
4249 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4250 * testsuite/21_strings/char_traits/requirements/char8_t/
4251 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4252 that char_traits<char8_t> member typedefs are present and correct.
4253 * testsuite/21_strings/char_traits/requirements/
4254 explicit_instantiation/char8_t/1.cc: New test cloned from
4255 char16_t/1.cc; validates explicit instantiation of
4256 char_traits<char8_t>.
4257 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4258 from char16_t.cc: validates
4259 codecvt<char16_t, char8_t, mbstate_t>.
4260 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4261 from char32_t.cc: validates
4262 codecvt<char32_t, char8_t, mbstate_t>.
4263 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4264 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4265 codecvt<char32_t, char8_t, std::mbstate_t>.
4266 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4267 test cloned from string.cc; validates filesystem::path construction
4269 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4270 the __cpp_lib_char8_t feature test macro is defined with the
4272 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4273 New test cloned from string.cc; validates filesystem::path
4274 construction from char8_t input.
4275 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4276 test cloned from types.cc; validates operator""sv for char8_t
4277 returns u8string_view.
4278 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4279 New test cloned from values.cc; validates construction and
4280 comparison of u8string_view values.
4281 * testsuite/experimental/string_view/requirements/
4282 explicit_instantiation/char8_t/1.cc: New test cloned from
4283 char16_t/1.cc; validates explicit instantiation of
4284 basic_string_view<char8_t>.
4285 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4286 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4289 2019-02-19 Tom Honermann <tom@honermann.net>
4291 P0482R5 char8_t: Standard library support
4292 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4293 typeinfo symbols for char8_t.
4294 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4295 (GLIBCXX_3.4.26): Add symbols for specializations of
4296 numeric_limits and codecvt that involve char8_t.
4297 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4298 * include/bits/atomic_base.h: Add atomic_char8_t.
4299 * include/bits/basic_string.h: Add std::hash<u8string> and
4300 operator""s(const char8_t*, size_t).
4301 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4303 * include/bits/char_traits.h: Add char_traits<char8_t>.
4304 * include/bits/codecvt.h: Add
4305 codecvt<char16_t, char8_t, mbstate_t>,
4306 codecvt<char32_t, char8_t, mbstate_t>,
4307 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4308 codecvt_byname<char32_t, char8_t, mbstate_t>.
4309 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4310 recognize char8_t as an integral type.
4311 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4313 (path::u8string): Return std::u8string when char8_t support is
4315 (path::generic_u8string): Likewise.
4316 (path::_S_convert): Handle conversion from char8_t input.
4317 (path::_S_str_convert): Likewise.
4318 * include/bits/functional_hash.h: Add hash<char8_t>.
4319 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4321 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4322 for new char8_t specializations.
4323 * include/bits/localefwd.h: Add missing declarations of
4324 codecvt<char16_t, char, mbstate_t> and
4325 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4326 codecvt<char16_t, char8_t, mbstate_t> and
4327 codecvt<char32_t, char8_t, mbstate_t>.
4328 * include/bits/postypes.h: Add u8streampos
4329 * include/bits/stringfwd.h: Add declarations of
4330 char_traits<char8_t> and u8string.
4331 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4332 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4334 (path::u8string): Return std::u8string when char8_t support is
4336 (path::generic_u8string): Likewise.
4337 (path::_S_convert): Handle conversion from char8_t input.
4338 (path::_S_str_convert): Likewise.
4339 * include/experimental/string: Add u8string.
4340 * include/experimental/string_view: Add u8string_view,
4341 hash<experimental::u8string_view>, and
4342 operator""sv(const char8_t*, size_t).
4343 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4344 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4345 as a character type.
4346 * include/std/limits: Add numeric_limits<char8_t>.
4347 * include/std/string_view: Add u8string_view,
4348 hash<experimental::u8string_view>, and
4349 operator""sv(const char8_t*, size_t).
4350 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4351 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4352 * libsupc++/atomic_lockfree_defines.h: Define
4353 ATOMIC_CHAR8_T_LOCK_FREE.
4354 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4355 codecvt.cc and limits.cc so that char8_t specializations of
4356 numeric_limits and codecvt and emitted.
4357 * src/c++11/Makefile.in: Likewise.
4358 * src/c++11/codecvt.cc: Define members of
4359 codecvt<char16_t, char8_t, mbstate_t>,
4360 codecvt<char32_t, char8_t, mbstate_t>,
4361 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4362 codecvt_byname<char32_t, char8_t, mbstate_t>.
4363 * src/c++11/limits.cc: Define members of
4364 numeric_limits<char8_t>.
4365 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4366 locale_init.cc and localename.cc.
4367 * src/c++98/Makefile.in: Likewise.
4368 * src/c++98/locale_init.cc: Add initialization for the
4369 codecvt<char16_t, char8_t, mbstate_t> and
4370 codecvt<char32_t, char8_t, mbstate_t> facets.
4371 * src/c++98/localename.cc: Likewise.
4372 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4374 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4376 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4377 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4378 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4380 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4382 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4383 * doc/html/*: Regenerate.
4385 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4386 * doc/html/*: Regenerate.
4388 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4389 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4390 allocator type in is_constructible checks.
4391 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4392 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4393 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4394 problematic type from LWG 2586 discussion.
4395 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4396 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4398 * configure.ac: Check for C11 timespec_get function.
4399 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4401 * config.h.in: Regenerate.
4402 * configure: Regenerate.
4403 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4404 std for C++17 and up.
4406 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4407 * include/bits/stl_queue.h
4408 (priority_queue(const Compare&, const Container&, const Alloc&))
4409 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4411 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4413 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4414 * include/bits/stl_queue.h (queue, priority_queue): Add static
4415 assertions to enforce LWG 2566 requirement on value_type.
4416 * include/bits/stl_stack.h (stack): Likewise.
4419 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4421 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4422 * include/bits/std_abs.h: Add comment about LWG 2735.
4423 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4425 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4428 * include/std/version [__cpp_impl_destroying_delete]
4429 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4430 * libsupc++/new [__cpp_impl_destroying_delete]
4431 (__cpp_lib_destroying_delete): Likewise.
4432 (destroying_delete_t, destroying_delete): Likewise, but define even
4433 when __cpp_impl_destroying_delete is not defined.
4434 * testsuite/18_support/destroying_delete.cc: New test.
4436 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4439 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4440 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4441 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4442 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4444 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4447 * include/bits/fs_path.h (path::has_root_name)
4448 (path::has_root_directory, path::has_root_path)
4449 (path::has_relative_path, path::has_parent_path)
4450 (path::has_filename, path::has_stem, path::has_extension)
4451 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4453 * src/c++17/fs_path.cc (path::has_root_name)
4454 (path::has_root_directory, path::has_root_path)
4455 (path::has_relative_path, path::has_parent_path)
4456 (path::has_filename, path::_M_find_extension): Add noexcept.
4458 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4460 PR libstdc++/89102 (partial)
4461 * include/std/type_traits (common_type<>): Define.
4462 (common_type<T>): Derive from common_type<T, T>.
4463 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4464 Test zero-length template argument list.
4465 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4466 Test additional single argument cases.
4467 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4468 Adjust expected error.
4470 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4473 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4475 * include/bits/stl_stack.h (stack): Likewise.
4476 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4477 * testsuite/23_containers/queue/deduction.cc: New test.
4478 * testsuite/23_containers/stack/deduction.cc: New test.
4481 * include/std/type_traits (__is_convertible_helper)
4482 (__is_convertible_helper<_From, _To, false>): Revert changes to
4483 support is_nothrow_convertible.
4484 (__is_nt_convertible_helper): New helper.
4485 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4487 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4488 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4491 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4492 __is_alloc_insertable_impl. Replace single type member with two
4493 members, one for each of copy and move insertable.
4494 (__is_move_insertable): New trait for internal use.
4495 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4496 (vector::_S_nothrow_relocate(true_type)): New functions to
4497 conditionally check if __relocate_a can throw.
4498 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4499 on __is_move_insertable.
4500 (vector::_S_do_relocate): New overloaded functions to conditionally
4502 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4503 based on _S_use_relocate.
4504 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4505 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4506 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4509 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4510 parameter unnamed. Add message to static assertion.
4511 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4512 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4515 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4518 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4520 (__is_bitwise_relocatable): ... to this.
4521 (__relocate_a_1): Adapt.
4522 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4523 (__is_bitwise_relocatable): ... to this.
4525 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4528 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4529 final component as well as from _M_pathname. Append the dot using
4530 operator+= instead of only to _M_pathname.
4531 (path::_M_find_extension): Reformat slightly.
4532 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4533 Add more test cases.
4535 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4537 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4539 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4541 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4542 constexpr specifiers from arg and proj.
4544 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4545 __shared_ptr instantiations used by gcc4-compatible ABI.
4547 * include/experimental/forward_list (experimental::erase): Qualify
4549 * include/experimental/list (experimental::erase): Likewise.
4550 * include/std/forward_list (std::erase): Likewise.
4551 * include/std/list (std::erase): Likewise.
4553 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4555 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4556 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4557 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4558 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4559 * testsuite/ext/array_allocator/26875.cc: Likewise.
4560 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4561 * testsuite/util/replacement_memory_operators.h: Likewise.
4562 * testsuite/util/testsuite_allocator.h: Likewise.
4564 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4565 normal mode vector, even for debug mode.
4566 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4567 Define alias template for normal mode vector.
4569 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4572 * config/locale/generic/c_locale.h (__convert_from_v)
4573 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4574 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4575 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4576 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4578 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4581 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4582 data member with static member function _S_use_relocate().
4583 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4584 (vector::_M_default_append): Use _S_use_relocate() instead of
4587 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4590 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4593 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4594 write to stderr instead of using printf.
4596 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4599 * include/bits/char_traits.h (__constant_string_p,
4600 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4603 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4605 Implement C++20 P0600r1.
4606 * include/backward/hash_map: Add nodiscard attribute to empty.
4607 * include/backward/hash_set: Likewise.
4608 * backward/hashtable.h: Likewise.
4609 * include/bits/basic_string.h: Likewise.
4610 * include/bits/forward_list.h: Likewise.
4611 * include/bits/hashtable.h: Likewise.
4612 * include/bits/regex.h: Likewise.
4613 * include/bits/stl_deque.h: Likewise.
4614 * include/bits/stl_list.h: Likewise.
4615 * include/bits/stl_map.h: Likewise.
4616 * include/bits/stl_multimap.h: Likewise.
4617 * include/bits/stl_multiset.h: Likewise.
4618 * include/bits/stl_queue.h: Likewise.
4619 * include/bits/stl_set.h: Likewise.
4620 * include/bits/stl_stack.h: Likewise.
4621 * include/bits/stl_tree.h: Likewise.
4622 * include/bits/stl_vector.h: Likewise.
4623 * include/bits/unordered_map.h: Likewise.
4624 * include/bits/unordered_set.h: Likewise.
4625 * include/debug/array: Likewise.
4626 * include/experimental/any: Likewise.
4627 * include/experimental/bits/fs_path.h: Likewise.
4628 * include/experimental/internet: Likewise.
4629 * include/experimental/string_view: Likewise.
4630 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4632 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4634 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4636 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4638 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4640 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4642 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4644 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4646 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4647 info_fn_imps.hpp: Likewise.
4648 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4649 left_child_next_sibling_heap_.hpp: Likewise.
4650 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4652 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4654 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4656 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4658 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4660 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4662 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4664 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4665 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4666 * include/ext/rope: Likewise.
4667 * include/ext/slist: Likewise.
4668 * include/ext/vstring.h: Likewise.
4669 * include/profile/array: Likewise.
4670 * include/std/array: Likewise.
4671 * include/tr1/array: Likewise.
4672 * include/tr1/hashtable.h: Likewise.
4673 * include/tr1/regex: Likewise.
4674 * include/tr2/dynamic_bitset: Likewise.
4675 * include/bits/alloc_traits.h: Add nodiscard attribute to
4677 * include/experimental/memory_resource: Likewise.
4678 * include/ext/alloc_traits.h: Likewise.
4679 * include/ext/array_allocator.h: Likewise.
4680 * include/ext/bitmap_allocator.h: Likewise.
4681 * include/ext/debug_allocator.h: Likewise.
4682 * include/ext/extptr_allocator.h: Likewise.
4683 * include/ext/mt_allocator.h: Likewise.
4684 * include/ext/new_allocator.h: Likewise.
4685 * include/ext/pool_allocator.h: Likewise.
4686 * include/ext/throw_allocator.h: Likewise.
4687 * include/std/scoped_allocator: Likewise.
4688 * libsupc++/eh_alloc.cc: Likewise.
4689 * include/std/future: Add nodiscard attribute to async.
4690 * libsupc++/new: Add nodiscard attribute to new.
4692 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4697 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4698 * include/bits/shared_ptr.h
4699 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4700 (allocate_shared): Change to use new tag type.
4701 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4702 Declare new member function.
4703 (_Sp_alloc_shared_tag): Define new type.
4704 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4705 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4706 _Sp_make_shared_tag::_S_eq to check type_info.
4707 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4708 Constrain to prevent being called with _Sp_alloc_shared_tag.
4709 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4710 Replace constructor with ...
4711 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4712 reference parameter so address of the new object can be returned to
4713 the caller. Obtain the allocator from the tag type.
4714 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4715 constructor with ...
4716 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4717 to the __shared_count constructor.
4718 (__allocate_shared): Change to use new tag type.
4719 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4721 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4723 * src/c++17/fs_ops.cc
4724 (equivalent(const path&, const path&, error_code&))
4725 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4726 compare files instead of relying on incomplete info returned by stat.
4729 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4730 if the path is already absolute.
4731 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4732 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4735 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4736 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4737 of filesystem::exists.
4738 (create_directories(const path&, error_code&)): Add assertions.
4739 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4740 Add workaround for bug in _wstat for paths with trailing slash.
4741 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4742 for expected behaviour on mingw.
4743 * testsuite/experimental/filesystem/operations/create_directories.cc:
4745 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4746 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4747 not test permissions on mingw targets.
4749 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4751 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4752 constructors and open members taking wide strings. Fix patterns for
4753 filesystem::path members to match wstring_view parameters. Add
4754 exports for shared_ptr members used by directory iterators.
4755 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4756 error code parameter if the file doesn't exist.
4757 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4759 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4760 values for mingw targets, where "/" is not an absolute path. Do not
4761 test symlinks on mingw targets.
4762 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4763 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4765 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4766 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4767 that each component of the path is created.
4768 * testsuite/experimental/filesystem/operations/create_directories.cc:
4770 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4771 permissions on mingw targets.
4772 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4773 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4774 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4775 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4777 * testsuite/experimental/filesystem/operations/permissions.cc:
4779 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4780 symlinks or permissions on mingw targets.
4781 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4782 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4783 symlinks on mingw targets.
4784 * testsuite/experimental/filesystem/operations/remove_all.cc:
4786 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4787 permissions on mingw targets.
4788 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4789 test symlinks on mingw targets.
4790 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4793 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4796 Warn about unused comparisons of shared_ptr/unique_ptr
4797 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4798 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4799 <, <=, >, >= for shared_ptr.
4800 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4802 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4804 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4805 as 201611L, because P0497R0 changes are supported.
4806 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4808 * include/bits/erase_if.h [__cplusplus > 201703L]
4809 (__cpp_lib_erase_if): Only define for C++2a.
4810 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4811 (__cpp_lib_null_iterators): Define.
4812 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4813 (__cpp_lib_null_iterators): Define.
4814 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4816 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4818 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4820 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4821 changes are supported.
4822 * include/std/optional (__cpp_lib_optional): Likewise.
4823 * include/std/variant (__cpp_lib_variant): Likewise.
4824 * include/std/version [!__STRICT_ANSI__]
4825 (__cpp_lib_uncaught_exceptions): Define as long integer.
4826 [__cplusplus >= 201703L] (__cpp_lib_any)
4827 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4828 (__cpp_lib_variant): Define for C++17.
4829 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4831 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4834 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4836 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4840 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4842 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4845 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4847 * doc/xml/manual/intro.xml: Include new section.
4848 * doc/xml/manual/status_cxx2017.xml: Document more
4849 implementation-defined properties of the library.
4850 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4851 * doc/html/*: Regenerate.
4853 * include/bits/refwrap.h [__cplusplus > 201703L]
4854 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4855 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4856 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4858 (reference_wrapper::operator()): Add static assertion.
4859 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4861 * include/std/chrono (duration_values::zero(), duration_values::min())
4862 (duration_values::max()): Add noexcept.
4863 (duration::zero(), duration::min(), duration::max()): Likewise.
4864 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4865 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4866 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4868 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4870 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4872 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4873 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4875 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4878 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4879 specialization for C++17 (P0513R0, LWG 2817).
4880 * testsuite/20_util/hash/nullptr.cc: New test.
4883 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4884 pattern for std::basic_stringbuf::str().
4886 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4887 basic_ostream::operator<< patterns.
4889 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4891 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4892 test failures on targets with 32-bit time_t.
4894 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4895 * include/std/deque: Likewise.
4896 * include/std/forward_list: Likewise.
4897 * include/std/list: Likewise.
4898 * include/std/string: Likewise.
4899 * include/std/vector: Likewise.
4900 * include/std/version: Likewise.
4901 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4902 * testsuite/23_containers/deque/erasure.cc: Likewise.
4903 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4904 * testsuite/23_containers/list/erasure.cc: Likewise.
4905 * testsuite/23_containers/map/erasure.cc: Likewise.
4906 * testsuite/23_containers/set/erasure.cc: Likewise.
4907 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4908 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4909 * testsuite/23_containers/vector/erasure.cc: Likewise.
4911 * include/experimental/internet [AI_NUMERICSERV]
4912 (resolver_base::numeric_service): Define conditionally.
4913 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4915 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4918 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4919 Jonathan Wakely <jwakely@redhat.com>
4922 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4923 (GLIBCXX_3.4.26): Add new exports.
4924 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4925 correct list of sources.
4926 * include/Makefile.in: Regenerate.
4927 * include/std/ostream (operator<<(nullptr_t)): New member function.
4928 * src/c++17/ostream-inst.cc: New file.
4929 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4932 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4934 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4935 of the source file containing the caller.
4936 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4937 directories created by test.
4938 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4940 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4942 * testsuite/experimental/filesystem/iterators/
4943 recursive_directory_iterator.cc: Likewise.
4945 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4947 PR tree-optimization/88775
4948 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4949 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4950 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4951 instead of __builtin_constant_p if available. Don't bother with
4952 the pointer comparison in C++11 and earlier.
4954 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4958 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4961 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4963 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4964 for filesystem::path. Give variables more distinctive names.
4966 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4967 member function to perform non-trivial assignment.
4968 (_Optional_payload_base::_M_move_assign): Likewise.
4969 (_Optional_payload<T, true, false, true>::operator=)
4970 (_Optional_payload<T, true, true, false>::operator=)
4971 (_Optional_payload<T, true, false, false>::operator=): Call
4972 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4975 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4976 test std::complex<long double> if long double format is IBM128.
4977 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4980 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4982 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4983 for old std::unique_ptr layout.
4984 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4985 to become valueless. Add filesystem::path tests.
4988 * include/std/optional (_Optional_payload_base): New class template
4989 for common code hoisted from _Optional_payload specializations. Use
4990 a template for the union, to allow a partial specialization for
4991 types with non-trivial destructors. Add constructors for in-place
4992 initialization to the union.
4993 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4994 to perform non-trivial copy construction, instead of relying on
4995 non-standard copy elision in a delegating constructor.
4996 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4997 non-trivial move construction.
4998 (_Optional_payload): Derive from _Optional_payload_base and use it
4999 for everything except the non-trivial assignment operators, which are
5001 (_Optional_payload<false, C, M>): Derive from the specialization
5002 _Optional_payload<true, false, false> and add a destructor.
5003 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5004 Forward to corresponding members of _Optional_payload.
5005 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5006 Hoist common members from _Optional_base.
5007 (_Optional_base): Make all members and base class public.
5008 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5009 _Optional_base_impl.
5010 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5011 support for new std::optional layout.
5012 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5015 * include/bits/locale_conv.h: Use <> for includes not "".
5016 * include/ext/random: Likewise.
5017 * include/ext/vstring.h: Likewise.
5019 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5021 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5022 (GLIBCXX_3.4.21): Likewise.
5024 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5027 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5028 to match the one that controls whether utimbuf and utime are declared.
5030 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5033 * include/bits/char_traits.h (char_traits::move): Do not pass null
5034 pointers to memmove.
5035 * include/bits/locale_facets.h
5036 (ctype<char>::widen(const char*, const char*, char*)): Do not
5037 pass null pointers to memcpy.
5038 (ctype<char>::narrow(const char*, const char*, char, char*)):
5040 (ctype<char>::do_widen(const char*, const char*, char*)):
5042 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5045 * doc/xml/manual/spine.xml: Update copyright years.
5046 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5047 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5048 for C++17 filesystem library.
5049 * doc/html/*: Regenerate.
5051 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5052 * config.h.in: Regenerate.
5053 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5054 alphabetically and add missing entries for copy_symlink,
5055 hard_link_count, rename, and resize_file.
5056 * configure: Regenerate.
5057 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5058 used unconditionally.
5059 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5060 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5061 supports truncating to zero length.
5062 * testsuite/27_io/filesystem/operations/all.cc: New test.
5063 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5065 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5068 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5069 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5070 * config.h.in: Regenerate.
5071 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5072 remaining std::filesystem types and functions.
5073 * configure: Regenerate.
5074 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5075 * src/c++17/Makefile.in: Regenerate.
5076 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5077 here, and change name of included file.
5078 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5079 here, and change name of included file.
5080 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5081 path to dir-common.h.
5082 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5083 path to ops-common.h. Disable -Wunused-parameter warnings.
5084 (internal_file_clock): Define unconditionally.
5085 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5087 (do_copy_file, do_space): Move definitions to ops.common.h.
5088 (copy, file_size, hard_link_count, last_write_time, space): Only
5089 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5091 (last_write_time, read_symlink): Remove unused attributes from
5093 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5094 * src/filesystem/Makefile.in: Regenerate.
5095 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5096 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5097 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5098 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5099 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5100 dummy types and functions instead of using #error.
5101 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5102 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5104 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5105 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5106 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5107 to account for new namespace.
5108 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5109 -lstdc++fs from dg-options.
5110 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5111 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5112 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5113 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5114 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5116 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5117 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5119 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5120 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5121 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5122 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5123 * testsuite/27_io/filesystem/operations/create_directories.cc:
5125 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5126 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5127 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5128 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5129 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5130 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5131 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5132 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5133 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5134 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5135 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5136 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5137 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5138 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5139 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5140 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5141 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5142 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5144 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5148 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5149 typeinfo and vtables less greedy.
5150 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5151 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5152 * src/c++17/Makefile.in: Regenerate.
5153 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5154 here, and change name of included file.
5155 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5156 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5158 * src/filesystem/Makefile.in: Regenerate.
5159 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5160 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5161 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5162 from dg-options and remove dg-require-filesystem-ts.
5163 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5164 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5165 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5166 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5167 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5168 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5169 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5170 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5171 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5172 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5173 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5174 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5175 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5176 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5177 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5178 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5179 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5180 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5181 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5182 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5183 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5185 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5186 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5187 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5188 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5189 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5190 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5191 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5192 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5193 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5194 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5195 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5196 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5198 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5200 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5202 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5204 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5205 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5206 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5207 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5208 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5209 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5210 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5211 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5212 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5213 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5215 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5216 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5217 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5218 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5219 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5222 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5223 Check is_trivially_copyable instead of is_scalar.
5224 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5225 contained value can throw and its type is trivially copyable then
5226 construct into a temporary variant and move from it, to provide the
5227 strong exception safety guarantee.
5228 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5230 * testsuite/20_util/variant/87431.cc: New test.
5231 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5232 conversion causes valueless state.
5235 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5236 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5237 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5238 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5239 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5241 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5243 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5244 (file_time_type): Redefine in terms of __file_clock.
5245 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5247 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5249 (internal_file_lock): New helper type for accessing __file_clock.
5250 (do_copy_file): Use internal_file_lock to convert system time to
5252 (last_write_time(const path&, error_code&)): Likewise.
5253 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5255 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5257 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5258 for const member functions of std::basic_string.
5259 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5261 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5262 Make non-standard constructor private.
5263 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5265 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5266 explicit instantiations for C++17 as well as earlier dialects.
5267 * src/c++17/Makefile.am: Add new source files.
5268 * src/c++17/Makefile.in: Regenerate.
5269 * src/c++17/cow-string-inst.cc: New file defining explicit
5270 instantiations for basic_string member functions added in C++17.
5271 * src/c++17/string-inst.cc: Likewise.
5273 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5274 copy/move constructors for old std::basic_string.
5275 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5276 (basic_string::reference, basic_string::const_reference): Define
5277 as plain references for C++11 and later.
5278 (basic_string::basic_string()): Put constructor body outside
5279 preprocessor conditional groups.
5280 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5281 instead of copying it.
5282 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5284 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5286 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5287 cases for old basic_string.
5288 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5289 allocator-extended constructors unconditionally. Add extra members to
5290 allocator type when using old string ABI.
5291 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5293 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5295 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5296 -fno-inline added to test flags.
5298 * testsuite/21_strings/basic_string/requirements/
5299 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5301 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5302 assertion failures with old std::string ABI.
5304 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5306 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5307 functions that will only erase elements at the end.
5308 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5309 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5310 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5312 (path::_List::pop_back()): Define.
5313 (path::_List::_M_erase_from(const_iterator)): Define.
5314 (path::operator/=(const path&)): Use pop_back to remove last component
5315 and _M_erase_from to remove multiple components.
5316 (path::_M_append(basic_string_view<value_type>)): Likewise.
5317 (path::operator+=(const path&)): Likewise.
5318 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5319 (path::remove_filename()): Likewise.
5320 (path::lexically_normal()): Use _List::_Impl iterators instead of
5321 path::iterator. Use pop_back to remove components from the end. Clear
5322 trailing filename, instead of using erase(const_iterator) to remove
5323 a non-final component.
5324 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5326 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5328 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5329 incorrect treatment of empty filename after trailing slash.
5330 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5332 * testsuite/21_strings/basic_string/modifiers/assign/char/
5333 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5335 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5336 move_assign_optim.cc: Likewise.
5338 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5339 Jakub Jelinek <jakub@redhat.com>
5342 * include/experimental/memory: Replace UTF-8 quote characters.
5343 * include/std/future: Replace UTF-8 "em dash" characters.
5345 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5348 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5349 * include/debug/forward_list: Likewise.
5350 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5352 * include/experimental/chrono: Likewise.
5353 * include/experimental/functional: Likewise.
5354 * include/experimental/ratio: Likewise.
5355 * include/experimental/system_error: Likewise.
5356 * include/experimental/tuple: Likewise.
5357 * include/experimental/type_traits: Likewise.
5358 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5359 * include/parallel/multiseq_selection.h: Likewise.
5362 * config/abi/pre/gnu.ver: Add missing exports.
5363 * testsuite/22_locale/collate_byname/88681.cc: New test.
5364 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5365 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5367 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5369 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5370 initializer_list<value_type> and from input iterator ranges.
5371 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5373 * testsuite/experimental/string_view/element_access/char/empty.cc:
5374 Fix year range in copyright header.
5376 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5378 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5379 Fix year range in copyright header.
5381 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5383 Update copyright years.
5385 Copyright (C) 2019 Free Software Foundation, Inc.
5387 Copying and distribution of this file, with or without modification,
5388 are permitted in any medium without royalty provided the copyright
5389 notice and this notice are preserved.