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