1 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
4 non-template overloads for each signed and unsigned integer type and
5 char. Define deleted overload for bool (LWG 3266).
6 * testsuite/20_util/to_chars/1_neg.cc: Remove.
7 * testsuite/20_util/to_chars/3.cc: New test.
8 * testsuite/20_util/to_chars/lwg3266.cc: New test.
10 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
12 * acinclude.m4: Handle uclinux*.
13 * configure: Regenerate.
14 * configure.host: Handle uclinux*
16 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
17 Mickaël Guêné <mickael.guene@st.com>
19 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
22 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
25 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
26 0ul being a valid null pointer constant.
28 * include/std/type_traits (__remove_cv_t): New alias template.
29 (is_void, is_integral, is_floating_point, is_pointer)
30 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
31 (is_member_point), __is_signed_integer, __is_unsigned_integer)
32 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
33 (__decay_selector): Use __remove_cv_t.
34 (remove_cv): Add partial specializations for cv-qualified types.
35 (__decay_t): New alias template.
36 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
38 (__enable_if_t): Move earlier in the file.
39 (_Require): Use __enable_if_t.
40 (swap(T&, T&)): Use _Require.
41 (swap(T(&)[N])): Use __enable_if_t.
43 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
45 Implement C++20 p1424 - 'constexpr' feature macro concerns,
46 Issue 3256 - Feature testing macro for constexpr algorithms,
47 and Issue 3257 - Missing feature testing macro update from P0858.
48 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
49 * include/bits/algorithmfwd.h: Ditto.
50 * include/std/utility: Ditto.
51 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
52 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
53 __cpp_lib_constexpr macro in <algorith>.
54 * testsuite/20_util/exchange/constexpr.cc: Add check for
55 __cpp_lib_constexpr macro in <utility>.
56 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
57 __cpp_lib_constexpr_algorithms.
58 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
59 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
60 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
61 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
62 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
63 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
64 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
65 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
66 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
67 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
68 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
69 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
70 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
71 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
72 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
73 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
74 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
75 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
76 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
77 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
78 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
79 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
80 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
81 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
82 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
83 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
84 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
85 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
86 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
87 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
88 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
89 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
90 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
91 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
92 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
93 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
94 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
95 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
96 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
97 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
98 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
99 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
100 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
101 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
102 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
103 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
104 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
105 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
106 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
107 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
108 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
109 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
110 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
112 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
114 Update docs for recent <span> and constexpr lib changes.
115 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
116 p1023r0, p1085r2 status.
117 * doc/html/manual/status.html: Regenerate.
119 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
121 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
122 final offsets with constants.
124 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
126 * include/bits/range_access.h (__adl_to_address): Remove.
127 * include/std/span (__is_base_derived_safe_convertible_v): Replace
128 with span::__is_compatible.
129 (__is_std_array_v): Replace with __is_std_array class template and
130 partial specializations.
131 (__is_std_array, __is_std_span): New class templates and partial
133 (span::__is_compatible): New alias template for SFINAE constraints.
134 (span::span(element_type (&)[N])): Remove redundant constraints. Do
135 not use __adl_data to obtain a pointer.
136 (span::span(array<value_type, N>&)): Likewise.
137 (span::span(const array<value_type, N>&)): Likewise.
138 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
139 (span::iter_value_t, span::derived_from): New alias templates for
140 SFINAE constraints, until the equivalents are supported in <concepts>
142 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
143 for SFINAE constraints.
144 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
146 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
147 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
148 Use std::to_address instead of __adl_to_address.
149 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
150 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
151 template for SFINAE constraints.
152 [!_GLIBCXX_P1394] (span::span(Container&))
153 (span::span(const Container&)): Improve constraints.
154 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
155 (span::span(pointer, pointer)): Remove redundant cast of pointer.
156 (span(const span<OType, OExtent>&)): New constructor.
158 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
160 * include/bits/range_access.h (ssize): Define for C++20.
161 * testsuite/24_iterators/range_access_cpp20.cc: New test.
162 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
163 * doc/html/*: Regenerate.
165 2019-09-06 Florian Weimer <fweimer@redhat.com>
167 * configure: Regenerate.
169 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
171 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
172 P1024R3. Remove entry for P0920R2.
173 * include/std/span (__cpp_lib_span): Change value.
174 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
176 (span): Replace __extent_storage base class with data member.
177 (span::_S_subspan_extent): New function.
178 (span::empty()): Add nodiscard attribute.
179 (span::front, span::back, span::operator[]): Check preconditions.
180 (span::first, span::last, span::subspan): Add noexcept. Improve
181 precondition checks (LWG 3103).
182 (get): Remove redundant condition from static_assert.
183 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
184 (as_writable_bytes): Add inline specifier.
185 * include/std/version (__cpp_lib_span): Change value.
186 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
187 * testsuite/23_containers/span/front_neg.cc: Likewise.
188 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
189 * testsuite/23_containers/span/last_neg.cc: Improve test.
190 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
191 * testsuite/23_containers/span/1.cc: New test.
192 * testsuite/23_containers/span/2.cc: New test.
193 * testsuite/23_containers/span/back_assert_neg.cc: New test.
194 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
195 * testsuite/23_containers/span/first_assert_neg.cc: New test.
196 * testsuite/23_containers/span/first_neg.cc: New test.
197 * testsuite/23_containers/span/front_assert_neg.cc: New test.
198 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
199 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
200 * testsuite/23_containers/span/last_assert_neg.cc: New test.
201 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
202 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
203 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
204 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
205 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
206 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
208 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
210 * include/Makefile.am: Add <span> header.
211 * include/Makefile.in: Regenerate.
212 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
213 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
214 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
215 New functions for performing argument-dependent lookup of range
216 customization points.
217 * include/bits/stl_iterator.h (__normal_iterator): Add
218 _GLIBCXX20_CONSTEXPR to all functions.
219 * include/std/span: New header.
220 * include/std/version (__cpp_lib_span): Define feature test macro.
221 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
222 * testsuite/23_containers/span/everything.cc: New test.
223 * testsuite/23_containers/span/get_neg.cc: New test.
224 * testsuite/23_containers/span/last_neg.cc: New test.
225 * testsuite/23_containers/span/subspan_neg.cc: New test.
226 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
227 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
228 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
230 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
232 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
233 * doc/html/*: Regenerate.
235 2019-09-04 Mike Crowe <mac@mcrowe.com>
238 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
239 pthread_cond_clockwait function.
240 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
241 * configure: Regenerate.
242 * config.h.in: Regenerate.
243 * include/std/condition_variable: (condition_variable): Rename
244 __steady_clock_t typedef and add system_clock. Change __clock_t to be
245 a typedef for the preferred clock to convert arbitrary other clocks to.
246 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
248 (wait_until): Change __clock_t overload to use system_clock.
249 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
250 steady_clock overload that calls pthread_cond_clockwait.
251 (__wait_until_impl): Change __clock_t overload to use system_clock.
252 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
253 steady_clock for __clock_t if pthread_cond_clockwait is available.
255 2019-09-04 Mike Crowe <mac@mcrowe.com>
257 * testsuite/30_threads/condition_variable/members/2.cc (test01):
258 Parameterise so that test can be run against an arbitrary clock.
259 (main): Test using std::chrono::steady_clock and a user-defined
260 clock in addition to the previous std::chrono::system_clock.
261 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
263 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
265 * crossconfig.m4: Remove references to spu.
266 * configure: Regenerate.
267 * doc/xml/manual/appendix_contributing.xml: Remove references
268 to __ea as "badword" for spu.
269 * doc/html/manual/source_code_style.html: Regenerate.
270 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
271 to avoid __ea (as "badword" for spu).
272 (__ellint_rj): Likewise.
274 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
277 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
278 scanning to conform to the GNU Coding Standards.
279 * configure: Regenerate.
281 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
283 * src/c++17/memory_resource.cc: Use __constinit keyword.
285 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
287 * doc/xml/manual/abi.xml: Document 9.x library versions.
288 * doc/html/*: Regenerate.
290 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
292 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
293 (__detail::__to_chars_8_len): Remove.
294 (__detail::__to_chars_8): Inline length calculation here.
295 (__detail::__from_chars_binary): Use numeric_limits instead of
298 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
300 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
301 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
302 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
303 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
306 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
308 * testsuite_files/util/testsuite_performance.h
309 (resource_counter::start): Ignore unused malloc(0) result.
311 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
313 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
314 Model Object Technologies): Adjust name and link.
316 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
318 * include/std/charconv (__detail::__to_chars_8)
319 __detail::__to_chars_16): Replace array of precomputed digits with
320 arithmetic operations to avoid CPU cache misses. Remove zero
321 termination from array of digits to allow symbol merge with generic
322 implementation of __detail::__to_chars. Replace final offsets with
323 constants. Use __detail::__to_chars_len_2 instead of a generic
324 __detail::__to_chars_len.
325 (__detail::__to_chars): Remove zero termination from array of digits.
326 (__detail::__to_chars_2): Leading digit is always '1'.
328 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
330 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
332 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
334 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
336 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
339 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
340 to template parameters.
341 * include/bits/stl_uninitialized.h (uninitialized_copy)
342 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
343 diagnose invalid uses.
344 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
345 Adjust expected error.
346 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
348 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
350 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
352 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
354 * testsuite/23_containers/vector/cons/89164.cc: New test.
355 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
357 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
360 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
361 * configure: Regenerate.
362 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
364 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
366 * testsuite/util/testsuite_abi.cc: Add new symbol version.
368 2019-08-29 Jakub Jelinek <jakub@redhat.com>
370 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
371 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
373 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
375 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
376 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
377 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
378 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
379 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
380 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
381 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
383 2019-08-23 Joseph Myers <joseph@codesourcery.com>
385 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
386 (std::filesystem::__gnu_posix::lstat): Add return type.
388 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
390 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
392 * include/std/numeric (reduce): Fix Doxygen markup.
395 * include/std/type_traits (is_function): Simplify definition. Remove
396 partial specializations for function types.
397 (__is_referenceable): Simplify definition.
398 * testsuite/20_util/bind/91371.cc: New test.
399 * testsuite/20_util/is_function/91371.cc: New test.
400 * testsuite/20_util/is_function/value.cc: Check more pointer types.
401 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
402 * testsuite/20_util/is_object/91371.cc: New test.
404 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
406 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
408 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
411 * include/bits/std_function.h (__check_func_return_type): Remove.
412 (function::_Callable): Use std::__is_invocable_impl instead of
413 __check_func_return_type.
414 * include/std/type_traits (__is_invocable_impl): Add another defaulted
415 template parameter. Define a separate partial specialization for
416 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
417 with a check that models delayed temporary materialization.
418 * testsuite/20_util/function/91456.cc: New test.
419 * testsuite/20_util/is_invocable/91456.cc: New test.
421 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
423 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
425 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
427 Implement C++20 p0879 - Constexpr for swap and swap related functions.
428 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
429 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
431 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
432 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
433 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
434 * include/bits/move.h (swap): Add constexpr.
435 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
436 (__gcd, __rotate, rotate, __partition, __heap_select)
437 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
438 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
439 (__introselect, __chunk_insertion_sort, next_permutation)
440 (prev_permutation, partition, partial_sort, nth_element, sort)
441 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
442 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
443 (swap_ranges): Add constexpr.
444 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
445 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
447 * include/std/type_traits (swap): Add constexpr.
448 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
449 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
450 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
451 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
452 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
453 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
454 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
455 * testsuite/25_algorithms/partition/constexpr.cc: New test.
456 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
457 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
458 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
459 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
460 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
461 * testsuite/25_algorithms/sort/constexpr.cc: New test.
462 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
463 * testsuite/25_algorithms/swap/constexpr.cc: New test.
464 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
466 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
469 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
471 * include/std/tuple (__unpack_std_tuple): New variable template and
472 partial specializations.
473 (apply, make_from_tuple): Add noexcept-specifier.
474 * testsuite/20_util/tuple/apply/2.cc: New test.
475 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
477 2019-08-09 Corentin Gay <gay@adacore.com>
479 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
480 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
481 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
482 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
483 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
484 Add call to `VERIFY`.
486 2019-08-09 Alexandre Oliva <oliva@adacore.com>
489 (normal_mv_distribution::param_type::param_type): New private
490 ctor taking a decomposed varcov matrix, for use by...
491 (operator>>): ... this, befriended.
492 * include/ext/random.tcc (operator>>): Use it.
493 (normal_mv_distribution::param_type::_M_init_lower): Adjust
494 member function name in exception message.
496 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
498 P0325R4 to_array from LFTS with updates
499 * include/experimental/array (to_array): Qualify call to __to_array.
500 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
501 * include/std/version (__cpp_lib_to_array): Likewise.
502 * testsuite/23_containers/array/creation/1.cc: New test.
503 * testsuite/23_containers/array/creation/2.cc: New test.
504 * testsuite/23_containers/array/creation/3_neg.cc: New test.
505 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
506 Use zero for dg-error line number.
508 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
510 P1651R0 bind_front should not unwrap reference_wrapper
511 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
512 * include/std/version (__cpp_lib_bind_front): Update value.
513 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
515 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
517 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
518 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
519 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
520 specializations for __float128.
521 * testsuite/26_numerics/numbers/float128.cc: New test.
523 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
525 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
528 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
530 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
531 in <algorithm> and <utility> Headers.
532 Implement C++20 p1023 - constexpr comparison operators for std::array.
533 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
534 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
535 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
536 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
537 none_of, partition_copy, partition_point, remove, remove_if,
538 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
539 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
540 count_if, equal, find, find_first_of, find_if, for_each, generate,
541 generate_n, lexicographical_compare, merge, mismatch, replace,
542 replace_if, search, search_n, set_difference, set_intersection,
543 set_symmetric_difference, set_union, transform, unique_copy):
545 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
546 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
547 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
548 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
549 Use const ref instead of ref arg;
550 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
551 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
552 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
553 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
554 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
555 __iter_comp_iter): Mark constexpr.
556 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
557 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
558 none_of, any_of, find_if_not, is_partitioned, partition_point,
559 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
560 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
561 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
562 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
563 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
564 __equal_range, equal_range, binary_search, __includes, includes,
565 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
566 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
567 is_sorted_until, __is_permutation, is_permutation, for_each, find,
568 find_if, find_first_of, adjacent_find, count, count_if, search,
569 search_n, transform, replace, replace_if, generate, generate_n,
570 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
571 set_intersection, __set_difference, set_difference,
572 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
573 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
574 wrappers around __builtin_memmove and __builtin_memcmp
576 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
577 copy, move, __copy_move_b, __copy_move_backward_a,
578 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
579 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
580 __lexicographical_compare_impl, __lexicographical_compare,
581 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
582 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
583 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
584 is_heap): Mark constexpr.
585 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
586 is_heap): Mark constexpr.
587 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
588 * include/std/array: Make comparison ops constexpr.
589 * include/std/utility: Make exchange constexpr.
590 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
591 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
592 * testsuite/23_containers/array/tuple_interface/
593 tuple_element_neg.cc: Adjust.
594 * testsuite/20_util/exchange/constexpr.cc: New.
595 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
596 * testsuite/25_algorithms/constexpr_macro.cc: New.
597 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
598 * testsuite/25_algorithms/all_of/constexpr.cc: New.
599 * testsuite/25_algorithms/any_of/constexpr.cc: New.
600 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
601 * testsuite/25_algorithms/copy/constexpr.cc: New.
602 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
603 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
604 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
605 * testsuite/25_algorithms/count/constexpr.cc: New.
606 * testsuite/25_algorithms/count_if/constexpr.cc: New.
607 * testsuite/25_algorithms/equal/constexpr.cc: New.
608 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
609 * testsuite/25_algorithms/fill/constexpr.cc: New.
610 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
611 * testsuite/25_algorithms/find/constexpr.cc: New.
612 * testsuite/25_algorithms/find_end/constexpr.cc: New.
613 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
614 * testsuite/25_algorithms/find_if/constexpr.cc: New.
615 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
616 * testsuite/25_algorithms/for_each/constexpr.cc: New.
617 * testsuite/25_algorithms/generate/constexpr.cc: New.
618 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
619 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
620 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
621 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
622 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
623 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
624 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
625 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
626 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
627 * testsuite/25_algorithms/merge/constexpr.cc: New.
628 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
629 * testsuite/25_algorithms/none_of/constexpr.cc: New.
630 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
631 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
632 * testsuite/25_algorithms/remove/constexpr.cc: New.
633 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
634 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
635 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
636 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
637 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
638 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
639 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
640 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
641 * testsuite/25_algorithms/search/constexpr.cc: New.
642 * testsuite/25_algorithms/search_n/constexpr.cc: New.
643 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
644 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
645 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
646 * testsuite/25_algorithms/set_union/constexpr.cc: New.
647 * testsuite/25_algorithms/transform/constexpr.cc: New.
648 * testsuite/25_algorithms/unique/constexpr.cc: New.
649 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
650 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
652 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
654 * include/std/memory (make_obj_using_allocator): Qualify call to
655 uses_allocator_construction_args.
657 P0631R4 Math Constants
658 * include/Makefile.am: Add new header.
659 * include/Makefile.in: Regenerate.
660 * include/precompiled/stdc++.h: Include new header.
661 * include/std/numbers: New header.
662 * include/std/version (__cpp_lib_math_constants): Define.
663 * testsuite/26_numerics/numbers/1.cc: New test.
664 * testsuite/26_numerics/numbers/2.cc: New test.
665 * testsuite/26_numerics/numbers/3.cc: New test.
666 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
668 * include/std/bit: Add Doxygen comments.
671 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
672 constraints on deleter that should only apply to the constructor.
673 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
674 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
675 constraints on deleter here.
676 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
678 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
681 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
683 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
685 * testsuite/18_support/51333.cc: New test.
687 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
689 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
690 to the Doxygen manual. Avoid a "here" link on the way.
691 Fix another broken link to Doxygen docblocks.
693 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
695 * include/std/bit (__cpp_lib_endian): Define.
696 * include/std/version (__cpp_lib_endian): Define.
697 * testsuite/26_numerics/endian/2.cc: New.
698 * testsuite/26_numerics/endian/3.cc: New.
699 * testsuite/26_numerics/endian/4.cc: New.
701 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
703 * testsuite/util/testsuite_iterators.h
704 (bidirectional_iterator_wrapper): Fix type comment.
705 (random_access_iterator_wrapper): Likewise.
707 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
709 * include/std/bit (endian): Move definition here as per P1612R1.
710 * include/std/type_traits (endian): Remove definition from here.
711 * testsuite/20_util/endian/1.cc: Rename to ...
712 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
714 2019-07-25 Martin Liska <mliska@suse.cz>
715 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
718 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
720 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
721 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
722 * testsuite/ext/new_allocator/check_new.cc: Likewise.
724 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
726 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
727 * testsuite/26_numerics/bit/bit.count/*: Here.
729 * include/std/bit (__rotl, __rotr): Change second parameter from
730 unsigned int to int and handle negative values.
731 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
732 parameter from unsigned int to int. Add nodiscard attribute.
733 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
734 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
736 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
737 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
740 * include/std/bit (__ceil2): Make unrepresentable results undefined,
741 as per P1355R2. Add debug assertion. Perform one left shift, not two,
742 so that out of range values cause undefined behaviour. Ensure that
743 shift will still be undefined if left operand is promoted.
744 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
745 unrepresentable values with checks that they are not core constant
747 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
749 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
751 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
752 sized deallocation size computation.
754 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
756 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
758 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
760 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
761 (~_Temporary_buffer()): Use latter.
762 (_Temporary_buffer(_FIterator, size_type)): Likewise.
764 2019-07-17 Andreas Schwab <schwab@suse.de>
766 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
768 2019-07-16 Jason Merrill <jason@redhat.com>
770 * include/std/memory (uses_allocator_construction_args): Add parens
773 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
775 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
777 * include/experimental/string_view (__detail::__idt): Remove.
778 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
779 Use __type_identity_t instead of __detail::__idt;
780 * include/std/string_view (__detail::__idt): Remove.
781 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
782 Use __type_identity_t instead of __detail::__idt;
783 * include/std/type_traits (__type_identity_t): New alias template.
785 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
786 and floating point atomics.
788 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
790 * doc/xml/manual/configure.xml: Improve documentation of
791 --enable-libstdcxx-time option.
793 * include/bits/atomic_base.h (__atomic_impl): New namespace for
794 wrappers around atomic built-ins.
795 (__atomic_float, __atomic_ref): New class templates for use as base
797 * include/std/atomic (atomic<float>, atomic<double>)
798 (atomic<long double>): New explicit specializations.
799 (atomic_ref): New class template.
800 (__cpp_lib_atomic_ref): Define.
801 * include/std/version (__cpp_lib_atomic_ref): Define.
802 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
803 * testsuite/29_atomics/atomic_float/1.cc: New test.
804 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
805 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
806 * testsuite/29_atomics/atomic_ref/float.cc: New test.
807 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
808 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
809 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
810 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
812 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
814 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
815 throw() with _GLIBCXX_NOTHROW.
816 (__atomic_add_dispatch): Return after performing atomic increment.
818 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
820 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
821 (__exchange_and_add): Replace static specifier with always_inline
823 (__exchange_and_add_single, __atomic_add_single): Likewise.
824 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
825 combine !__gthread_active_p() and !__GTHREADS branches.
827 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
830 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
831 * configure: Regenerate.
832 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
834 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
835 * testsuite/util/testsuite_abi.cc: Add new symbol version.
837 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
839 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
840 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
841 instead of __is_identifier to detect Clang support.
843 2019-07-02 Jim Wilson <jimw@sifive.com>
845 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
847 * configure: Regenerate.
849 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
852 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
853 for the what_arg parameters.
854 (filesystem_error::filesystem_error): Pass system_error::what() to
855 the _Impl constructor.
856 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
857 filesystem_error::what() contains system_error::what().
859 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
861 * include/std/charconv (chars_format): Define bitmask type.
862 * testsuite/20_util/to_chars/chars_format.cc: New test.
864 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
865 * include/std/bit (_If_is_unsigned_integer_type): Remove.
866 (_If_is_unsigned_integer): Use __is_unsigned_integer.
867 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
868 (countl_one(byte), countr_zero(byte), countr_one(byte))
869 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
870 (log2p1(byte)): Remove.
871 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
872 (__detail::__is_int_to_chars_type): Remove.
873 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
874 and __is_unsigned_integer.
875 * include/std/type_traits (__is_one_of): Move here from <charconv>.
876 (__is_signed_integer, __is_unsigned_integer): New helpers.
877 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
879 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
880 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
881 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
882 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
883 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
884 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
885 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
886 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
887 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
888 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
890 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
892 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
895 2019-06-25 Jakub Jelinek <jakub@redhat.com>
897 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
898 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
899 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
900 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
902 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
904 * include/std/numeric (midpoint(T, T)): Change implementation for
905 floating-point types to avoid incorrect rounding of denormals.
906 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
907 rounding with denormals.
908 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
909 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
911 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
913 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
915 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
917 * configure: Regenerate.
919 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
920 Qualify calls to __never_valueless.
922 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
925 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
926 vector<bool> for test.
927 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
929 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
931 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
933 (istream_iterator::_M_read()): Do not check stream state before
934 attempting extraction. Set stream pointer to null when extraction
936 (operator==(const istream_iterator&, const istream_iterator&)): Change
937 to be a hidden friend of istream_iterator.
938 (operator!=(const istream_iterator&, const istream_iterator&)):
940 (ostream_iterator::ostream_iterator()): Add default constructor.
941 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
943 * testsuite/24_iterators/istream_iterator/1.cc: New test.
944 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
945 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
946 constructor taking a string.
947 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
950 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
951 Jonathan Wakely <jwakely@redhat.com>
954 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
955 values of type bool for vector<bool> elements.
956 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
957 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
959 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
961 PR libstdc++/90920 partially revert r263433
962 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
963 (rotate): Remove checks.
964 * testsuite/25_algorithms/rotate/90920.cc: New test.
966 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
967 category used in invocable check.
968 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
969 * testsuite/26_numerics/reduce/2.cc: New test.
971 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
973 * include/bits/algorithmfwd.h: Change title of doc group.
974 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
976 * include/bits/stl_numeric.h: Define doc group and add algos to it.
977 * include/std/numeric (__is_random_access_iter): New internal trait.
978 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
979 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
980 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
981 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
982 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
983 * testsuite/26_numerics/reduce/1.cc: New test.
984 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
985 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
986 * testsuite/26_numerics/transform_reduce/1.cc: New test.
987 * testsuite/util/testsuite_iterators.h (test_container::size()): New
990 * include/c_global/cstddef (std::byte): Perform arithmetic operations
991 in unsigned int to avoid promotion (LWG 2950).
993 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
995 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
998 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1000 PR libstdc++/90281 Fix string conversions for filesystem::path
1001 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1002 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1003 __str_codecvt_in_all to fail for partial conversions and throw on
1005 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1006 (path::_Cvt<char8_t>): Add explicit specialization.
1007 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1009 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1010 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1011 instead of codecvt_utf8. Use __str_codecvt_in_all and
1012 __str_codecvt_out_all.
1013 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1014 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1015 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1016 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1017 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1018 after converting to UTF-8.
1019 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1020 __str_codecvt_in_all.
1021 (path::string): Fix initialization of string types with different
1023 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1024 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1025 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1027 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1028 return false for partial conversions.
1029 * include/experimental/bits/fs_path.h (u8path):
1030 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1031 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1032 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1033 instead of codecvt_utf8. Use __str_codecvt_in_all and
1034 __str_codecvt_out_all.
1035 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1036 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1037 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1038 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1039 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1040 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1041 __str_codecvt_in_all.
1042 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1043 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1044 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1045 __str_codecvt_in_all.
1046 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1047 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1048 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1049 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1050 strings and with Unicode characters outside the basic multilingual
1052 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1053 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1054 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1055 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1056 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1057 empty strings and with Unicode characters outside the basic
1060 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1061 Jonathan Wakely <jwakely@redhat.com>
1063 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1064 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1065 deallocate node if insertion fails.
1066 (_Hashtable::_M_insert_multi_node): Likewise.
1067 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1068 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1069 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1070 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1071 (_Hashtable::extract(const _Key&)): Likewise.
1072 (_Hashtable::_M_merge_unique): Pass additional key argument.
1073 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1075 (_Hashtable::_M_insert): Likewise.
1076 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1077 (_Hashtable_alloc): Add comments to functions with misleading names.
1079 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1081 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1083 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1084 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1085 header for std::allocator.
1086 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1087 using-declaration for std::size_t.
1088 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1090 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1092 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1093 * testsuite/experimental/map/erasure.cc: Include <string> for
1095 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1097 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1099 * include/experimental/type_traits (experimental::nonesuch): Use
1100 pragma to disable -Wctor-dtor-privacy warnings.
1101 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1102 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1104 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1106 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1108 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1109 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1110 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1111 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1113 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1114 (variant::emplace): Change static_assert messages from "should be"
1116 (hash<monostate>::operator()): Remove name of unused parameter.
1118 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1121 * include/Makefile.am: Add new <bits/charconv.h> header.
1122 * include/Makefile.in: Regenerate.
1123 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1124 (to_string(long), to_string(unsigned long), to_string(long long))
1125 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1126 * include/bits/charconv.h: New header.
1127 (__detail::__to_chars_len): Move here from <charconv>.
1128 (__detail::__to_chars_10_impl): New function extracted from
1129 __detail::__to_chars_10.
1130 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1131 (__to_chars_unsigned_type): New class template that reuses
1132 __make_unsigned_selector_base::__select to pick a type.
1133 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1134 (__detail::__to_chars_len): Move to new header.
1135 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1136 output to __detail::__to_chars_10_impl and call that.
1137 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1138 * testsuite/21_strings/basic_string/numeric_conversions/char/
1139 to_string.cc: Fix reference in comment. Remove unused variable.
1140 * testsuite/21_strings/basic_string/numeric_conversions/char/
1141 to_string_int.cc: New test.
1143 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1145 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1146 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1147 Replace copy with hand-rolled loop.
1148 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1151 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1153 Test for C++20 p0858 - ConstexprIterator requirements.
1154 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1156 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1159 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1161 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1163 * include/bits/c++config: Rename all macros of the form __PSTL* to
1165 * include/std/algorithm: Likewise.
1166 * include/std/execution: Likewise.
1167 * include/std/numeric: Likewise.
1168 * include/std/memory: Likewise.
1169 * include/pstl/glue_memory_impl.h: Likewise.
1170 * include/pstl/numeric_impl.h: Likewise.
1171 * include/pstl/glue_memory_defs.h: Likewise.
1172 * include/pstl/execution_defs.h: Likewise.
1173 * include/pstl/utils.h: Likewise.
1174 * include/pstl/algorithm_fwd.h: Likewise.
1175 * include/pstl/unseq_backend_simd.h: Likewise.
1176 * include/pstl/glue_execution_defs.h: Likewise.
1177 * include/pstl/algorithm_impl.h: Likewise.
1178 * include/pstl/parallel_impl.h: Likewise.
1179 * include/pstl/memory_impl.h: Likewise.
1180 * include/pstl/glue_numeric_defs.h: Likewise.
1181 * include/pstl/parallel_backend_utils.h: Likewise.
1182 * include/pstl/glue_algorithm_defs.h: Likewise.
1183 * include/pstl/parallel_backend.h: Likewise.
1184 * include/pstl/glue_numeric_impl.h: Likewise.
1185 * include/pstl/parallel_backend_tbb.h: Likewise.
1186 * include/pstl/numeric_fwd.h: Likewise.
1187 * include/pstl/glue_algorithm_impl.h: Likewise.
1188 * include/pstl/execution_impl.h: Likewise.
1189 * include/pstl/pstl_config.h: Likewise.
1190 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1191 * testsuite/util/pstl/test_utils.h: Likewise.
1192 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1194 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1196 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1198 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1199 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1200 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1201 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1202 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1204 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1205 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1206 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1207 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1208 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1210 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1211 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1212 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1213 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1214 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1216 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1217 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1218 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1220 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1222 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1223 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1224 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1226 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1228 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1230 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1232 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1234 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1236 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1238 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1240 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1242 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1244 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1246 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1248 Rename header guards to be consistent with upstream project's
1250 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1251 _PSTL_(.*)_H to _PSTL_\U\1_H.
1252 * include/pstl/numeric_impl.h: Likewise.
1253 * include/pstl/glue_memory_defs.h: Likewise.
1254 * include/pstl/execution_defs.h: Likewise.
1255 * include/pstl/utils.h: Likewise.
1256 * include/pstl/algorithm_fwd.h: Likewise.
1257 * include/pstl/unseq_backend_simd.h: Likewise.
1258 * include/pstl/glue_execution_defs.h: Likewise.
1259 * include/pstl/algorithm_impl.h: Likewise.
1260 * include/pstl/parallel_impl.h: Likewise.
1261 * include/pstl/memory_impl.h: Likewise.
1262 * include/pstl/glue_numeric_defs.h: Likewise.
1263 * include/pstl/parallel_backend_utils.h: Likewise.
1264 * include/pstl/glue_algorithm_defs.h: Likewise.
1265 * include/pstl/parallel_backend.h: Likewise.
1266 * include/pstl/glue_numeric_impl.h: Likewise.
1267 * include/pstl/parallel_backend_tbb.h: Likewise.
1268 * include/pstl/numeric_fwd.h: Likewise.
1269 * include/pstl/glue_algorithm_impl.h: Likewise.
1270 * include/pstl/execution_impl.h: Likewise.
1271 * include/pstl/pstl_config.h: Likewise.
1272 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1274 Synchronize libstdc++ parallel algorithms with upstream
1276 * include/pstl/algorithm_fwd.h: Synchronize with
1277 upstream PSTL project.
1278 * include/pstl/algorithm_impl.h: Likewise.
1279 * include/pstl/execution_defs.h: Likewise.
1280 * include/pstl/execution_impl.h: Likewise.
1281 * include/pstl/glue_algorithm_impl.h: Likewise.
1282 * include/pstl/glue_execution_defs.h: Likewise.
1283 * include/pstl/numeric_fwd.h: Likewise.
1284 * include/pstl/numeric_impl.h: Likewise.
1285 * include/pstl/parallel_backend.h: Likewise.
1286 * include/pstl/pstl_config.h: Likewise.
1287 * include/pstl/unseq_backend_simd.h: Likewise.
1288 * include/pstl/parallel_backend_serial.h: New file.
1289 * include/Makefile.am (pstl_headers): Add
1290 parallel_backend_serial.h.
1291 * include/Makefile.in: Regenerate.
1293 Clean up non-conforming names
1294 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1295 Uglfiy copy_range1 and copy_range2
1296 (__pattern_walk2_n): Rename local n to __n
1297 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1298 Rename parameter _T to _Tp.
1300 Integrate non-TBB serial backend support
1301 * include/bits/c++config: Adjust TBB detection logic to select serial
1302 PSTL backend if no TBB present.
1303 * testsuite/utils/pstl/test_utils.h: Remove check for
1304 _PSTL_USE_PAR_POLICIES
1306 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1308 * testsuite/24_iterators/container_access.cc: Move dg-options before
1309 dg-do directive so the target check uses the -std option.
1312 * configure: Regenerate.
1313 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1314 * src/Makefile.in: Regenerate.
1316 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1318 * include/std/array: Do not include <stdexcept>.
1319 * include/std/optional: Include <exception> and
1320 <bits/exception_defines.h> instead of <stdexcept>.
1321 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1323 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1325 * testsuite/23_containers/map/erasure.cc: Include <string>.
1326 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1328 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1329 dg-prune-output for different C++98 diagnostic.
1330 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1332 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1334 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1336 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1338 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1340 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1342 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1344 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1346 * testsuite/23_containers/vector/requirements/dr438/
1347 constructor_1_neg.cc: Likewise.
1348 * testsuite/23_containers/vector/requirements/dr438/
1349 constructor_2_neg.cc: Likewise.
1350 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1352 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1354 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1355 Do not test allocator rebinding extension for C++2a.
1356 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1357 dg-do directive for C++17 and C++2a.
1359 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1360 1_c++0x.cc: Remove redundant test.
1361 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1362 2.cc: Use target selector instead of preprocessor condition.
1363 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1364 3.cc: Do not run test for C++2a.
1365 * testsuite/23_containers/forward_list/requirements/
1366 explicit_instantiation/3.cc: Likewise.
1367 * testsuite/23_containers/forward_list/requirements/
1368 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1370 * testsuite/23_containers/list/requirements/explicit_instantiation/
1371 1_c++0x.cc: Remove redundant test.
1372 * testsuite/23_containers/list/requirements/explicit_instantiation/
1373 2.cc: Use target selector instead of preprocessor condition.
1374 * testsuite/23_containers/list/requirements/explicit_instantiation/
1375 3.cc: Do not run test for C++2a.
1376 * testsuite/23_containers/list/requirements/explicit_instantiation/
1377 5.cc: Do not test allocator rebinding extension for C++2a.
1378 * testsuite/23_containers/map/requirements/explicit_instantiation/
1379 1_c++0x.cc: Remove redundant test.
1380 * testsuite/23_containers/map/requirements/explicit_instantiation/
1381 2.cc: Adjust comment.
1382 * testsuite/23_containers/map/requirements/explicit_instantiation/
1383 3.cc: Do not run test for C++2a.
1384 * testsuite/23_containers/map/requirements/explicit_instantiation/
1385 5.cc: Do not test allocator rebinding extension for C++2a.
1386 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1387 1_c++0x.cc: Remove redundant test.
1388 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1389 3.cc: Do not run test for C++2a.
1390 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1391 5.cc: Do not test allocator rebinding extension for C++2a.
1392 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1393 3.cc: Do not run test for C++2a.
1394 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1395 5.cc: Do not test allocator rebinding extension for C++2a.
1396 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1397 Do not run test for C++2a.
1398 * testsuite/23_containers/set/requirements/explicit_instantiation/
1399 1_c++0x.cc: Remove redundant test.
1400 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1401 Do not test allocator rebinding extension for C++2a.
1402 * testsuite/23_containers/unordered_map/requirements/
1403 explicit_instantiation/3.cc: Likewise.
1404 * testsuite/23_containers/unordered_map/requirements/
1405 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1407 * testsuite/23_containers/unordered_multimap/requirements/
1408 explicit_instantiation/3.cc: Do not run test for C++2a.
1409 * testsuite/23_containers/unordered_multimap/requirements/
1410 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1412 * testsuite/23_containers/unordered_multiset/requirements/
1413 explicit_instantiation/3.cc: Do not run test for C++2a.
1414 * testsuite/23_containers/unordered_multiset/requirements/
1415 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1417 * testsuite/23_containers/unordered_set/requirements/
1418 explicit_instantiation/3.cc: Do not run test for C++2a.
1419 * testsuite/23_containers/unordered_set/requirements/
1420 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1422 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1423 2.cc: Remove redundant test.
1424 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1425 3.cc: Do not run test for C++2a.
1426 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1429 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1430 (is_abstract, is_aggregate): Remove static_assert.
1431 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1433 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1434 missing -std=gnu++17 option.
1435 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1436 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1437 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1440 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1441 * testsuite/18_support/set_unexpected.cc: Likewise.
1442 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1444 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1445 function to be valid in C++11.
1446 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1447 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1448 include Library Fundamentals or Networking headers in C++11 mode.
1449 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1451 * include/std/tuple (_TC): Replace with _TupleConstraints.
1452 (_TupleConstraints): New helper for SFINAE constraints, with more
1453 expressive member functions to reduce duplication when used.
1454 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1455 (tuple::_TCC): Replace dummy type parameter with bool non-type
1456 parameter that can be used to check the pack size.
1457 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1458 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1459 checking constraints in constructors.
1460 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1462 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1463 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1464 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1465 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1466 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1467 constraints in constructors.
1468 (tuple::__is_alloc_arg()): New SFINAE helpers.
1469 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1471 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1472 * testsuite/20_util/tuple/cons/90700.cc: New test.
1473 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1474 to meet new constraint on allocator-extended default constructor.
1476 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1478 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1479 * include/bits/stl_multimap.h (multimap): Likewise.
1481 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1483 Rename variables and cleanup comments.
1484 * include/bits/hashtable_policy.h
1485 * include/bits/hashtable.h
1487 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1489 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1490 Fix bgcolor for P0340R3.
1491 * doc/html/*: Regenerate.
1494 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1495 <experimental/memory_resource>.
1496 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1497 P0339R6, P0340R3, P1164R1 and P1357R1.
1498 * doc/html/*: Regenerate.
1500 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1501 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1502 allocator::value_type assertion for C++2a.
1503 * include/bits/hashtable.h: Likewise.
1504 * include/bits/stl_deque.h: Likewise.
1505 * include/bits/stl_list.h: Likewise.
1506 * include/bits/stl_map.h: Likewise.
1507 * include/bits/stl_multimap.h: Likewise.
1508 * include/bits/stl_multiset.h: Likewise.
1509 * include/bits/stl_set.h: Likewise.
1510 * include/bits/stl_vector.h: Likewise.
1511 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1512 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1513 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1514 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1515 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1516 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1517 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1518 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1519 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1520 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1521 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1522 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1524 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1526 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1528 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1530 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1532 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1534 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1536 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1538 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1541 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1542 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1543 * libsupc++/eh_term_handler.h: New header defining
1544 _GLIBCXX_DEFAULT_TERM_HANDLER.
1545 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1546 (set_terminate): Restore default handler when argument is null.
1547 (set_unexpected): Likewise.
1548 * testsuite/18_support/set_terminate.cc: New test.
1549 * testsuite/18_support/set_unexpected.cc: New test.
1551 * include/backward/hashtable.h (size_t, ptrdiff_t)
1552 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1553 (distance, vector, pair, __iterator_category): Remove
1554 using-declarations that add these names to namespace __gnu_cxx.
1555 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1556 * include/ext/debug_allocator.h (size_t): Likewise.
1557 * include/ext/functional (size_t, unary_function, binary_function)
1558 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1560 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1561 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1562 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1563 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1564 * include/ext/numeric (iota): Fix outdated comment.
1565 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1566 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1567 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1568 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1569 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1571 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1572 (allocator, __true_type, __false_type): Likewise.
1574 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1577 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1578 New helpers for checking preconditions in traits.
1579 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1580 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1581 (is_destructible, is_nothrow_destructible, is_constructible)
1582 (is_default_constructible, is_copy_constructible)
1583 (is_move_constructible, is_nothrow_default_constructible)
1584 (is_nothrow_constructible, is_nothrow_copy_constructible)
1585 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1586 (is_nothrow_assignable, is_nothrow_copy_assignable)
1587 (is_nothrow_move_assignable, is_trivially_constructible)
1588 (is_trivially_copy_constructible, is_trivially_move_constructible)
1589 is_trivially_assignable, is_trivially_copy_assignable)
1590 (is_trivially_move_assignable, is_trivially_destructible)
1591 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1592 (is_invocable_r, is_nothrow_invocable)
1593 (has_unique_object_representations, is_aggregate): Add static_asserts
1594 to make sure that type traits are not misused with incomplete types.
1595 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1596 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1597 base characteristics without assertions that can be reused in other
1599 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1600 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1602 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1603 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1604 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1605 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1606 * testsuite/20_util/is_function/value.cc: Likewise.
1607 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1608 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1610 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1611 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1612 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1613 * testsuite/20_util/is_union/value.cc: Likewise.
1614 * testsuite/20_util/is_void/value.cc: Likewise.
1615 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1617 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1619 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1620 Add new private member function.
1621 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1622 (random_device::_M_init_pretr1(const string&)): Call new private
1623 member with string data.
1624 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1626 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1627 test using COW strings.
1628 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1629 a value from the device.
1630 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1631 Fix typo in token string.
1633 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1635 LWG2788 basic_string spurious use of a default constructible allocator
1636 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1637 (basic_string::_M_replace_dispatch): Construct temporary string with
1638 the current allocator.
1639 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1640 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1642 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1644 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1646 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1647 section about new/delete overloads. Improve section on verbose
1649 * doc/html/*: Regenerate.
1651 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1652 P0811R3. Change status of P1353R0.
1653 * doc/html/*: Regenerate.
1655 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1656 documentation of implementation-defined types for [thread.req.native].
1657 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1658 implementation-defined strings for [variant.bad.access]. Fix typo in
1659 documentation of implementation-defined support for [fs.conform.9945].
1660 * doc/html/*: Regenerate.
1662 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1665 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1666 that fails on mingw-w64.
1669 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1670 (status(const path&, error_code&)): Use parent_path() to remove
1672 (symlink_status(const path&, error_code&)): Duplicate workaround for
1673 bug in _wstat for paths with trailing slash.
1674 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1675 with trailing slash.
1676 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1677 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1679 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1680 once instead of building it iteratively.
1682 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1684 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1685 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1686 the assembler supports rdseed.
1687 * config.h.in: Regenerate.
1688 * configure: Regenerate.
1689 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1690 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1691 * doc/html/*: Regenerate.
1692 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1693 * include/bits/random.h (random_device::random_device()): Always call
1694 _M_init rather than _M_init_pretr1.
1695 (random_device::random_device(const string&)): Likewise.
1696 (random_device::operator()()): Always call _M_getval().
1697 (random_device::_M_file): Replace first member of union with an
1698 anonymous struct, with _M_file as its first member.
1699 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1700 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1701 (USE_MT19937): Define if none of the above are defined.
1702 (USE_POSIX_FILE_IO): Define.
1703 (_M_strtoul): Remove.
1704 [USE_RDSEED] (__x86_rdseed): Define new function.
1705 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1706 (random_device::_M_init(const string&)): Initialize new union members.
1707 Add support for "rdseed" and "rand_s" tokens. Decide what the
1708 "default" token does according to which USE_* macros are defined.
1709 [USE_POSIX_FILE_IO]: Store a file descriptor.
1710 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1711 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1712 code from _M_strtoul.
1713 [!USE_MT19937]: Call _M_init, transforming the old default token or
1714 numeric tokens to "default".
1715 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1716 (random_device::_M_getval()): Use new union members to obtain a
1717 random number from the stored function pointer or file descriptor.
1718 [USE_MT19937]: Obtain a value from the mt19937 engine.
1719 (random_device::_M_getval_pretr1()): Call _M_getval().
1720 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1722 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1723 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1725 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1728 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1729 _M_split_cmpts() for a path with multiple components.
1730 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1731 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1732 components and reserve space in vector. Return early when there is
1734 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1735 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1737 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1738 form of std::equals for C++11 compatibility.
1740 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1742 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1743 C++ standard at ansi.org.
1745 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1747 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1748 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1751 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1752 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1754 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1756 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1758 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1759 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1760 "compile" test to "run".
1762 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1763 * doc/html/*: Regenerate.
1764 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1765 rvalue aliasing constructor.
1766 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1767 (reinterpret_pointer_cast): Add overloads taking rvalues.
1768 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1769 Add rvalue aliasing constructor.
1770 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1771 "run" and check return values as well as types.
1772 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1773 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1774 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1775 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1778 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1779 * doc/xml/manual/intro.xml: Likewise.
1780 * include/std/future (__create_task_state): Add default arguments
1781 to make providing an allocator optional.
1782 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1783 instead of delegating to another constructor.
1784 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1785 define allocator-extended constructors for C++17 and later.
1786 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1788 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1789 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1790 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1792 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1794 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1795 Don't run the libstdc++/83237 part on simulator targets.
1797 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1799 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1801 * doc/html/*: Regenerate.
1803 * include/experimental/any (__any_caster): Use RTTI if comparing
1804 addresses fails, to support non-unique addresses in shared libraries.
1805 * include/std/any (__any_caster): Likewise.
1808 * include/experimental/any (__any_caster): Constrain to only be
1809 callable for object types. Use remove_cv_t instead of decay_t.
1810 If the type decays or isn't copy constructible, compare the manager
1811 function to a dummy specialization.
1812 (__any_caster): Add overload constrained for non-object types.
1813 (any::_Manager_internal<_Op>): Add dummy specialization.
1814 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1817 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1820 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1821 reversed arguments to uninitialized_copy_n.
1822 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1823 is unchanged by copy assignment.
1824 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1825 compare path components.
1828 * include/experimental/memory_resource: Add system header pragma and
1829 do not define anything unless compiled as C++14 or later.
1830 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1831 (__resource_adaptor_imp::do_allocate): If the requested alignment
1832 is a fundamental alignment then either allocate directly from _M_alloc
1833 or call the new _M_allocate function.
1834 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1835 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1836 of the allocator rebound to a POD type with the specified alignment.
1837 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1838 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1839 Adjust expected allocation sizes.
1840 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1841 xfail for Solaris x86.
1843 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1845 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1846 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1847 Use std::__remove_cvref_t when building with GCC.
1849 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1852 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1853 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1854 Use check_v3_target_prop_cached to cache the result of the test.
1856 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1858 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1861 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1862 Changed v3_target_compile check from preprocess to executable.
1863 Added "-ltbb" to v3_target_compile flags.
1865 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1867 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1868 Add check for Thread Building Blocks 2018 or later.
1870 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1872 * testsuite/experimental/names.cc: Only include Networking TS headers
1873 on targets with the necessary Gthreads support.
1875 2019-05-20 Marek Polacek <polacek@redhat.com>
1877 CWG 2094 - volatile scalars are trivially copyable.
1879 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1880 result for volatile int.
1882 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1884 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1885 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1888 PR c++/90532 Ensure __is_constructible(T[]) is false
1889 * include/std/type_traits (__do_is_default_constructible_impl)
1890 (__is_default_constructible_atom, __is_default_constructible_safe):
1892 (is_default_constructible): Use is_constructible.
1893 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1894 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1895 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1896 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1899 2019-05-20 Pádraig Brady <pbrady@fb.com>
1901 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1902 to the deallocator with -fsized-deallocation.
1904 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1906 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1907 test by passing correct alignment to deallocate function.
1909 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1912 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1913 Raise exception if unique_ptr tuple member has unknown structure.
1914 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1915 Adjust worker to support new __uniq_ptr_data base class. Do not
1916 assume field called _M_head_impl is the first tuple element.
1918 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1920 * include/bits/stl_deque.h
1921 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1922 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1923 (_Deque_base::_Deque_impl_data): New.
1924 (_Deque_base::_Deque_impl): Inherit latter.
1925 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1926 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1927 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1928 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1929 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1930 (deque<>::deque()): Default.
1931 (deque<>::deque(deque&&)): Default.
1932 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1933 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1934 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1935 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1936 _M_range_initialize.
1937 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1938 (deque<>::resize(size_type, const value_type&)): Share a single
1940 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1941 _M_range_insert_aux.
1942 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1943 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1944 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1945 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1947 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1950 * include/std/variant (holds_alternative, get, get_if): Improve
1951 static assertion messages.
1952 (bad_variant_access::bad_variant_access()): Change default message.
1953 (__throw_bad_variant_access(bool)): New overload.
1954 (get): Use new overload.
1955 (visit, visit<R>): Improve exception message.
1957 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1958 targets. Add more cases from P0608R3.
1959 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1961 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1962 * include/experimental/type_traits (is_detected_exact)
1963 (is_detected_exact_v): Likewise.
1964 * include/pstl/execution_defs.h (is_execution_policy)
1965 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1966 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1967 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1968 * testsuite/experimental/names.cc: New test.
1971 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1972 assertions from the destructor.
1973 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1974 Move static_assert for hash function to here.
1975 (_Hash_table_base::_M_equals): Move static_assert for equality
1977 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1979 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1980 the value directly instead of calling _S_value.
1981 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1982 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1983 _S_key(_Const_Link_type).
1984 * testsuite/23_containers/set/85965.cc: Check construction,
1985 destruction, assignment and size() do not trigger the assertions.
1986 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1987 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1989 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1990 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1991 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1992 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1993 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1994 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1995 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1997 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1998 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2001 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2003 * doc/html/*: Regenerate.
2004 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2005 of decay_t (P0777R1).
2007 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2009 Move from state of allocators (LWG2593)
2010 * include/bits/stl_deque.h
2011 (_Deque_base(_Deque_base&&, false_type)): Remove.
2012 (_Deque_base(_Deque_base&&, true_type)): Remove.
2013 (_Deque_base(_Deque_base&&)): Adapt.
2014 (_Deque_base::_M_move_impl()): Remove.
2015 * testsuite/util/testsuite_allocator.h
2016 (propagating_allocator(propagating_allocator&&)): Preserve move from
2018 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2020 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2022 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2023 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2024 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2026 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2028 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2029 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2031 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2033 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2035 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2037 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2039 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2041 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2043 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2046 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2048 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2049 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2051 * include/std/variant (__overload_set): Remove.
2053 (_Build_FUN): New class template to define a single FUN overload,
2054 with specializations to prevent unwanted conversions, as per P0608R3.
2055 (_Build_FUNs): New class template to build an overload set of FUN.
2056 (_FUN_type): New alias template to perform overload resolution.
2057 (__accepted_type): Use integer_constant base for failure case. Use
2058 _FUN_type for successful case.
2059 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2060 (variant::variant(_Tp&&)): Likewise.
2061 (variant::operator=(_Tp&&)): Likewise.
2063 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2064 Replace raw visitation with a runtime check for the valueless state
2065 and a non-raw visitor.
2066 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2067 (variant::index()): Remove branch.
2068 (variant::swap(variant&)): Use valueless_by_exception() instead of
2069 comparing the index to variant_npos, and add likelihood attribute.
2071 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2072 (_Hashtable_base::_Equal_hash_code): Define new class template.
2073 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2076 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2077 Replace with _M_get non-static member function.
2078 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2080 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2081 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2083 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2084 _S_get accessors for members in EBO helpers.
2085 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2086 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2088 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2090 (_Hashtable_base::_M_eq()): Remove non-const overload.
2092 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2094 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2096 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2098 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2101 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2103 * config/os/solaris/solaris2.10: Move to ...
2104 * config/os/solaris: ... this.
2105 * configure.host (os_include_dir): Adapt.
2106 (abi_baseline_pair): Remove Solaris 10 handling.
2107 * config/abi/post/i386-solaris2.10: Remove.
2108 * config/abi/post/sparc-solaris2.10: Remove.
2109 * config/abi/post/i386-solaris2.11: Rename to ...
2110 * config/abi/post/i386-solaris: ... this.
2111 * config/abi/post/sparc-solaris2.11: Rename to ...
2112 * config/abi/post/sparc-solaris: ... this.
2114 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2117 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2120 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2122 * include/std/variant (__visit_with_index): Remove typedef.
2123 (__deduce_visit_result): New tag type.
2124 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2125 visitation of possibly-valueless variants, forwarding to __do_visit
2126 with the relevant tag type.
2127 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2128 and make lambda return void.
2129 (__variant_construct): Likewise.
2130 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2131 __raw_idx_visit and make lambda return void.
2132 (_Multi_array::__untag_result): Add metafunction to check the function
2133 pointer type for a tag type that dictates the kind of visitation.
2134 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2135 Use decltype(auto) instead of tagged function pointer type.
2136 (__gen_vtable_impl): Remove bool non-type parameter and unused
2137 _Variant_tuple parameter.
2138 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2139 (__gen_vtable_impl::__do_visit_invoke): Remove.
2140 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2141 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2142 for the visit<R> case, rather than dispatching to separate functions.
2143 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2145 (variant::swap): Likewise.
2146 (__do_visit): Replace two non-type template parameters with a single
2147 type parameter, so that the caller must specify the visitor's return
2148 type (or one of the tag types).
2149 (visit): Deduce a return type from the visitor and use the
2150 __deduce_visit_result tag to enforce that all overloads return the
2152 (visit<R>): Call __do_visit<R> with explicit result type.
2153 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2156 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2158 nonesuch is insufficiently useless (lwg2996)
2159 * include/std/type_traits (struct __nonesuch): Added private base
2160 class to make __nonesuch not an aggregate and removed deleted default
2162 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2163 (operator=(const pair&)): Use __nonesuch instead of
2164 __nonesuch_no_braces.
2165 (operator=(pair&&)): Likewise
2166 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2167 of __nonesuch_no_braces.
2168 (operator=(tuple&&)): Likewise
2169 * include/experimental/type_traits (struct nonesuch): Added private
2170 base class to make nonesuch not an aggregate and removed deleted
2171 default constructor.
2172 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2173 * testsuite/experimental/type_traits/nonesuch.cc: New.
2175 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2177 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2178 (_Function_handler): Remove partial specializations for void return
2179 types and pointers to member.
2180 (_Function_handler::_M_manager): Adapt to removal of
2181 _Simple_type_wrapper.
2182 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2183 * include/std/functional (_Bind_result::__enable_if_void)
2184 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2185 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2187 * include/std/future (__future_base::_Task_state::_M_run)
2188 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2189 change return type of lambda expressions.
2191 * include/bits/invoke.h (__invoke_r): Define new function implementing
2192 the INVOKE<R> pseudo-function.
2193 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2194 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2196 * include/std/type_traits (__is_nt_convertible_helper): Define it
2197 unconditionally, not only for C++20.
2198 (__is_nothrow_convertible): Define internal trait for use in C++11.
2199 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2200 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2201 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2202 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2203 that has nothrow explicit conversion but potentially-throwing implicit
2205 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2206 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2207 function to only consider implicit conversions.
2208 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2210 * include/std/iterator: Include <iosfwd> instead of <istream> and
2213 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2214 Remove unused, non-standard function.
2216 * include/bits/regex.h (match_results::max_size()): Adjust return
2217 value to account for prefix/suffix/unmatched subs.
2218 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2219 reset the contained sub matches.
2220 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2221 function to set result state following a failed match.
2222 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2223 sub_match states after _M_resize. Use _M_establish_failed_match.
2226 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2227 Replace single _Callable parameter with variadic _Args pack, to
2228 forward them directly to the tuple of decayed copies.
2229 * testsuite/30_threads/thread/cons/69724.cc: New test.
2231 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2233 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2234 * include/bits/basic_string.h: (operator=(const basic_string&):
2235 Move allocator decision to assign.
2236 (assign(const basic_string&)): Move allocator decision here.
2237 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2239 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2242 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2244 * testsuite/util/testsuite_allocator.h (memory_resource)
2245 (default_resource_mgr): Fix indentation.
2247 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2248 Use operator-> to access raw pointer member.
2249 * testsuite/23_containers/vector/59829.cc: Likewise.
2250 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2251 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2252 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2254 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2255 its constructors and equality operators. Change converting
2256 constructors to use operator-> to access private member of the other
2258 (PointerBase_void::operator->()): Add, for access to private member.
2259 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2260 (operator==(PointerBase, PointerBase)): Remove.
2261 (operator!=(PointerBase, PointerBase)): Remove.
2263 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2264 not assume field called _M_head_impl is the first tuple element.
2265 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2266 implementation more accurate.
2267 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2268 empty pointer type and non-empty deleter.
2270 LWG 2899 - Make is_move_constructible correct for unique_ptr
2271 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2272 move assignment operator.
2273 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2274 (__uniq_ptr_data): New class template with conditionally deleted
2276 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2277 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2278 constructor and move assignment operator as defaulted.
2279 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2280 __uniq_ptr_impl::release().
2281 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2282 to __uniq_ptr_impl::reset(pointer).
2283 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2284 Check for new __uniq_ptr_data type.
2285 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2287 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2289 PR libstdc++/90454.cc path construction from void*
2290 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2291 pointers to void are rejected as well as void.
2292 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2293 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2295 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2297 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2298 <remark> elements. Fix formatting of bibliography references.
2300 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2302 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2304 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2306 Remove Profile Mode, deprecated since 7.1.0
2307 * doc/Makefile.am: Remove XML file for profile mode docs.
2308 * doc/Makefile.in: Regenerate.
2309 * doc/xml/authors.xml: Remove authors of profile mode docs.
2310 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2312 * doc/xml/manual/debug.xml: Likewise.
2313 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2314 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2315 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2316 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2318 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2320 * doc/html/*: Regenerate.
2321 * include/Makefile.am: Remove profile mode headers.
2322 * include/Makefile.in: Regenerate.
2323 * include/bits/c++config (std::__profile): Remove namespace.
2324 [_GLIBCXX_PROFILE]: Remove checks for macro.
2325 * include/profile/array: Remove.
2326 * include/profile/base.h: Remove.
2327 * include/profile/bitset: Remove.
2328 * include/profile/deque: Remove.
2329 * include/profile/forward_list: Remove.
2330 * include/profile/impl/profiler.h: Remove.
2331 * include/profile/impl/profiler_algos.h: Remove.
2332 * include/profile/impl/profiler_container_size.h: Remove.
2333 * include/profile/impl/profiler_hash_func.h: Remove.
2334 * include/profile/impl/profiler_hashtable_size.h: Remove.
2335 * include/profile/impl/profiler_list_to_slist.h: Remove.
2336 * include/profile/impl/profiler_list_to_vector.h: Remove.
2337 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2338 * include/profile/impl/profiler_node.h: Remove.
2339 * include/profile/impl/profiler_state.h: Remove.
2340 * include/profile/impl/profiler_trace.h: Remove.
2341 * include/profile/impl/profiler_vector_size.h: Remove.
2342 * include/profile/impl/profiler_vector_to_list.h: Remove.
2343 * include/profile/iterator_tracker.h: Remove.
2344 * include/profile/list: Remove.
2345 * include/profile/map: Remove.
2346 * include/profile/map.h: Remove.
2347 * include/profile/multimap.h: Remove.
2348 * include/profile/multiset.h: Remove.
2349 * include/profile/ordered_base.h: Remove.
2350 * include/profile/set: Remove.
2351 * include/profile/set.h: Remove.
2352 * include/profile/unordered_base.h: Remove.
2353 * include/profile/unordered_map: Remove.
2354 * include/profile/unordered_set: Remove.
2355 * include/profile/vector: Remove.
2356 * scripts/run_doxygen: Do not process profile mode headers.
2357 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2359 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2360 Remove dg-skip-if for profile mode.
2361 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2362 preprocessor check for profile mode.
2363 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2364 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2366 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2368 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2369 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2370 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2371 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2372 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2374 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2376 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2378 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2380 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2381 preprocessor check for profile mode.
2382 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2384 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2385 Remove dg-skip-if for profile mode.
2386 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2387 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2388 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2389 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2390 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2391 * testsuite/Makefile.am: Remove profile_flags variable and
2392 * testsuite/Makefile.am: Remove profile_flags variable and
2393 check-profile target.
2394 * testsuite/Makefile.in: Regenerate.
2395 * testsuite/ext/profile/all.cc: Remove.
2396 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2397 * testsuite/ext/profile/profiler_algos.cc: Remove.
2398 * testsuite/ext/profile/replace_new.cc: Remove.
2399 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2400 preprocessor check for profile mode.
2401 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2402 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2403 (check_v3_target_normal_mode): Do not check for profile mode macro.
2404 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2406 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2407 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2408 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2409 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2410 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2411 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2412 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2413 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2414 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2415 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2417 Remove array_allocator extension, deprecated since 4.9.0
2418 * doc/xml/manual/allocator.xml: Remove documentation for
2420 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2421 * doc/xml/manual/using.xml: Remove header from documentation.
2422 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2423 * include/Makefile.in: Regenerate.
2424 * include/ext/array_allocator.h: Remove.
2425 * include/precompiled/extc++.h: Do not include removed header.
2426 * testsuite/ext/array_allocator/1.cc: Remove.
2427 * testsuite/ext/array_allocator/2.cc: Remove.
2428 * testsuite/ext/array_allocator/26875.cc: Remove.
2429 * testsuite/ext/array_allocator/3.cc: Remove.
2430 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2431 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2432 * testsuite/ext/array_allocator/check_new.cc: Remove.
2433 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2434 * testsuite/ext/headers.cc: Do not include removed header.
2436 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2438 * include/bits/stl_bvector.h
2439 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2441 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2443 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2445 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2447 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2449 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2451 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2453 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2455 (_Bit_iterator::operator-(difference_type)): Likewise.
2456 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2457 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2459 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2460 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2462 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2465 * testsuite/util/thread/all.h: Do not use remove_pointer for
2466 std::thread::native_handle_type.
2469 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2470 (_Variant_storage<true, Types...>::_M_reset()))
2471 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2472 (__get_storage): Likewise.
2473 (variant): Add noexcept to friend declarations for __get and
2477 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2478 Use _Require for constraints.
2479 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2481 (__uniq_ptr_hash): New base class with conditionally-disabled call
2483 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2484 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2485 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2487 * include/bits/shared_ptr.h: Improve docs.
2488 * include/bits/shared_ptr_base.h: Likewise.
2489 * include/bits/stl_uninitialized.h: Likewise.
2490 * include/bits/unique_ptr.h: Likewise.
2491 * libsupc++/new: Likewise.
2493 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2495 * include/bits/stl_deque.h
2496 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2498 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2500 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2502 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2504 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2506 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2508 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2510 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2512 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2515 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2516 (test01): Reserve for number of insertions to avoid rehash during test.
2517 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2519 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2524 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2526 * include/experimental/bits/fs_path.h: Improve docs.
2527 * include/experimental/bits/net.h: Fix wrong header name in comment.
2528 Do not document implementation details.
2529 * include/experimental/netfwd: Fix doxygen grouping.
2531 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2533 * include/bits/stl_pair.h: Improve docs.
2534 * include/std/tuple: Likewise.
2536 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2538 * include/std/chrono: Improve docs.
2539 * include/std/ratio: Do not document implementation details.
2540 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2542 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2545 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2546 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2547 (__duration_common_type): New helper.
2548 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2549 __duration_common_type.
2550 (__timepoint_common_type_wrapper): Replace with ...
2551 (__timepoint_common_type): New helper.
2552 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2553 Use __time_point_common_type.
2554 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2555 (__common_type_impl): If either argument is transformed by decay,
2556 use the common_type of the decayed types.
2557 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2558 decayed, use __do_common_type_impl to get the common_type.
2559 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2560 (__do_member_type_wrapper, __member_type_wrapper)
2561 (__expanded_common_type_wrapper): Remove.
2562 (__common_type_pack, __common_type_fold): New helpers.
2563 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2564 __member_type_wrapper and __expanded_common_type_wrapper.
2565 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2566 Test zero-length template argument list.
2567 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2568 Test single argument cases and argument types that should decay.
2569 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2570 Adjust expected error.
2571 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2573 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2574 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2575 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2577 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2579 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2581 Make allocator propagation more consistent for
2582 operator+(basic_string) (P1165R1)
2583 * include/bits/basic_string.h
2584 (operator+(basic_string&&, basic_string&&): Changed resulting
2585 allocator to always be the one from the first parameter.
2586 * include/bits/basic_string.tcc
2587 (operator+(const _CharT*, const basic_string&)): Changed
2588 resulting allocator to be SOCCC on the second parameter's allocator.
2589 (operator+(_CharT, const basic_string&)): Likewise.
2590 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2592 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2595 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2597 * include/bits/regex.h: Improve docs.
2598 * include/bits/regex.tcc: Do not document implementation details.
2600 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2602 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2604 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2605 Add type printer for container types in std::__debug namespace.
2606 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2607 (gdb-tests): Use distinct parameters for the type of test and use of
2609 (gdb-test): Check for regex test even if 'whatis' test.
2610 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2612 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2613 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2614 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2615 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2616 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2617 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2618 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2620 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2622 * include/std/system_error (error_category): Fix comment.
2625 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2626 argument is an empty path.
2627 (absolute(const path&, error_code&)): Use invalid_argument as error
2628 code instead of no_such_file_or_directory.
2629 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2630 of non-existent paths and empty paths with both overloads of absolute.
2632 * include/std/system_error (error_category, error_code)
2633 (error_condition): Improve docs.
2634 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2635 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2636 to class documentation. Suppress documentation for implementation
2638 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2639 Suppress documentation for implementation details.
2641 * include/std/system_error (error_code): Remove friend declaration
2642 for hash<error_code>.
2643 (hash<error_code>::operator()): Use public member functions to access
2645 (hash<error_condition>::operator()): Use address of category, not
2646 its object representation.
2647 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2648 Use public member functions to access value and category.
2649 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2651 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2653 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2654 * include/bits/hashtable_policy.h
2655 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2656 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2657 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2658 smaller than input value rather than always greater. Preserve
2659 _M_next_resize if called with 0 input. Use __builtin_floorl.
2660 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2661 elements + number of insertions is greater than _M_next_resize. Start
2662 with 11 buckets if not told otherwise. Use __builtin_floorl.
2663 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2664 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2665 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2666 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2667 told otherwise. Use __builtin_floorl.
2668 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2669 to also validate _Power2_rehash_policy.
2670 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2673 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2676 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2680 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2681 overflow warning with -Wpedantic -Wsystem-headers.
2683 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2686 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2687 * include/bits/move.h (swap): Remove extra parentheses.
2689 * include/experimental/bits/lfts_config.h: Improve doc markup.
2690 * include/experimental/optional: Improve docs.
2691 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2692 (__constexpr_addressof): Remove.
2693 (optional::operator->()): Use std::__addressof().
2694 * include/std/optional (optional::operator->()): Adjust whitespace.
2695 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2696 that operator-> is still constexpr with overloaded operator&. Change
2697 to compile-only test.
2698 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2701 * include/bits/shared_ptr.h: Improve docs.
2702 * include/bits/shared_ptr_atomic.h: Likewise.
2703 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2705 * include/bits/basic_string.h: Fix iterator/index confusion in
2707 * include/bits/range_access.h: Fix Doxygen warnings.
2708 * include/bits/refwrap.h: Do not document implementation details.
2709 (ref, cref): Group docs with reference_wrapper.
2710 * include/std/fstream: Fix Doxygen markup.
2711 * libsupc++/initializer_list (begin, end): Group docs with
2714 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2716 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2717 * include/std/mutex: Likewise.
2718 * include/std/shared_mutex: Likewise.
2720 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2721 * include/bits/fs_fwd.h: Likewise.
2722 * include/bits/fs_ops.h: Likewise.
2723 * include/bits/fs_path.h: Likewise.
2724 * include/std/filesystem: Likewise.
2726 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2727 * include/experimental/buffer: Likewise.
2728 * include/experimental/executor: Likewise.
2729 * include/experimental/internet: Likewise.
2730 * include/experimental/io_context: Likewise.
2731 * include/experimental/net: Likewise.
2732 * include/experimental/netfwd: Likewise.
2733 * include/experimental/socket: Likewise.
2734 * include/experimental/timer: Likewise.
2736 * doc/doxygen/doxygroups.cc: Move description of experimental group
2738 * include/experimental/algorithm: Add to libfund-ts doc group.
2739 * include/experimental/any: Likewise. Do not document implementation
2741 * include/experimental/array: Add to libfund-ts doc group.
2742 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2743 for Library Fundamentals.
2744 * include/experimental/chrono: Add to libfund-ts doc group.
2745 * include/experimental/deque: Likewise.
2746 * include/experimental/forward_list: Likewise.
2747 * include/experimental/functional: Likewise.
2748 * include/experimental/iterator: Likewise.
2749 * include/experimental/list: Likewise.
2750 * include/experimental/map: Likewise.
2751 * include/experimental/memory: Likewise.
2752 * include/experimental/memory_resource: Likewise. Improve docs.
2754 * include/experimental/numeric: Add to libfund-ts doc group.
2755 * include/experimental/optional: Likewise.
2756 * include/experimental/propagate_const: Likewise.
2757 * include/experimental/random: Likewise.
2758 * include/experimental/ratio: Likewise.
2759 * include/experimental/regex: Likewise.
2760 * include/experimental/set: Likewise.
2761 * include/experimental/source_location: Likewise.
2762 * include/experimental/string: Likewise.
2763 * include/experimental/string_view: Likewise.
2764 * include/experimental/system_error: Likewise.
2765 * include/experimental/tuple: Likewise.
2766 * include/experimental/type_traits: Likewise.
2767 * include/experimental/unordered_map: Likewise.
2768 * include/experimental/unordered_set: Likewise.
2769 * include/experimental/utility: Likewise.
2770 * include/experimental/vector: Likewise.
2771 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2772 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2773 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2775 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2776 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2777 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2778 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2779 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2781 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2782 * include/experimental/bits/fs_fwd.h: Improve docs.
2783 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2784 * include/experimental/bits/fs_path.h: Likewise.
2785 (path, filesystem_error, u8path): Improve docs.
2786 * include/experimental/filesystem: Link to docs for TS.
2788 * config/allocator/new_allocator_base.h (__allocator_base): Add
2789 workaround for Doxygen bug #6945.
2790 * include/std/memory: Improve docs. Define group for pointer safety.
2791 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2792 conditional to suppress documentation for implementation details.
2794 * include/bits/specfun.h: Improve docs.
2795 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2798 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2799 (std::experimental): Add docs.
2800 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2801 namespace to nothing when generating docs.
2802 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2803 * include/std/chrono (std::chrono): Likewise.
2804 * include/std/functional (std::placeholders): Likewise.
2805 * include/std/thread (std::this_thread): Likewise.
2807 * include/parallel/settings.h: Fix Doxygen markup.
2809 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2810 anything unless PB_DS_CLASS_C_DEC is defined.
2811 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2812 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2813 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2814 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2815 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2816 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2817 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2819 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2820 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2821 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2822 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2823 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2824 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2825 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2826 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2827 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2828 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2829 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2831 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2832 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2834 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2837 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2838 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2839 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2842 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2844 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2845 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2846 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2847 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2848 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2849 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2851 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2852 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2855 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2858 * include/std/complex (__complex_proj): Return parameter unchanged.
2859 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2860 floating-point types to take std::complex arguments.
2861 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2862 floating-point types.
2863 * testsuite/26_numerics/complex/proj.cc: New test.
2865 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2867 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2868 to _Lock_policyE[012].
2869 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2871 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2873 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2874 macros accidentally left in.
2875 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2876 unnecessary -lstdc++fs option. Fix test for mingw.
2877 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2880 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2882 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2884 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2886 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2888 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2889 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2892 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2894 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2897 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2898 class template and partial specialization.
2901 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2903 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2904 functions to convert a value to an integral type.
2905 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2906 (fill_n): Convert _Size parameter to an integral type.
2907 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2908 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2909 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2910 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2911 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2912 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2914 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2916 Adding noexcept-specification on tuple constructors (LWG 2899)
2917 * libstdc++-v3/include/std/tuple:
2918 (tuple()): Add noexcept-specification.
2919 (tuple(const _Elements&...)): Likewise
2920 (tuple(_UElements&&...)): Likewise
2921 (tuple(const tuple<_UElements...>&)): Likewise
2922 (tuple(tuple<_UElements...>&&)): Likewise
2923 (tuple(const _T1&, const _T2&)): Likewise
2924 (tuple(_U1&&, _U2&&)): Likewise
2925 (tuple(const tuple<_U1, _U2>&): Likewise
2926 (tuple(tuple<_U1, _U2>&&): Likewise
2927 (tuple(const pair<_U1, _U2>&): Likewise
2928 (tuple(pair<_U1, _U2>&&): Likewise
2929 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2931 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2934 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2935 arguments with __restrict.
2937 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2939 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2941 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2943 * include/experimental/bits/fs_path.h
2944 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2945 avoid redundant call to _S_convert_loc with non-const pointers.
2947 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2948 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2949 * testsuite/21_strings/basic_string/hash/hash.cc
2950 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2951 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2952 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2954 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2955 wstring::_M_replace_dispatch with more specific patterns.
2956 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2957 Create const std::string to avoid redundant call to _S_convert_loc
2958 with non-const pointers.
2959 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2960 avoid unnecessary basic_string::assign instantiations.
2962 * include/std/memory (__uses_alloc_args): Add string-literal to
2963 static_assert, to match the one in __uses_alloc.
2964 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2965 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2966 for recursive uses-allocator construction of nested pairs.
2967 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2970 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2972 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2973 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2974 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2975 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2977 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2978 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2979 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2980 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2981 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2982 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2983 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2985 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2988 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2989 * include/std/scoped_allocator [__cplusplus > 201703L]
2990 (scoped_allocator_adaptor::construct): Define in terms of
2991 uses_allocator_construction_args, as per P0591R4.
2992 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2993 * testsuite/util/testsuite_allocator.h: Remove name of unused
2996 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2998 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2999 * doc/html/*: Regenerate.
3001 * include/bits/fs_path.h (operator<, operator<=, operator>)
3002 (operator>=, operator==, operator!=): Make hidden friends, as per
3004 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3005 string type in test.
3006 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3008 * include/std/any (any::any(ValueType&&)): Use __and_v.
3009 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3012 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3014 * include/std/type_traits (__result_of_memfun): Use remove_reference
3015 instead of __remove_cvref_t and remove redundant is_same check.
3016 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3018 * include/experimental/string_view (basic_string_view::pointer)
3019 (basic_string_view::reference): Fix to refer to non-const value_type.
3020 * include/bits/basic_string.h (basic_string): Use __sv_check and
3021 __sv_limit instead of basic_string_view::_M_check and
3022 basic_string_view::_M_limit.
3023 * include/std/string_view (__sv_check, __sv_limit): New
3024 helper functions to replace basic_string_view::_M_check and
3025 basic_string_view::_M_limit.
3026 (basic_string_view): Add static assertions to enforce ill-formed
3027 requirement for traits_type::char_type from P1148R0, and to enforce
3028 required properties of char-like types.
3029 (basic_string_view::pointer, basic_string_view::reference): Fix to
3030 refer to non-const value_type.
3031 (basic_string_view::operator[], basic_string_view::at)
3032 (basic_string_view::front, basic_string_view::back)
3033 (basic_string_view::data): Use const_reference and const_pointer
3034 typedefs for return types.
3035 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3036 (hash<wstring_view>): Fix argument_type typedef.
3037 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3038 char/1.cc: Fix expected return type of basic_string_view::data().
3039 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3040 wchar_t/1.cc: Likewise.
3041 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3042 char/1.cc: Likewise.
3043 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3044 wchar_t/1.cc: Likewise.
3045 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3047 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3048 Check reference and pointer typedefs.
3049 * testsuite/experimental/string_view/requirements/typedefs.cc:
3051 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3052 Fix expected return type of basic_string_view::data().
3053 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3055 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3057 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3061 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3062 Avoid a runtime check for types that can never be stored in std::any.
3063 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3066 PR libstdc++/90220 (partial)
3067 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3068 not attempt ill-formed static_cast to pointers to non-object types.
3069 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3072 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3073 prevent -Wcatch-value warning.
3075 * include/std/variant (__variant_construct): Use template parameter
3076 type instead of equivalent decltype-specifier.
3077 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3078 Replace forward with move.
3079 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3080 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3081 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3082 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3083 index after construction succeeds.
3084 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3085 if-constexpr checks that are always true. Use __remove_cvref_t instead
3086 of remove_reference so that is_nothrow_move_constructible check
3087 doesn't use a const rvalue parameter. In the potentially-throwing case
3088 construct a temporary and move assign it, as per LWG 2904.
3089 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3090 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3091 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3092 construct a temporary and move assign from it, as per LWG 2904.
3093 * testsuite/20_util/variant/exception_safety.cc: Check that
3094 assignment operators have strong exception safety guarantee.
3096 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3098 Document PSTL linker flags
3100 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3102 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3104 * include/std/variant (__detail::__variant::_Traits): Make
3105 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3106 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3108 (__detail::__variant::_Copy_assign_alias): Only depend on
3109 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3110 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3111 move assignment operators.
3114 * include/std/variant (variant::__not_self): New helper for the
3115 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3116 (variant::__to_type_impl): Remove.
3117 (variant::__to_type): Add default argument to check pack size, instead
3118 of using __to_type_impl.
3119 (variant::__accepted_type): Add default argument using __not_self.
3120 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3121 for variant(T&&) constructor constraint.
3122 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3123 Extract __accepted_type into a named template parameter for reuse in
3124 other constraints and in the exception specification.
3125 (variant::variant(in_place_type_t<T>, Args&&...))
3126 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3127 (variant::variant(in_place_index_t<T>, Args&&...))
3128 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3129 (variant::operator=T&&)): Remove redundant && from trait arguments.
3130 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3131 isn't used for in_place_type or in_place_index arguments.
3133 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3134 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3135 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3137 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3138 Bernd Edlinger <bernd.edlinger@hotmail.de>
3139 Jakub Jelinek <jakub@redhat.com>
3142 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3143 general-regs-only target attribute for ARM.
3145 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3148 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3149 specialization also depend on is_nothrow_move_constructible.
3150 * include/std/variant (__detail::__variant::__never_valueless()):
3151 Only true if the variant would have a move assignment operator.
3152 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3153 Check __never_valueless<T...>().
3154 (variant::emplace): Only perform non-throwing move assignments
3155 for never-valueless alternatives if the variant has a move assignment
3157 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3158 types can be emplaced into non-assignable variants.
3159 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3160 don't get copied when emplaced into non-assignable variants.
3162 * include/std/variant (__detail::__variant::__ref_cast): Remove
3164 (__detail::__variant::_Uninitialized::_M_get)
3165 (__detail::__variant::__get)
3166 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3168 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3170 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3172 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3173 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3174 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3175 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3177 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3179 Delegate PSTL configuration to pstl/pstl_config.h
3181 * include/bits/c++config: Remove explicit PSTL configuration
3182 macros and use definitions from <pstl/pstl_config.h>.
3184 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3186 Cleanup algorithm implementations
3187 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3189 (mismatch): Forward execution policy.
3190 (equal): Qualify call to std::equal().
3191 (partial_sort): Forward execution policy.
3192 (inplace_merge): Forward execution policy.
3194 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3196 Improve implementation of parallel equal()
3197 * include/pstl/algorithm_impl.h
3198 (__internal::__brick_equal): use "4 iterator" version of
3200 (__internal::__brick_equal): use simd for random access
3201 iterators on unsequenced execution policies.
3202 (__internal::__pattern_equal): add "4 iterator" version
3203 (__internal::__pattern_equal): dispatch to simd __brick_equal
3204 for vector-only execution policies.
3205 (__internal::__pattern_equal): dispatch to __parallel_or for
3206 parallel execution policies.
3207 * include/pstl/glue_algorithm_impl.h
3208 (std::equal): dispatch to "4 iterator" version of
3209 __internal::__pattern_equal().
3211 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3214 * include/bits/forward_list.h (operator==): Do not use operator!= to
3216 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3217 earlier in the list, so that sort is stable.
3218 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3219 * testsuite/23_containers/forward_list/comparable.cc: Test with
3220 types that meet the minimum EqualityComparable and LessThanComparable
3221 requirements. Remove irrelevant comment.
3223 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3224 Do not depend on whether all alternative types are move constructible.
3225 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3226 from the operand when deciding whether to perform the assignment.
3227 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3228 with deleted move constructor and deleted move assignment operator.
3229 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3230 behaviour of variants with DeletedMoves as an alternative.
3231 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3232 (move_ctor, move_assign): Check that moving a variant with a
3233 DeletedMoves alternative falls back to copying instead of moving.
3235 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3236 from static_assert declarations.
3238 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3239 actually match its name.
3240 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3241 (test_swap()): Fix result for MoveCtorOnly and check
3242 MoveCtorAndSwapOnly.
3244 * include/std/optional (optional::value_or(U&&) &&): Add missing
3245 constexpr specifier.
3246 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3247 for disengaged optionals and rvalue optionals.
3248 * testsuite/20_util/optional/observers/4.cc: Likewise.
3250 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3252 * include/pstl/algorithm_impl.h: Uglify identfiers.
3253 * include/pstl/numeric_impl.h: Uglify identfiers.
3254 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3256 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3258 * include/bits/c++config:
3259 Add definition for __PSTL_ASSERT.
3260 Add definition for __PSTL_ASSERT_MSG.
3261 * include/pstl/algorithm_impl.h: Replace use of assert().
3262 * include/pstl/numeric_impl.h: Replace use of assert().
3263 * include/pstl/parallel_backend_tbb.h:
3264 Replace use of assert().
3265 Replace use of __TBB_ASSERT().
3266 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3268 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3271 * src/c++17/memory_resource.cc
3272 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3273 needed to allow placing a _Chunk at the end of the buffer.
3274 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3276 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3278 * doc/xml/faq.xml: Add information about emergency EH pool.
3279 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3280 Move outdated information on mt_allocator to a separate section.
3281 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3282 doesn't affect the default allocator.
3284 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3288 * testsuite/20_util/variant/89851.cc: New test.
3290 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3292 * include/std/variant: Adjust whitespace. Add comments.
3293 (_Multi_array): Leave primary template undefined.
3294 (_Multi_array<_Tp>): Define partial specialization for base case of
3296 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3297 which is always a reference.
3298 (__gen_vtable::_S_apply()): Remove function, inline body into
3299 default member initializer.
3300 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3302 * include/std/variant (__variant_idx_cookie): Add member type.
3303 (__visitor_result_type): Remove.
3304 (__do_visit): Use invoke_result instead of __visitor_result_type.
3305 * testsuite/20_util/variant/visit.cc: New test.
3308 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3310 * testsuite/20_util/variant/90008.cc: New test.
3312 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3314 * include/pstl/algorithm_impl.h: Add namespace qualification.
3315 * include/pstl/execution_defs.h: Add namespace qualification.
3316 * include/pstl/execution_impl.h: Add namespace qualification.
3317 * include/pstl/numeric_impl.h: Add namespace qualification.
3318 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3319 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3320 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3322 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3324 Fix visit<R> for variant.
3325 * include/std/variant (__do_visit): Add a template parameter
3326 for enforcing same return types for visit.
3327 (__gen_vtable_impl): Likewise.
3328 (_S_apply_single_alt): Adjust.
3329 (__visit_invoke_impl): New. Handle casting to void.
3330 (__do_visit_invoke): New. Enforces same return types.
3331 (__do_visit_invoke_r): New. Converts return types.
3332 (__visit_invoke): Adjust.
3333 (__gen_vtable): Add a template parameter for enforcing
3334 same return types for visit.
3335 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3336 different return types.
3337 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3338 visitors with different return types don't accidentally
3339 compile with regular visitation.
3341 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3343 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3344 dg-require-filesystem-ts.
3346 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3348 * doc/xml/manual/status_cxx2020.xml: Update status.
3349 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3350 * testsuite/20_util/variant/visit_r.cc: New test.
3352 * include/bits/fs_dir.h (directory_iterator::operator*)
3353 (directory_iterator::operator->): Add noexcept.
3354 (operator==, operator!=): Replace namespace-scope equality operators
3355 for directory iterators with hidden friends.
3358 * config/abi/pre/gnu.ver: Add missing exports.
3359 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3362 * config/abi/pre/gnu.ver: Export new symbols.
3363 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3364 (recursive_directory_iterator::recursion_pending())
3365 (recursive_directory_iterator::disable_recursion_pending()): Remove
3366 inline definitions. Make noexcept.
3367 (recursive_directory_iterator::depth())
3368 (recursive_directory_iterator::operator*())
3369 (recursive_directory_iterator::operator->()): Make noexcept.
3370 (recursive_directory_iterator::_M_options)
3371 (recursive_directory_iterator::_M_pending): Remove data members.
3372 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3373 (recursive_directory_iterator::recursive_directory_iterator): Remove
3374 ctor-initializer. Use new constructor for _Dir_stack.
3375 (recursive_directory_iterator::options())
3376 (recursive_directory_iterator::recursion_pending())
3377 (recursive_directory_iterator::disable_recursion_pending()): Add
3378 non-inline definitions.
3379 (recursive_directory_iterator::depth()): Make noexcept.
3380 (recursive_directory_iterator::increment(error_code&))
3381 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3382 location of options and recursion_pending members.
3383 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3384 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3385 user-declared move constructor and assignment operator, to make the
3388 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3389 d_type == DT_UNKNOWN immediately.
3390 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3392 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3394 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3396 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3397 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3400 PR libstdc++/87431 (again)
3401 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3402 Define partial specialization for basic_string.
3403 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3404 shared_ptr and weak_ptr.
3405 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3407 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3409 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3411 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3413 * include/std/any (_Never_valueless_alt): Define explicit
3414 specialization for any.
3415 * include/std/variant (_Never_valueless_alt): Define primary template.
3416 (__never_valueless): Use _Never_valueless_alt instead of
3417 is_trivially_copyable.
3418 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3419 initializations to avoid try-catch overhead. Add special case for
3420 scalars produced by potentially-throwing conversions. Use
3421 _Never_valueless_alt instead of is_trivially_copyable for the
3422 remaining strong exception-safety cases.
3423 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3424 * testsuite/20_util/variant/87431.cc: Run both test functions.
3425 * testsuite/20_util/variant/exception_safety.cc: New test.
3426 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3427 so the variant becomes valueless.
3429 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3432 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3434 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3436 * include/std/string (__hash_string_base): New class template defining
3437 operator() for hashing strings.
3438 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3439 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3440 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3441 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3443 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3445 Use single-visitation in variant assignment and swap and relops.
3446 Also use indices instead of types when checking whether
3447 variants hold the same thing.
3448 * include/std/variant (__do_visit): Add a template parameter
3449 for index visitation, invoke with indices if index visitation
3451 (__variant_idx_cookie): New.
3452 (__visit_with_index): Likewise.
3453 (_Copy_assign_base::operator=): Do single-visitation with
3455 (_Move_assign_base::operator=): Likewise.
3456 (_Extra_visit_slot_needed): Adjust.
3457 (__visit_invoke): Call with indices if it's an index visitor.
3458 (relops): Do single-visitation with an index visitor.
3460 (__visitor_result_type): New.
3462 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3464 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3466 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3468 Don't revisit a variant we are already visiting.
3469 * include/std/variant (__variant_construct_single): New.
3470 (__variant_construct): Use it.
3471 (_M_destructive_move): Likewise.
3472 (_M_destructive_copy): Likewise.
3473 (_Copy_assign_base::operator=): Adjust.
3474 (_Move_assign_base::operator=): Likewise.
3477 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3480 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3481 destructor so they are not evaluated until the _Key type is complete.
3482 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3483 * testsuite/23_containers/set/85965.cc: New test.
3484 * testsuite/23_containers/unordered_set/85965.cc: New test.
3485 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3486 with regexp matching the corresponding _Rb_tree specialization.
3487 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3488 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3489 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3490 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3491 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3492 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3493 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3495 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3498 Fix based on a suggestion by Antony Polukhin.
3499 * include/std/variant (__never_valueless): New.
3501 (_Extra_visit_slot_needed): New.
3502 (_Multi_array): Use it.
3503 (_S_apply_all_alts): Likewise.
3505 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3508 Fix based on a suggestion by Antony Polukhin.
3509 * include/std/variant (__gen_vtable): Don't reserve an
3510 additional table slot, _Multi_array already does that.
3512 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3515 Fix based on a suggestion by Antony Polukhin.
3516 * include/std/variant (__variant_construct): Capture a pointer
3517 to the storage and visit just one variant.
3519 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3521 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3522 Doxygen-generated pages with unstable URL.
3523 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3524 * doc/xml/manual/extensions.xml: Likewise.
3525 * doc/xml/manual/parallel_mode.xml: Likewise.
3526 * doc/xml/manual/support.xml: Likewise.
3528 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3529 avoid -Wconversion warnings.
3531 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3533 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3534 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3535 (allstamped): Add stamp-pstl.
3536 (install-headers): Add ptsl_builddir.
3537 * include/Makefile.in: Regenerate.
3538 * include/bits/c++config: Add pstl configuration.
3539 * include/pstl/LICENSE.txt: New file.
3540 * include/pstl/algorithm_fwd.h: New file.
3541 * include/pstl/algorithm_impl.h: New file.
3542 * include/pstl/execution_defs.h: New file.
3543 * include/pstl/execution_impl.h: New file.
3544 * include/pstl/glue_algorithm_defs.h: New file.
3545 * include/pstl/glue_algorithm_impl.h: New file.
3546 * include/pstl/glue_execution_defs.h: New file.
3547 * include/pstl/glue_memory_defs.h: New file.
3548 * include/pstl/glue_memory_impl.h: New file.
3549 * include/pstl/glue_numeric_defs.h: New file.
3550 * include/pstl/glue_numeric_impl.h: New file.
3551 * include/pstl/memory_impl.h: New file.
3552 * include/pstl/numeric_fwd.h: New file.
3553 * include/pstl/numeric_impl.h: New file.
3554 * include/pstl/parallel_backend.h: New file.
3555 * include/pstl/parallel_backend_tbb.h: New file.
3556 * include/pstl/parallel_backend_utils.h: New file.
3557 * include/pstl/parallel_impl.h: New file.
3558 * include/pstl/pstl_config.h: New file.
3559 * include/pstl/unseq_backend_simd.h: New file.
3560 * include/pstl/utils.h: New file.
3561 * include/std/algorithm: Include parallel algorithm implementations.
3562 * include/std/execution: New file.
3563 * include/std/memory: Include parallel algorithm implementations.
3564 * include/std/numeric: Include parallel algorithm implementations.
3565 * include/std/version: Add parallel algorithms feature test macro.
3566 * testsuite/util/pstl/pstl_test_config.h: New file.
3567 * testsuite/util/pstl/test_utils.h: New file.
3568 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3569 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3570 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3571 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3572 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3573 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3574 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3575 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3576 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3577 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3578 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3579 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3580 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3581 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3582 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3583 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3584 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3585 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3586 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3587 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3588 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3589 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3590 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3591 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3592 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3593 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3594 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3595 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3596 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3597 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3598 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3599 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3600 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3601 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3602 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3603 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3604 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3605 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3606 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3607 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3608 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3609 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3610 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3611 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3612 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3613 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3614 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3615 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3616 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3617 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3618 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3619 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3620 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3621 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3622 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3623 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3624 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3625 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3626 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3627 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3628 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3629 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3630 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3631 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3632 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3633 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3634 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3635 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3636 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3637 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3638 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3639 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3640 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3641 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3642 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3643 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3644 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3645 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3646 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3647 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3648 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3649 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3650 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3651 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3652 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3653 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3654 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3655 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3656 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3657 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3658 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3659 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3660 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3661 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3662 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3663 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3664 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3665 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3666 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3667 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3668 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3669 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3670 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3671 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3672 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3673 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3675 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3677 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3678 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3679 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3680 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3681 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3682 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3683 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3684 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3685 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3686 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3687 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3688 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3689 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3690 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3691 when the special functions IS is enabled, not for C++17.
3692 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3694 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3695 without checks for special functions in C++17.
3696 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3700 * include/backward/hash_map: Use <> for includes not "".
3701 * include/backward/hash_set: Likewise.
3702 * include/backward/strstream: Likewise.
3703 * include/tr1/bessel_function.tcc: Likewise.
3704 * include/tr1/exp_integral.tcc: Likewise.
3705 * include/tr1/legendre_function.tcc: Likewise.
3706 * include/tr1/modified_bessel_func.tcc: Likewise.
3707 * include/tr1/riemann_zeta.tcc: Likewise.
3709 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3711 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3712 of extension allocators.
3713 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3714 Document new headers in 7.2, 8.1 and 9.1 releases.
3715 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3716 * doc/html/*: Regenerate.
3718 2019-03-12 John David Anglin <dave.anglin@bell.net>
3721 * testsuite/lib/libstdc++.exp: Locate libatomic.
3722 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3723 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3725 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3726 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3727 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3728 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3730 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3733 * configure.ac: Check for sockatmark.
3734 * crossconfig.m4: Check for sockatmark.
3735 * config.h.in: Regenerate.
3736 * configure: Regenerate.
3737 * include/experimental/internet (address_v4::_S_hton): Rename
3738 overloaded functions to _S_hton_16 and _S_ntoh_16.
3739 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3740 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3741 * include/experimental/socket (basic_socket::at_mark): Check
3742 _GLIBCXX_HAVE_SOCKATMARK.
3744 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3745 const variables instead of macros.
3748 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3749 Use correct type for len_aligned.
3750 * testsuite/20_util/hash/89629.cc: New test.
3752 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3755 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3756 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3757 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3758 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3759 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3760 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3761 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3762 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3763 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3764 memory_order_seq_cst to int.
3766 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3768 * doc/xml/manual/using.xml: Use link element instead of xref.
3769 * doc/html/*: Regenerate.
3771 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3773 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3776 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3777 parameters in deduction guides.
3778 * include/debug/multimap.h (multimap): Likewise.
3779 * include/debug/set.h (multimap): Likewise.
3780 * include/debug/multiset.h (multimap): Likewise.
3781 * include/debug/unordered_map (unordered_map): Likewise.
3782 (unordered_multimap): Likewise.
3783 * include/debug/unordered_set (unordered_set): Likewise.
3784 (unordered_multiset): Likewise.
3787 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3788 Invalidate all iterators in case of rehash.
3789 (unordered_multimap<>::_M_check_rehashed): Likewise.
3790 * include/debug/unordered_set
3791 (unordered_set<>::_M_check_rehashed): Likewise.
3792 (unordered_multiset<>::_M_check_rehashed): Likewise.
3793 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3795 2019-03-07 Andreas Schwab <schwab@suse.de>
3797 * config/abi/post/riscv64-linux-gnu: New directory.
3798 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3800 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3802 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3803 compile test to run. Fix typo.
3805 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3806 * doc/html/*: Regenerate.
3808 P0356R5 Simplified partial function application
3809 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3810 helpers for bind_front.
3811 (bind_front, __cpp_lib_bind_front): Define.
3812 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3814 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3816 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3817 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3818 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3819 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3821 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3823 PR libstdc++/86655 - std::assoc_legendre should not constrain
3824 the value of m (or x).
3825 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3826 __sph_legendre): If degree > order Don't throw, return 0.
3827 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3828 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3829 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3830 * testsuite/tr1/5_numerical_facilities/special_functions/
3831 02_assoc_legendre/pr86655.cc: New test.
3832 * testsuite/tr1/5_numerical_facilities/special_functions/
3833 22_sph_legendre/pr86655.cc: New test.
3835 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3838 Also PR libstdc++/85517
3839 * include/std/variant (__do_visit): New.
3840 (__variant_cast): Likewise.
3841 (__variant_cookie): Likewise.
3842 (__erased_*): Remove.
3843 (_Variant_storage::_S_vtable): Likewise.
3844 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3845 (_Variant_storage::__M_reset): Adjust.
3846 (__variant_construct): New.
3847 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3848 __variant_construct.
3849 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3850 (_Move_ctor_base::__M_destructive_copy): New.
3851 (_Move_ctor_base::__M_destructive_move): Adjust to use
3852 __variant_construct.
3853 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3854 (_Copy_assign_alias): Adjust to check both copy assignment
3855 and copy construction for triviality.
3856 (_Move_assign_base::operator=): Adjust to use __do_visit.
3857 (_Multi_array): Add support for visitors that accept and return
3859 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3860 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3861 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3862 a __variant_cookie temporary for a variant that is valueless and..
3863 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3864 (__gen_vtable::_Array_type): Conditionally make space for
3865 the __variant_cookie visitor case.
3866 (__variant_construct_by_index): New.
3867 (get_if): Adjust to use std::addressof.
3868 (relops): Adjust to use __do_visit.
3869 (variant): Add __variant_cast and __variant_construct_by_index
3871 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3872 instead of self-destruction.
3873 (variant::swap): Adjust to use __do_visit.
3874 (visit): Reimplement in terms of __do_visit.
3875 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3876 * testsuite/20_util/variant/compile.cc: Adjust.
3877 * testsuite/20_util/variant/run.cc: Likewise.
3879 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3881 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3883 * testsuite/experimental/feat-char8_t.cc: Likewise.
3885 * include/std/type_traits [C++20] (is_bounded_array)
3886 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3888 * testsuite/20_util/is_bounded_array/requirements/
3889 explicit_instantiation.cc: New test.
3890 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3892 * testsuite/20_util/is_bounded_array/value.cc: New test.
3893 * testsuite/20_util/is_unbounded_array/requirements/
3894 explicit_instantiation.cc: New test.
3895 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3897 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3899 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3901 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3903 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3905 * include/c_compatibility/math.h [C++20] (lerp): Add using
3907 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3908 (__lerp): Define function template to implement lerp.
3909 (lerp(float, float, float), lerp(double, double, double))
3910 (lerp(long double, long double, long double)): Define for C++20.
3911 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3912 (midpoint(T, T), midpoint(T*, T*)): Define.
3913 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3914 * testsuite/26_numerics/lerp.cc: New test.
3915 * testsuite/26_numerics/midpoint/floating.cc: New test.
3916 * testsuite/26_numerics/midpoint/integral.cc: New test.
3917 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3919 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3921 PR libstdc++/88996 Implement P0439R0
3922 Make std::memory_order a scoped enumeration.
3923 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3924 add variables for the old enumerators. Adjust calls.
3925 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3926 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3928 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3930 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3933 * include/std/memory_resource (polymorphic_allocator): Add default
3934 template argument for C++20.
3935 (polymorphic_allocator::allocate_bytes)
3936 (polymorphic_allocator::deallocate_bytes)
3937 (polymorphic_allocator::allocate_object)
3938 (polymorphic_allocator::deallocate_object)
3939 (polymorphic_allocator::new_object)
3940 (polymorphic_allocator::delete_object): New member functions for
3942 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3945 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3948 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3951 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3953 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3954 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3956 * include/std/memory (uses_allocator_construction_args): New set of
3957 overloaded functions.
3958 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3960 * include/std/memory_resource (polymorphic_allocator::construct)
3961 [__cplusplus > 201703l]: Replace all overloads with a single function
3962 using uses_allocator_construction_args.
3963 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3965 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3967 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3970 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3971 stylesheet directories before check for xsltproc. Try to use
3972 xmlcatalog to find local stylesheet directory before trying hardcoded
3973 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3974 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3975 use xsltproc if xmlcatalog fails to find a local stylesheet.
3976 * configure.ac: Check for xmlcatalog.
3977 * Makefile.in: Regenerate.
3978 * configure: Likewise.
3979 * doc/Makefile.in: Likewise.
3980 * include/Makefile.in: Likewise.
3981 * libsupc++/Makefile.in: Likewise.
3982 * po/Makefile.in: Likewise.
3983 * python/Makefile.in: Likewise.
3984 * src/Makefile.in: Likewise.
3985 * src/c++11/Makefile.in: Likewise.
3986 * src/c++17/Makefile.in: Likewise.
3987 * src/c++98/Makefile.in: Likewise.
3988 * src/filesystem/Makefile.in: Likewise.
3989 * testsuite/Makefile.in: Likewise.
3991 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3994 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3995 container deduction guides.
3996 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3997 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3998 parameters in deduction guides.
3999 * include/bits/stl_multimap.h (multimap): Likewise.
4000 * include/bits/stl_multiset.h (multiset): Likewise.
4001 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4002 * include/bits/stl_set.h (set): Likewise.
4003 * include/bits/stl_stack.h (stack): Likewise.
4004 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4005 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4006 constrain parameters in deduction guides.
4007 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4009 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4011 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4012 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4013 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4014 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4016 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4018 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4021 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4022 to class template and partial specialization using void_t.
4023 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4025 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4028 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4029 copy and move members public.
4031 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4033 * include/std/type_traits (__underlying_type_impl): New helper to
4034 make underlying_type SFINAE-friendly.
4035 (underlying_type): Derive from __underlying_type_impl.
4036 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4040 * include/bits/char_traits.h (__constant_char_array): Check index is
4041 in range before dereferencing.
4042 (char_traits<char>::compare, char_traits<char>::find)
4043 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4044 immediately if n is zero.
4045 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4046 Remove workarounds for PR 67026.
4047 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4049 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4052 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4054 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4055 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4057 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4060 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4061 type to std::size_t and argument to type to long double.
4063 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4065 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4066 * config/abi/post/sparc64-linux-gnu: New directory.
4067 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4068 * config/abi/post/sparc64-linux-gnu/32: New directory.
4069 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4071 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4073 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4074 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4077 2019-02-22 Tom Honermann <tom@honermann.net>
4079 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4080 printers for u8string and u8string_view.
4082 2019-02-22 Tom Honermann <tom@honermann.net>
4084 * testsuite/18_support/byte/ops.cc: Validate
4085 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4086 std::to_integer<char32_t>.
4087 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4088 std::numeric_limits<char8_t>.
4089 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4090 std::numeric_limits<char8_t>::lowest().
4091 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4092 std::numeric_limits<char8_t>::max_digits10.
4093 * testsuite/18_support/type_info/fundamental.cc: Validate
4094 typeinfo for char8_t.
4095 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4096 std::from_chars with char8_t.
4097 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4098 Validate explicit instantiation of std::hash<char8_t>.
4099 * testsuite/20_util/is_integral/value.cc: Validate
4100 std::is_integral<char8_t>.
4101 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4102 Validate std::make_signed<char8_t>.
4103 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4104 Validate u8string construction from char8_t sources.
4105 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4107 * testsuite/21_strings/basic_string_view/operations/compare/
4108 char/70483.cc: Validate substr operations on u8string_view.
4109 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4110 the u8string_view typedef is defined.
4111 * testsuite/21_strings/char_traits/requirements/
4112 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4114 * testsuite/21_strings/char_traits/requirements/
4115 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4116 constexpr member functions.
4117 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4118 that the u8string typedef is defined.
4119 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4120 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4121 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4122 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4124 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4125 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4127 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4128 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4129 Validate std::atomic<char8_t>::is_always_lock_free
4130 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4131 Update line numbers.
4132 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4134 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4136 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4137 Validate std::experimental::pmr::u8string.
4138 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4139 u8string_view typedef is defined.
4140 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4141 char32_t to the typelists.
4143 2019-02-22 Tom Honermann <tom@honermann.net>
4145 * include/ext/typelist.h: Constrain a partial specialization of
4146 typelist::detail::append_ to only match chain<T1,T2>.
4148 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4151 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4152 class template with class. Replace move and copy member types with
4153 member alias templates, so they are only instantiated when needed.
4154 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4155 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4156 test for C++11/14/17 as well.
4157 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4160 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4163 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4164 _GLIBCXX_PURE to the alias declaration.
4166 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4168 * testsuite/21_strings/basic_string/literals/types.cc
4169 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4170 * testsuite/21_strings/basic_string/literals/values.cc
4171 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4172 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4173 potentially having different type.
4174 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4175 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4177 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4178 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4179 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4180 string literals only using basic character set.
4181 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4182 u8 literals to char.
4183 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4184 Test ATOMIC_CHAR8_T_LOCK_FREE.
4185 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4186 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4187 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4188 * testsuite/experimental/string_view/literals/types.cc
4189 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4191 * testsuite/experimental/string_view/literals/values.cc
4192 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4194 2019-02-19 Tom Honermann <tom@honermann.net>
4196 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4197 from char16_32_t.cc; validates numeric_limits<char8_t>.
4198 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4199 test cloned from types.cc; validates operator""s for char8_t
4201 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4202 test cloned from values.cc; validates construction and comparison
4204 * testsuite/21_strings/basic_string/requirements/
4205 /explicit_instantiation/char8_t/1.cc: New test cloned from
4206 char16_t/1.cc; validates explicit instantiation of
4207 basic_string<char8_t>.
4208 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4209 New test cloned from types.cc; validates operator""sv for char8_t
4210 returns u8string_view.
4211 * testsuite/21_strings/basic_string_view/literals/
4212 values-char8_t.cc: New test cloned from values.cc; validates
4213 construction and comparison of u8string_view values.
4214 * testsuite/21_strings/basic_string_view/requirements/
4215 explicit_instantiation/char8_t/1.cc: New test cloned from
4216 char16_t/1.cc; validates explicit instantiation of
4217 basic_string_view<char8_t>.
4218 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4219 New test cloned from char16_t/65049.cc; validates that
4220 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4221 * testsuite/21_strings/char_traits/requirements/char8_t/
4222 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4223 that char_traits<char8_t> member typedefs are present and correct.
4224 * testsuite/21_strings/char_traits/requirements/
4225 explicit_instantiation/char8_t/1.cc: New test cloned from
4226 char16_t/1.cc; validates explicit instantiation of
4227 char_traits<char8_t>.
4228 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4229 from char16_t.cc: validates
4230 codecvt<char16_t, char8_t, mbstate_t>.
4231 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4232 from char32_t.cc: validates
4233 codecvt<char32_t, char8_t, mbstate_t>.
4234 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4235 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4236 codecvt<char32_t, char8_t, std::mbstate_t>.
4237 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4238 test cloned from string.cc; validates filesystem::path construction
4240 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4241 the __cpp_lib_char8_t feature test macro is defined with the
4243 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4244 New test cloned from string.cc; validates filesystem::path
4245 construction from char8_t input.
4246 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4247 test cloned from types.cc; validates operator""sv for char8_t
4248 returns u8string_view.
4249 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4250 New test cloned from values.cc; validates construction and
4251 comparison of u8string_view values.
4252 * testsuite/experimental/string_view/requirements/
4253 explicit_instantiation/char8_t/1.cc: New test cloned from
4254 char16_t/1.cc; validates explicit instantiation of
4255 basic_string_view<char8_t>.
4256 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4257 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4260 2019-02-19 Tom Honermann <tom@honermann.net>
4262 P0482R5 char8_t: Standard library support
4263 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4264 typeinfo symbols for char8_t.
4265 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4266 (GLIBCXX_3.4.26): Add symbols for specializations of
4267 numeric_limits and codecvt that involve char8_t.
4268 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4269 * include/bits/atomic_base.h: Add atomic_char8_t.
4270 * include/bits/basic_string.h: Add std::hash<u8string> and
4271 operator""s(const char8_t*, size_t).
4272 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4274 * include/bits/char_traits.h: Add char_traits<char8_t>.
4275 * include/bits/codecvt.h: Add
4276 codecvt<char16_t, char8_t, mbstate_t>,
4277 codecvt<char32_t, char8_t, mbstate_t>,
4278 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4279 codecvt_byname<char32_t, char8_t, mbstate_t>.
4280 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4281 recognize char8_t as an integral type.
4282 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4284 (path::u8string): Return std::u8string when char8_t support is
4286 (path::generic_u8string): Likewise.
4287 (path::_S_convert): Handle conversion from char8_t input.
4288 (path::_S_str_convert): Likewise.
4289 * include/bits/functional_hash.h: Add hash<char8_t>.
4290 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4292 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4293 for new char8_t specializations.
4294 * include/bits/localefwd.h: Add missing declarations of
4295 codecvt<char16_t, char, mbstate_t> and
4296 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4297 codecvt<char16_t, char8_t, mbstate_t> and
4298 codecvt<char32_t, char8_t, mbstate_t>.
4299 * include/bits/postypes.h: Add u8streampos
4300 * include/bits/stringfwd.h: Add declarations of
4301 char_traits<char8_t> and u8string.
4302 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4303 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4305 (path::u8string): Return std::u8string when char8_t support is
4307 (path::generic_u8string): Likewise.
4308 (path::_S_convert): Handle conversion from char8_t input.
4309 (path::_S_str_convert): Likewise.
4310 * include/experimental/string: Add u8string.
4311 * include/experimental/string_view: Add u8string_view,
4312 hash<experimental::u8string_view>, and
4313 operator""sv(const char8_t*, size_t).
4314 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4315 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4316 as a character type.
4317 * include/std/limits: Add numeric_limits<char8_t>.
4318 * include/std/string_view: Add u8string_view,
4319 hash<experimental::u8string_view>, and
4320 operator""sv(const char8_t*, size_t).
4321 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4322 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4323 * libsupc++/atomic_lockfree_defines.h: Define
4324 ATOMIC_CHAR8_T_LOCK_FREE.
4325 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4326 codecvt.cc and limits.cc so that char8_t specializations of
4327 numeric_limits and codecvt and emitted.
4328 * src/c++11/Makefile.in: Likewise.
4329 * src/c++11/codecvt.cc: Define members of
4330 codecvt<char16_t, char8_t, mbstate_t>,
4331 codecvt<char32_t, char8_t, mbstate_t>,
4332 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4333 codecvt_byname<char32_t, char8_t, mbstate_t>.
4334 * src/c++11/limits.cc: Define members of
4335 numeric_limits<char8_t>.
4336 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4337 locale_init.cc and localename.cc.
4338 * src/c++98/Makefile.in: Likewise.
4339 * src/c++98/locale_init.cc: Add initialization for the
4340 codecvt<char16_t, char8_t, mbstate_t> and
4341 codecvt<char32_t, char8_t, mbstate_t> facets.
4342 * src/c++98/localename.cc: Likewise.
4343 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4345 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4347 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4348 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4349 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4351 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4353 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4354 * doc/html/*: Regenerate.
4356 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4357 * doc/html/*: Regenerate.
4359 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4360 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4361 allocator type in is_constructible checks.
4362 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4363 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4364 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4365 problematic type from LWG 2586 discussion.
4366 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4367 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4369 * configure.ac: Check for C11 timespec_get function.
4370 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4372 * config.h.in: Regenerate.
4373 * configure: Regenerate.
4374 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4375 std for C++17 and up.
4377 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4378 * include/bits/stl_queue.h
4379 (priority_queue(const Compare&, const Container&, const Alloc&))
4380 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4382 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4384 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4385 * include/bits/stl_queue.h (queue, priority_queue): Add static
4386 assertions to enforce LWG 2566 requirement on value_type.
4387 * include/bits/stl_stack.h (stack): Likewise.
4390 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4392 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4393 * include/bits/std_abs.h: Add comment about LWG 2735.
4394 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4396 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4399 * include/std/version [__cpp_impl_destroying_delete]
4400 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4401 * libsupc++/new [__cpp_impl_destroying_delete]
4402 (__cpp_lib_destroying_delete): Likewise.
4403 (destroying_delete_t, destroying_delete): Likewise, but define even
4404 when __cpp_impl_destroying_delete is not defined.
4405 * testsuite/18_support/destroying_delete.cc: New test.
4407 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4410 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4411 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4412 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4413 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4415 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4418 * include/bits/fs_path.h (path::has_root_name)
4419 (path::has_root_directory, path::has_root_path)
4420 (path::has_relative_path, path::has_parent_path)
4421 (path::has_filename, path::has_stem, path::has_extension)
4422 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4424 * src/c++17/fs_path.cc (path::has_root_name)
4425 (path::has_root_directory, path::has_root_path)
4426 (path::has_relative_path, path::has_parent_path)
4427 (path::has_filename, path::_M_find_extension): Add noexcept.
4429 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4431 PR libstdc++/89102 (partial)
4432 * include/std/type_traits (common_type<>): Define.
4433 (common_type<T>): Derive from common_type<T, T>.
4434 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4435 Test zero-length template argument list.
4436 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4437 Test additional single argument cases.
4438 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4439 Adjust expected error.
4441 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4444 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4446 * include/bits/stl_stack.h (stack): Likewise.
4447 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4448 * testsuite/23_containers/queue/deduction.cc: New test.
4449 * testsuite/23_containers/stack/deduction.cc: New test.
4452 * include/std/type_traits (__is_convertible_helper)
4453 (__is_convertible_helper<_From, _To, false>): Revert changes to
4454 support is_nothrow_convertible.
4455 (__is_nt_convertible_helper): New helper.
4456 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4458 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4459 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4462 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4463 __is_alloc_insertable_impl. Replace single type member with two
4464 members, one for each of copy and move insertable.
4465 (__is_move_insertable): New trait for internal use.
4466 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4467 (vector::_S_nothrow_relocate(true_type)): New functions to
4468 conditionally check if __relocate_a can throw.
4469 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4470 on __is_move_insertable.
4471 (vector::_S_do_relocate): New overloaded functions to conditionally
4473 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4474 based on _S_use_relocate.
4475 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4476 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4477 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4480 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4481 parameter unnamed. Add message to static assertion.
4482 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4483 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4486 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4489 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4491 (__is_bitwise_relocatable): ... to this.
4492 (__relocate_a_1): Adapt.
4493 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4494 (__is_bitwise_relocatable): ... to this.
4496 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4499 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4500 final component as well as from _M_pathname. Append the dot using
4501 operator+= instead of only to _M_pathname.
4502 (path::_M_find_extension): Reformat slightly.
4503 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4504 Add more test cases.
4506 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4508 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4510 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4512 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4513 constexpr specifiers from arg and proj.
4515 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4516 __shared_ptr instantiations used by gcc4-compatible ABI.
4518 * include/experimental/forward_list (experimental::erase): Qualify
4520 * include/experimental/list (experimental::erase): Likewise.
4521 * include/std/forward_list (std::erase): Likewise.
4522 * include/std/list (std::erase): Likewise.
4524 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4526 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4527 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4528 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4529 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4530 * testsuite/ext/array_allocator/26875.cc: Likewise.
4531 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4532 * testsuite/util/replacement_memory_operators.h: Likewise.
4533 * testsuite/util/testsuite_allocator.h: Likewise.
4535 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4536 normal mode vector, even for debug mode.
4537 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4538 Define alias template for normal mode vector.
4540 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4543 * config/locale/generic/c_locale.h (__convert_from_v)
4544 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4545 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4546 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4547 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4549 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4552 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4553 data member with static member function _S_use_relocate().
4554 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4555 (vector::_M_default_append): Use _S_use_relocate() instead of
4558 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4561 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4564 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4565 write to stderr instead of using printf.
4567 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4570 * include/bits/char_traits.h (__constant_string_p,
4571 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4574 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4576 Implement C++20 P0600r1.
4577 * include/backward/hash_map: Add nodiscard attribute to empty.
4578 * include/backward/hash_set: Likewise.
4579 * backward/hashtable.h: Likewise.
4580 * include/bits/basic_string.h: Likewise.
4581 * include/bits/forward_list.h: Likewise.
4582 * include/bits/hashtable.h: Likewise.
4583 * include/bits/regex.h: Likewise.
4584 * include/bits/stl_deque.h: Likewise.
4585 * include/bits/stl_list.h: Likewise.
4586 * include/bits/stl_map.h: Likewise.
4587 * include/bits/stl_multimap.h: Likewise.
4588 * include/bits/stl_multiset.h: Likewise.
4589 * include/bits/stl_queue.h: Likewise.
4590 * include/bits/stl_set.h: Likewise.
4591 * include/bits/stl_stack.h: Likewise.
4592 * include/bits/stl_tree.h: Likewise.
4593 * include/bits/stl_vector.h: Likewise.
4594 * include/bits/unordered_map.h: Likewise.
4595 * include/bits/unordered_set.h: Likewise.
4596 * include/debug/array: Likewise.
4597 * include/experimental/any: Likewise.
4598 * include/experimental/bits/fs_path.h: Likewise.
4599 * include/experimental/internet: Likewise.
4600 * include/experimental/string_view: Likewise.
4601 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4603 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4605 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4607 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4609 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4611 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4613 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4615 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4617 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4618 info_fn_imps.hpp: Likewise.
4619 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4620 left_child_next_sibling_heap_.hpp: Likewise.
4621 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4623 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4625 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4627 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4629 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4631 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4633 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4635 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4636 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4637 * include/ext/rope: Likewise.
4638 * include/ext/slist: Likewise.
4639 * include/ext/vstring.h: Likewise.
4640 * include/profile/array: Likewise.
4641 * include/std/array: Likewise.
4642 * include/tr1/array: Likewise.
4643 * include/tr1/hashtable.h: Likewise.
4644 * include/tr1/regex: Likewise.
4645 * include/tr2/dynamic_bitset: Likewise.
4646 * include/bits/alloc_traits.h: Add nodiscard attribute to
4648 * include/experimental/memory_resource: Likewise.
4649 * include/ext/alloc_traits.h: Likewise.
4650 * include/ext/array_allocator.h: Likewise.
4651 * include/ext/bitmap_allocator.h: Likewise.
4652 * include/ext/debug_allocator.h: Likewise.
4653 * include/ext/extptr_allocator.h: Likewise.
4654 * include/ext/mt_allocator.h: Likewise.
4655 * include/ext/new_allocator.h: Likewise.
4656 * include/ext/pool_allocator.h: Likewise.
4657 * include/ext/throw_allocator.h: Likewise.
4658 * include/std/scoped_allocator: Likewise.
4659 * libsupc++/eh_alloc.cc: Likewise.
4660 * include/std/future: Add nodiscard attribute to async.
4661 * libsupc++/new: Add nodiscard attribute to new.
4663 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4668 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4669 * include/bits/shared_ptr.h
4670 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4671 (allocate_shared): Change to use new tag type.
4672 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4673 Declare new member function.
4674 (_Sp_alloc_shared_tag): Define new type.
4675 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4676 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4677 _Sp_make_shared_tag::_S_eq to check type_info.
4678 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4679 Constrain to prevent being called with _Sp_alloc_shared_tag.
4680 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4681 Replace constructor with ...
4682 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4683 reference parameter so address of the new object can be returned to
4684 the caller. Obtain the allocator from the tag type.
4685 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4686 constructor with ...
4687 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4688 to the __shared_count constructor.
4689 (__allocate_shared): Change to use new tag type.
4690 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4692 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4694 * src/c++17/fs_ops.cc
4695 (equivalent(const path&, const path&, error_code&))
4696 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4697 compare files instead of relying on incomplete info returned by stat.
4700 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4701 if the path is already absolute.
4702 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4703 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4706 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4707 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4708 of filesystem::exists.
4709 (create_directories(const path&, error_code&)): Add assertions.
4710 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4711 Add workaround for bug in _wstat for paths with trailing slash.
4712 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4713 for expected behaviour on mingw.
4714 * testsuite/experimental/filesystem/operations/create_directories.cc:
4716 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4717 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4718 not test permissions on mingw targets.
4720 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4722 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4723 constructors and open members taking wide strings. Fix patterns for
4724 filesystem::path members to match wstring_view parameters. Add
4725 exports for shared_ptr members used by directory iterators.
4726 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4727 error code parameter if the file doesn't exist.
4728 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4730 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4731 values for mingw targets, where "/" is not an absolute path. Do not
4732 test symlinks on mingw targets.
4733 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4734 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4736 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4737 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4738 that each component of the path is created.
4739 * testsuite/experimental/filesystem/operations/create_directories.cc:
4741 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4742 permissions on mingw targets.
4743 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4744 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4745 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4746 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4748 * testsuite/experimental/filesystem/operations/permissions.cc:
4750 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4751 symlinks or permissions on mingw targets.
4752 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4753 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4754 symlinks on mingw targets.
4755 * testsuite/experimental/filesystem/operations/remove_all.cc:
4757 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4758 permissions on mingw targets.
4759 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4760 test symlinks on mingw targets.
4761 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4764 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4767 Warn about unused comparisons of shared_ptr/unique_ptr
4768 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4769 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4770 <, <=, >, >= for shared_ptr.
4771 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4773 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4775 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4776 as 201611L, because P0497R0 changes are supported.
4777 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4779 * include/bits/erase_if.h [__cplusplus > 201703L]
4780 (__cpp_lib_erase_if): Only define for C++2a.
4781 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4782 (__cpp_lib_null_iterators): Define.
4783 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4784 (__cpp_lib_null_iterators): Define.
4785 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4787 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4789 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4791 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4792 changes are supported.
4793 * include/std/optional (__cpp_lib_optional): Likewise.
4794 * include/std/variant (__cpp_lib_variant): Likewise.
4795 * include/std/version [!__STRICT_ANSI__]
4796 (__cpp_lib_uncaught_exceptions): Define as long integer.
4797 [__cplusplus >= 201703L] (__cpp_lib_any)
4798 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4799 (__cpp_lib_variant): Define for C++17.
4800 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4802 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4805 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4807 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4811 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4813 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4816 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4818 * doc/xml/manual/intro.xml: Include new section.
4819 * doc/xml/manual/status_cxx2017.xml: Document more
4820 implementation-defined properties of the library.
4821 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4822 * doc/html/*: Regenerate.
4824 * include/bits/refwrap.h [__cplusplus > 201703L]
4825 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4826 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4827 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4829 (reference_wrapper::operator()): Add static assertion.
4830 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4832 * include/std/chrono (duration_values::zero(), duration_values::min())
4833 (duration_values::max()): Add noexcept.
4834 (duration::zero(), duration::min(), duration::max()): Likewise.
4835 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4836 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4837 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4839 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4841 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4843 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4844 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4846 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4849 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4850 specialization for C++17 (P0513R0, LWG 2817).
4851 * testsuite/20_util/hash/nullptr.cc: New test.
4854 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4855 pattern for std::basic_stringbuf::str().
4857 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4858 basic_ostream::operator<< patterns.
4860 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4862 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4863 test failures on targets with 32-bit time_t.
4865 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4866 * include/std/deque: Likewise.
4867 * include/std/forward_list: Likewise.
4868 * include/std/list: Likewise.
4869 * include/std/string: Likewise.
4870 * include/std/vector: Likewise.
4871 * include/std/version: Likewise.
4872 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4873 * testsuite/23_containers/deque/erasure.cc: Likewise.
4874 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4875 * testsuite/23_containers/list/erasure.cc: Likewise.
4876 * testsuite/23_containers/map/erasure.cc: Likewise.
4877 * testsuite/23_containers/set/erasure.cc: Likewise.
4878 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4879 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4880 * testsuite/23_containers/vector/erasure.cc: Likewise.
4882 * include/experimental/internet [AI_NUMERICSERV]
4883 (resolver_base::numeric_service): Define conditionally.
4884 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4886 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4889 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4890 Jonathan Wakely <jwakely@redhat.com>
4893 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4894 (GLIBCXX_3.4.26): Add new exports.
4895 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4896 correct list of sources.
4897 * include/Makefile.in: Regenerate.
4898 * include/std/ostream (operator<<(nullptr_t)): New member function.
4899 * src/c++17/ostream-inst.cc: New file.
4900 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4903 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4905 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4906 of the source file containing the caller.
4907 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4908 directories created by test.
4909 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4911 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4913 * testsuite/experimental/filesystem/iterators/
4914 recursive_directory_iterator.cc: Likewise.
4916 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4918 PR tree-optimization/88775
4919 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4920 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4921 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4922 instead of __builtin_constant_p if available. Don't bother with
4923 the pointer comparison in C++11 and earlier.
4925 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4929 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4932 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4934 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4935 for filesystem::path. Give variables more distinctive names.
4937 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4938 member function to perform non-trivial assignment.
4939 (_Optional_payload_base::_M_move_assign): Likewise.
4940 (_Optional_payload<T, true, false, true>::operator=)
4941 (_Optional_payload<T, true, true, false>::operator=)
4942 (_Optional_payload<T, true, false, false>::operator=): Call
4943 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4946 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4947 test std::complex<long double> if long double format is IBM128.
4948 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4951 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4953 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4954 for old std::unique_ptr layout.
4955 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4956 to become valueless. Add filesystem::path tests.
4959 * include/std/optional (_Optional_payload_base): New class template
4960 for common code hoisted from _Optional_payload specializations. Use
4961 a template for the union, to allow a partial specialization for
4962 types with non-trivial destructors. Add constructors for in-place
4963 initialization to the union.
4964 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4965 to perform non-trivial copy construction, instead of relying on
4966 non-standard copy elision in a delegating constructor.
4967 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4968 non-trivial move construction.
4969 (_Optional_payload): Derive from _Optional_payload_base and use it
4970 for everything except the non-trivial assignment operators, which are
4972 (_Optional_payload<false, C, M>): Derive from the specialization
4973 _Optional_payload<true, false, false> and add a destructor.
4974 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4975 Forward to corresponding members of _Optional_payload.
4976 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4977 Hoist common members from _Optional_base.
4978 (_Optional_base): Make all members and base class public.
4979 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4980 _Optional_base_impl.
4981 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4982 support for new std::optional layout.
4983 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4986 * include/bits/locale_conv.h: Use <> for includes not "".
4987 * include/ext/random: Likewise.
4988 * include/ext/vstring.h: Likewise.
4990 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4992 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4993 (GLIBCXX_3.4.21): Likewise.
4995 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4998 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4999 to match the one that controls whether utimbuf and utime are declared.
5001 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5004 * include/bits/char_traits.h (char_traits::move): Do not pass null
5005 pointers to memmove.
5006 * include/bits/locale_facets.h
5007 (ctype<char>::widen(const char*, const char*, char*)): Do not
5008 pass null pointers to memcpy.
5009 (ctype<char>::narrow(const char*, const char*, char, char*)):
5011 (ctype<char>::do_widen(const char*, const char*, char*)):
5013 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5016 * doc/xml/manual/spine.xml: Update copyright years.
5017 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5018 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5019 for C++17 filesystem library.
5020 * doc/html/*: Regenerate.
5022 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5023 * config.h.in: Regenerate.
5024 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5025 alphabetically and add missing entries for copy_symlink,
5026 hard_link_count, rename, and resize_file.
5027 * configure: Regenerate.
5028 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5029 used unconditionally.
5030 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5031 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5032 supports truncating to zero length.
5033 * testsuite/27_io/filesystem/operations/all.cc: New test.
5034 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5036 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5039 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5040 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5041 * config.h.in: Regenerate.
5042 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5043 remaining std::filesystem types and functions.
5044 * configure: Regenerate.
5045 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5046 * src/c++17/Makefile.in: Regenerate.
5047 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5048 here, and change name of included file.
5049 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5050 here, and change name of included file.
5051 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5052 path to dir-common.h.
5053 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5054 path to ops-common.h. Disable -Wunused-parameter warnings.
5055 (internal_file_clock): Define unconditionally.
5056 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5058 (do_copy_file, do_space): Move definitions to ops.common.h.
5059 (copy, file_size, hard_link_count, last_write_time, space): Only
5060 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5062 (last_write_time, read_symlink): Remove unused attributes from
5064 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5065 * src/filesystem/Makefile.in: Regenerate.
5066 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5067 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5068 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5069 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5070 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5071 dummy types and functions instead of using #error.
5072 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5073 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5075 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5076 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5077 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5078 to account for new namespace.
5079 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5080 -lstdc++fs from dg-options.
5081 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5082 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5083 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5084 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5085 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5087 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5088 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5090 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5091 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5092 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5093 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5094 * testsuite/27_io/filesystem/operations/create_directories.cc:
5096 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5097 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5098 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5099 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5100 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5101 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5102 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5103 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5104 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5105 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5106 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5107 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5108 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5109 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5110 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5111 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5112 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5113 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5115 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5119 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5120 typeinfo and vtables less greedy.
5121 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5122 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5123 * src/c++17/Makefile.in: Regenerate.
5124 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5125 here, and change name of included file.
5126 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5127 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5129 * src/filesystem/Makefile.in: Regenerate.
5130 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5131 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5132 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5133 from dg-options and remove dg-require-filesystem-ts.
5134 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5135 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5136 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5137 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5138 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5139 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5140 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5141 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5142 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5143 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5144 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5145 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5146 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5147 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5148 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5149 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5150 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5151 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5152 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5153 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5154 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5156 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5157 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5158 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5159 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5160 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5161 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5162 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5163 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5164 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5165 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5166 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5167 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5169 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5171 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5173 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5175 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5176 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5177 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5178 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5179 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5180 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5181 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5182 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5183 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5184 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5186 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5187 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5188 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5189 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5190 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5193 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5194 Check is_trivially_copyable instead of is_scalar.
5195 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5196 contained value can throw and its type is trivially copyable then
5197 construct into a temporary variant and move from it, to provide the
5198 strong exception safety guarantee.
5199 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5201 * testsuite/20_util/variant/87431.cc: New test.
5202 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5203 conversion causes valueless state.
5206 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5207 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5208 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5209 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5210 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5212 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5214 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5215 (file_time_type): Redefine in terms of __file_clock.
5216 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5218 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5220 (internal_file_lock): New helper type for accessing __file_clock.
5221 (do_copy_file): Use internal_file_lock to convert system time to
5223 (last_write_time(const path&, error_code&)): Likewise.
5224 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5226 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5228 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5229 for const member functions of std::basic_string.
5230 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5232 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5233 Make non-standard constructor private.
5234 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5236 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5237 explicit instantiations for C++17 as well as earlier dialects.
5238 * src/c++17/Makefile.am: Add new source files.
5239 * src/c++17/Makefile.in: Regenerate.
5240 * src/c++17/cow-string-inst.cc: New file defining explicit
5241 instantiations for basic_string member functions added in C++17.
5242 * src/c++17/string-inst.cc: Likewise.
5244 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5245 copy/move constructors for old std::basic_string.
5246 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5247 (basic_string::reference, basic_string::const_reference): Define
5248 as plain references for C++11 and later.
5249 (basic_string::basic_string()): Put constructor body outside
5250 preprocessor conditional groups.
5251 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5252 instead of copying it.
5253 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5255 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5257 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5258 cases for old basic_string.
5259 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5260 allocator-extended constructors unconditionally. Add extra members to
5261 allocator type when using old string ABI.
5262 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5264 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5266 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5267 -fno-inline added to test flags.
5269 * testsuite/21_strings/basic_string/requirements/
5270 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5272 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5273 assertion failures with old std::string ABI.
5275 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5277 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5278 functions that will only erase elements at the end.
5279 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5280 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5281 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5283 (path::_List::pop_back()): Define.
5284 (path::_List::_M_erase_from(const_iterator)): Define.
5285 (path::operator/=(const path&)): Use pop_back to remove last component
5286 and _M_erase_from to remove multiple components.
5287 (path::_M_append(basic_string_view<value_type>)): Likewise.
5288 (path::operator+=(const path&)): Likewise.
5289 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5290 (path::remove_filename()): Likewise.
5291 (path::lexically_normal()): Use _List::_Impl iterators instead of
5292 path::iterator. Use pop_back to remove components from the end. Clear
5293 trailing filename, instead of using erase(const_iterator) to remove
5294 a non-final component.
5295 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5297 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5299 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5300 incorrect treatment of empty filename after trailing slash.
5301 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5303 * testsuite/21_strings/basic_string/modifiers/assign/char/
5304 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5306 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5307 move_assign_optim.cc: Likewise.
5309 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5310 Jakub Jelinek <jakub@redhat.com>
5313 * include/experimental/memory: Replace UTF-8 quote characters.
5314 * include/std/future: Replace UTF-8 "em dash" characters.
5316 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5319 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5320 * include/debug/forward_list: Likewise.
5321 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5323 * include/experimental/chrono: Likewise.
5324 * include/experimental/functional: Likewise.
5325 * include/experimental/ratio: Likewise.
5326 * include/experimental/system_error: Likewise.
5327 * include/experimental/tuple: Likewise.
5328 * include/experimental/type_traits: Likewise.
5329 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5330 * include/parallel/multiseq_selection.h: Likewise.
5333 * config/abi/pre/gnu.ver: Add missing exports.
5334 * testsuite/22_locale/collate_byname/88681.cc: New test.
5335 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5336 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5338 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5340 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5341 initializer_list<value_type> and from input iterator ranges.
5342 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5344 * testsuite/experimental/string_view/element_access/char/empty.cc:
5345 Fix year range in copyright header.
5347 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5349 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5350 Fix year range in copyright header.
5352 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5354 Update copyright years.
5356 Copyright (C) 2019 Free Software Foundation, Inc.
5358 Copying and distribution of this file, with or without modification,
5359 are permitted in any medium without royalty provided the copyright
5360 notice and this notice are preserved.