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