]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
Avoid undefined behaviour in std::byte operators (LWG 2950)
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
bfa356b2 12019-06-18 Jonathan Wakely <jwakely@redhat.com>
2
3 * include/c_global/cstddef (std::byte): Perform arithmetic operations
4 in unsigned int to avoid promotion (LWG 2950).
5
067cff00 62019-06-17 Jonathan Wakely <jwakely@redhat.com>
7
8a80c5c7 8 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
9 failure on AIX.
10
4b48ab19 11 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
12
067cff00 13 PR libstdc++/90281 Fix string conversions for filesystem::path
14 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
15 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
16 __str_codecvt_in_all to fail for partial conversions and throw on
17 error.
18 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
19 (path::_Cvt<char8_t>): Add explicit specialization.
20 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
21 overloads.
22 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
23 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
24 instead of codecvt_utf8. Use __str_codecvt_in_all and
25 __str_codecvt_out_all.
26 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
27 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
28 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
29 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
30 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
31 after converting to UTF-8.
32 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
33 __str_codecvt_in_all.
34 (path::string): Fix initialization of string types with different
35 allocators.
36 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
37 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
38 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
39 runtime conditions.
40 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
41 return false for partial conversions.
42 * include/experimental/bits/fs_path.h (u8path):
43 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
44 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
45 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
46 instead of codecvt_utf8. Use __str_codecvt_in_all and
47 __str_codecvt_out_all.
48 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
49 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
50 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
51 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
52 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
53 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
54 __str_codecvt_in_all.
55 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
56 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
57 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
58 __str_codecvt_in_all.
59 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
60 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
61 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
62 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
63 strings and with Unicode characters outside the basic multilingual
64 plane.
65 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
66 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
67 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
68 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
69 * testsuite/experimental/filesystem/path/native/string.cc: Test with
70 empty strings and with Unicode characters outside the basic
71 multilingual plane.
72
e32b7958 732019-06-17 François Dumont <fdumont@gcc.gnu.org>
74 Jonathan Wakely <jwakely@redhat.com>
75
76 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
77 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
78 deallocate node if insertion fails.
79 (_Hashtable::_M_insert_multi_node): Likewise.
80 (_Hashtable::_M_reinsert_node): Pass additional key argument.
81 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
82 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
83 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
84 (_Hashtable::extract(const _Key&)): Likewise.
85 (_Hashtable::_M_merge_unique): Pass additional key argument.
86 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
87 _Scoped_node.
88 (_Hashtable::_M_insert): Likewise.
89 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
90 (_Hashtable_alloc): Add comments to functions with misleading names.
91
9462a83e 922019-06-17 Jonathan Wakely <jwakely@redhat.com>
93
94 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
95 for std::string.
96 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
97 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
98 header for std::allocator.
99 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
100 using-declaration for std::size_t.
101 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
102 Likewise.
103 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
104 std::istream.
105 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
106 * testsuite/experimental/map/erasure.cc: Include <string> for
107 std::string.
108 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
109
e3cc480c 1102019-06-14 Jonathan Wakely <jwakely@redhat.com>
111
bde783a9 112 * include/experimental/type_traits (experimental::nonesuch): Use
113 pragma to disable -Wctor-dtor-privacy warnings.
114 * include/std/type_traits (__is_convertible_helper<From, To, false>)
115 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
116
e3cc480c 117 * include/std/version (__cpp_lib_bind_front): Add missing macro.
118
00f08bc3 1192019-06-12 Jonathan Wakely <jwakely@redhat.com>
120
d51263b4 121 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
122 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
123 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
124 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
125
387a4a81 126 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
127 (variant::emplace): Change static_assert messages from "should be"
128 to "must be".
129 (hash<monostate>::operator()): Remove name of unused parameter.
130
7445abf1 131 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
132 expression.
133
00f08bc3 134 * include/Makefile.am: Add new <bits/charconv.h> header.
135 * include/Makefile.in: Regenerate.
136 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
137 (to_string(long), to_string(unsigned long), to_string(long long))
138 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
139 * include/bits/charconv.h: New header.
140 (__detail::__to_chars_len): Move here from <charconv>.
141 (__detail::__to_chars_10_impl): New function extracted from
142 __detail::__to_chars_10.
143 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
144 (__to_chars_unsigned_type): New class template that reuses
145 __make_unsigned_selector_base::__select to pick a type.
146 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
147 (__detail::__to_chars_len): Move to new header.
148 (__detail::__to_chars_10): Add inline specifier. Move code doing the
149 output to __detail::__to_chars_10_impl and call that.
150 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
151 * testsuite/21_strings/basic_string/numeric_conversions/char/
152 to_string.cc: Fix reference in comment. Remove unused variable.
153 * testsuite/21_strings/basic_string/numeric_conversions/char/
154 to_string_int.cc: New test.
155
9a75566e 1562019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
157
158 Fix ConstexprIterator requirements tests - No constexpr algorithms!
159 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
160 Replace copy with hand-rolled loop.
161 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
162 Ditto.
163
1fe150d1 1642019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
165
166 Test for C++20 p0858 - ConstexprIterator requirements.
167 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
168 New test.
169 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
170 New test.
171
58dcf1e2 1722019-06-07 Thomas Rodgers <trodgers@redhat.com>
173
174 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
175 project) standards.
176 * include/bits/c++config: Rename all macros of the form __PSTL* to
177 _PSTL*.
178 * include/std/algorithm: Likewise.
179 * include/std/execution: Likewise.
180 * include/std/numeric: Likewise.
181 * include/std/memory: Likewise.
182 * include/pstl/glue_memory_impl.h: Likewise.
183 * include/pstl/numeric_impl.h: Likewise.
184 * include/pstl/glue_memory_defs.h: Likewise.
185 * include/pstl/execution_defs.h: Likewise.
186 * include/pstl/utils.h: Likewise.
187 * include/pstl/algorithm_fwd.h: Likewise.
188 * include/pstl/unseq_backend_simd.h: Likewise.
189 * include/pstl/glue_execution_defs.h: Likewise.
190 * include/pstl/algorithm_impl.h: Likewise.
191 * include/pstl/parallel_impl.h: Likewise.
192 * include/pstl/memory_impl.h: Likewise.
193 * include/pstl/glue_numeric_defs.h: Likewise.
194 * include/pstl/parallel_backend_utils.h: Likewise.
195 * include/pstl/glue_algorithm_defs.h: Likewise.
196 * include/pstl/parallel_backend.h: Likewise.
197 * include/pstl/glue_numeric_impl.h: Likewise.
198 * include/pstl/parallel_backend_tbb.h: Likewise.
199 * include/pstl/numeric_fwd.h: Likewise.
200 * include/pstl/glue_algorithm_impl.h: Likewise.
201 * include/pstl/execution_impl.h: Likewise.
202 * include/pstl/pstl_config.h: Likewise.
203 * testsuite/util/pstl/pstl_test_config.h: Likewise.
204 * testsuite/util/pstl/test_utils.h: Likewise.
205 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
206 Likewise.
207 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
208 Likewise.
209 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
210 Likewise.
211 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
212 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
213 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
214 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
215 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
216 Likewise.
217 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
218 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
219 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
220 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
221 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
222 Likewise.
223 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
224 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
225 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
226 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
227 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
228 Likewise.
229 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
230 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
231 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
232 Likewise.
233 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
234 Likewise.
235 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
236 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
237 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
238 Likewise.
239 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
240 Likewise.
241 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
242 Likewise.
243 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
244 Likewise.
245 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
246 Likewise.
247 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
248 Likewise.
249 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
250 Likewise.
251 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
252 Likewise.
253 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
254 Likewise.
255 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
256 Likewise.
257 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
258 Likewise.
259 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
260
261 Rename header guards to be consistent with upstream project's
262 conventions.
263 * include/pstl/glue_memory_impl.h: Rename all macros of the form
264 _PSTL_(.*)_H to _PSTL_\U\1_H.
265 * include/pstl/numeric_impl.h: Likewise.
266 * include/pstl/glue_memory_defs.h: Likewise.
267 * include/pstl/execution_defs.h: Likewise.
268 * include/pstl/utils.h: Likewise.
269 * include/pstl/algorithm_fwd.h: Likewise.
270 * include/pstl/unseq_backend_simd.h: Likewise.
271 * include/pstl/glue_execution_defs.h: Likewise.
272 * include/pstl/algorithm_impl.h: Likewise.
273 * include/pstl/parallel_impl.h: Likewise.
274 * include/pstl/memory_impl.h: Likewise.
275 * include/pstl/glue_numeric_defs.h: Likewise.
276 * include/pstl/parallel_backend_utils.h: Likewise.
277 * include/pstl/glue_algorithm_defs.h: Likewise.
278 * include/pstl/parallel_backend.h: Likewise.
279 * include/pstl/glue_numeric_impl.h: Likewise.
280 * include/pstl/parallel_backend_tbb.h: Likewise.
281 * include/pstl/numeric_fwd.h: Likewise.
282 * include/pstl/glue_algorithm_impl.h: Likewise.
283 * include/pstl/execution_impl.h: Likewise.
284 * include/pstl/pstl_config.h: Likewise.
285 * testsuite/util/pstl/pstl_test_config.h: Likewise.
286
287 Synchronize libstdc++ parallel algorithms with upstream
288 project.
289 * include/pstl/algorithm_fwd.h: Synchronize with
290 upstream PSTL project.
291 * include/pstl/algorithm_impl.h: Likewise.
292 * include/pstl/execution_defs.h: Likewise.
293 * include/pstl/execution_impl.h: Likewise.
294 * include/pstl/glue_algorithm_impl.h: Likewise.
295 * include/pstl/glue_execution_defs.h: Likewise.
296 * include/pstl/numeric_fwd.h: Likewise.
297 * include/pstl/numeric_impl.h: Likewise.
298 * include/pstl/parallel_backend.h: Likewise.
299 * include/pstl/pstl_config.h: Likewise.
300 * include/pstl/unseq_backend_simd.h: Likewise.
301 * include/pstl/parallel_backend_serial.h: New file.
302 * include/Makefile.am (pstl_headers): Add
303 parallel_backend_serial.h.
304 * include/Makefile.in: Regenerate.
305
306 Clean up non-conforming names
307 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
308 Uglfiy copy_range1 and copy_range2
309 (__pattern_walk2_n): Rename local n to __n
310 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
311 Rename parameter _T to _Tp.
312
313 Integrate non-TBB serial backend support
314 * include/bits/c++config: Adjust TBB detection logic to select serial
315 PSTL backend if no TBB present.
316 * testsuite/utils/pstl/test_utils.h: Remove check for
317 _PSTL_USE_PAR_POLICIES
318
756e59b0 3192019-06-07 Jonathan Wakely <jwakely@redhat.com>
320
92964728 321 * testsuite/24_iterators/container_access.cc: Move dg-options before
322 dg-do directive so the target check uses the -std option.
323
756e59b0 324 PR libstdc++/90770
325 * configure: Regenerate.
326 * src/Makefile.am (stamp-debug): Also test for missing makefile.
327 * src/Makefile.in: Regenerate.
328
42c1dacd 3292019-06-06 Jonathan Wakely <jwakely@redhat.com>
330
9eb6db53 331 * include/std/array: Do not include <stdexcept>.
332 * include/std/optional: Include <exception> and
333 <bits/exception_defines.h> instead of <stdexcept>.
334 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
335 for std::isalnum.
336 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
337 std::allocator.
338 * testsuite/23_containers/map/erasure.cc: Include <string>.
339 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
340
2bc51486 341 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
342 dg-prune-output for different C++98 diagnostic.
343 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
344 Likewise.
345 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
346 Likewise.
347 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
348 Likewise.
349 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
350 Likewise.
351 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
352 Likewise.
353 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
354 Likewise.
355 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
356 Likewise.
357 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
358 Likewise.
359 * testsuite/23_containers/vector/requirements/dr438/
360 constructor_1_neg.cc: Likewise.
361 * testsuite/23_containers/vector/requirements/dr438/
362 constructor_2_neg.cc: Likewise.
363 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
364 Likewise.
365 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
366
191c4715 367 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
368 Do not test allocator rebinding extension for C++2a.
369 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
370 dg-do directive for C++17 and C++2a.
371
19516e33 372 * testsuite/23_containers/deque/requirements/explicit_instantiation/
373 1_c++0x.cc: Remove redundant test.
374 * testsuite/23_containers/deque/requirements/explicit_instantiation/
375 2.cc: Use target selector instead of preprocessor condition.
376 * testsuite/23_containers/deque/requirements/explicit_instantiation/
377 3.cc: Do not run test for C++2a.
378 * testsuite/23_containers/forward_list/requirements/
379 explicit_instantiation/3.cc: Likewise.
380 * testsuite/23_containers/forward_list/requirements/
381 explicit_instantiation/5.cc: Do not test allocator rebinding extension
382 for C++2a.
383 * testsuite/23_containers/list/requirements/explicit_instantiation/
384 1_c++0x.cc: Remove redundant test.
385 * testsuite/23_containers/list/requirements/explicit_instantiation/
386 2.cc: Use target selector instead of preprocessor condition.
387 * testsuite/23_containers/list/requirements/explicit_instantiation/
388 3.cc: Do not run test for C++2a.
389 * testsuite/23_containers/list/requirements/explicit_instantiation/
390 5.cc: Do not test allocator rebinding extension for C++2a.
391 * testsuite/23_containers/map/requirements/explicit_instantiation/
392 1_c++0x.cc: Remove redundant test.
393 * testsuite/23_containers/map/requirements/explicit_instantiation/
394 2.cc: Adjust comment.
395 * testsuite/23_containers/map/requirements/explicit_instantiation/
396 3.cc: Do not run test for C++2a.
397 * testsuite/23_containers/map/requirements/explicit_instantiation/
398 5.cc: Do not test allocator rebinding extension for C++2a.
399 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
400 1_c++0x.cc: Remove redundant test.
401 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
402 3.cc: Do not run test for C++2a.
403 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
404 5.cc: Do not test allocator rebinding extension for C++2a.
405 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
406 3.cc: Do not run test for C++2a.
407 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
408 5.cc: Do not test allocator rebinding extension for C++2a.
409 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
410 Do not run test for C++2a.
411 * testsuite/23_containers/set/requirements/explicit_instantiation/
412 1_c++0x.cc: Remove redundant test.
413 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
414 Do not test allocator rebinding extension for C++2a.
415 * testsuite/23_containers/unordered_map/requirements/
416 explicit_instantiation/3.cc: Likewise.
417 * testsuite/23_containers/unordered_map/requirements/
418 explicit_instantiation/5.cc: Do not test allocator rebinding extension
419 for C++2a.
420 * testsuite/23_containers/unordered_multimap/requirements/
421 explicit_instantiation/3.cc: Do not run test for C++2a.
422 * testsuite/23_containers/unordered_multimap/requirements/
423 explicit_instantiation/5.cc: Do not test allocator rebinding extension
424 for C++2a.
425 * testsuite/23_containers/unordered_multiset/requirements/
426 explicit_instantiation/3.cc: Do not run test for C++2a.
427 * testsuite/23_containers/unordered_multiset/requirements/
428 explicit_instantiation/5.cc: Do not test allocator rebinding extension
429 for C++2a.
430 * testsuite/23_containers/unordered_set/requirements/
431 explicit_instantiation/3.cc: Do not run test for C++2a.
432 * testsuite/23_containers/unordered_set/requirements/
433 explicit_instantiation/5.cc: Do not test allocator rebinding extension
434 for C++2a.
435 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
436 2.cc: Remove redundant test.
437 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
438 3.cc: Do not run test for C++2a.
439 * testsuite/23_containers/vector/requirements/explicit_instantiation/
440 3.cc: Likewise.
441
6ffe4cf3 442 * include/std/type_traits (is_empty, is_polymorphic, is_final)
443 (is_abstract, is_aggregate): Remove static_assert.
444 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
445 from builtin only.
446 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
447 missing -std=gnu++17 option.
448 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
449 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
450 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
451 from builtin only.
452
186ade93 453 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
454 * testsuite/18_support/set_unexpected.cc: Likewise.
455 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
456 void.
457 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
458 function to be valid in C++11.
459 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
460 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
461 include Library Fundamentals or Networking headers in C++11 mode.
462 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
463
42c1dacd 464 * include/std/tuple (_TC): Replace with _TupleConstraints.
465 (_TupleConstraints): New helper for SFINAE constraints, with more
466 expressive member functions to reduce duplication when used.
467 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
468 (tuple::_TCC): Replace dummy type parameter with bool non-type
469 parameter that can be used to check the pack size.
470 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
471 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
472 checking constraints in constructors.
473 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
474 New SFINAE helpers.
475 (tuple::tuple): Use new helpers to reduce repitition in constraints.
476 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
477 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
478 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
479 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
480 constraints in constructors.
481 (tuple::__is_alloc_arg()): New SFINAE helpers.
482 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
483 constraints.
484 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
485 * testsuite/20_util/tuple/cons/90700.cc: New test.
486 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
487 to meet new constraint on allocator-extended default constructor.
488
d0226ba4 4892019-06-03 Jonathan Wakely <jwakely@redhat.com>
490
491 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
492 * include/bits/stl_multimap.h (multimap): Likewise.
493
046bb3cb 4942019-06-03 François Dumont <fdumont@gcc.gnu.org>
495
496 Rename variables and cleanup comments.
497 * include/bits/hashtable_policy.h
498 * include/bits/hashtable.h
499
5c70715f 5002019-06-03 Jonathan Wakely <jwakely@redhat.com>
501
2b018df4 502 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
503 Fix bgcolor for P0340R3.
504 * doc/html/*: Regenerate.
505
fbf62452 506 PR libstdc++/90686
507 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
508 <experimental/memory_resource>.
509 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
510 P0339R6, P0340R3, P1164R1 and P1357R1.
511 * doc/html/*: Regenerate.
512
5c70715f 513 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
514 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
515 allocator::value_type assertion for C++2a.
516 * include/bits/hashtable.h: Likewise.
517 * include/bits/stl_deque.h: Likewise.
518 * include/bits/stl_list.h: Likewise.
519 * include/bits/stl_map.h: Likewise.
520 * include/bits/stl_multimap.h: Likewise.
521 * include/bits/stl_multiset.h: Likewise.
522 * include/bits/stl_set.h: Likewise.
523 * include/bits/stl_vector.h: Likewise.
524 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
525 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
526 * testsuite/23_containers/list/48101-3_neg.cc: New test.
527 * testsuite/23_containers/map/48101-3_neg.cc: New test.
528 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
529 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
530 * testsuite/23_containers/set/48101-3_neg.cc: New test.
531 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
532 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
533 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
534 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
535 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
536
3e2001db 5372019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
538
539 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
540
065a9dd4 5412019-05-31 Jonathan Wakely <jwakely@redhat.com>
542
543 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
544 constructors.
545 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
546 function.
547 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
548
1ff189c5 5492019-05-31 Jonathan Wakely <jwakely@redhat.com>
550
698373bc 551 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
552
b74a9c1a 553 PR libstdc++/90682
554 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
555 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
556 * libsupc++/eh_term_handler.h: New header defining
557 _GLIBCXX_DEFAULT_TERM_HANDLER.
558 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
559 (set_terminate): Restore default handler when argument is null.
560 (set_unexpected): Likewise.
561 * testsuite/18_support/set_terminate.cc: New test.
562 * testsuite/18_support/set_unexpected.cc: New test.
563
1ff189c5 564 * include/backward/hashtable.h (size_t, ptrdiff_t)
565 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
566 (distance, vector, pair, __iterator_category): Remove
567 using-declarations that add these names to namespace __gnu_cxx.
568 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
569 * include/ext/debug_allocator.h (size_t): Likewise.
570 * include/ext/functional (size_t, unary_function, binary_function)
571 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
572 Likewise.
573 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
574 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
575 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
576 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
577 * include/ext/numeric (iota): Fix outdated comment.
578 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
579 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
580 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
581 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
582 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
583 Likewise.
584 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
585 (allocator, __true_type, __false_type): Likewise.
586
c12402f6 5872019-05-31 Antony Polukhin <antoshkka@gmail.com>
588
589 PR libstdc++/71579
590 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
591 New helpers for checking preconditions in traits.
592 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
593 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
594 (is_destructible, is_nothrow_destructible, is_constructible)
595 (is_default_constructible, is_copy_constructible)
596 (is_move_constructible, is_nothrow_default_constructible)
597 (is_nothrow_constructible, is_nothrow_copy_constructible)
598 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
599 (is_nothrow_assignable, is_nothrow_copy_assignable)
600 (is_nothrow_move_assignable, is_trivially_constructible)
601 (is_trivially_copy_constructible, is_trivially_move_constructible)
602 is_trivially_assignable, is_trivially_copy_assignable)
603 (is_trivially_move_assignable, is_trivially_destructible)
604 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
605 (is_invocable_r, is_nothrow_invocable)
606 (has_unique_object_representations, is_aggregate): Add static_asserts
607 to make sure that type traits are not misused with incomplete types.
608 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
609 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
610 base characteristics without assertions that can be reused in other
611 traits.
612 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
613 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
614 test.
615 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
616 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
617 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
618 * testsuite/20_util/is_class/value.cc: Check incomplete type.
619 * testsuite/20_util/is_function/value.cc: Likewise.
620 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
621 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
622 test.
623 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
624 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
625 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
626 * testsuite/20_util/is_union/value.cc: Likewise.
627 * testsuite/20_util/is_void/value.cc: Likewise.
628 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
629
84121f8a 6302019-05-31 Jonathan Wakely <jwakely@redhat.com>
631
632 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
633 Add new private member function.
634 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
635 (random_device::_M_init_pretr1(const string&)): Call new private
636 member with string data.
637 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
638 Define.
639 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
640 test using COW strings.
641 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
642 a value from the device.
643 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
644 Fix typo in token string.
645
01cad9ee 6462019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
647
648 LWG2788 basic_string spurious use of a default constructible allocator
649 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
650 (basic_string::_M_replace_dispatch): Construct temporary string with
651 the current allocator.
652 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
653 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
654
aa4108cd 6552019-05-30 Jonathan Wakely <jwakely@redhat.com>
656
d1e7b14b 657 * doc/xml/manual/diagnostics.xml: Update list of headers that define
658 exception classes.
659 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
660 section about new/delete overloads. Improve section on verbose
661 terminate handler.
662 * doc/html/*: Regenerate.
663
2a9eab7c 664 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
665 P0811R3. Change status of P1353R0.
666 * doc/html/*: Regenerate.
667
aa4108cd 668 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
669 documentation of implementation-defined types for [thread.req.native].
670 * doc/xml/manual/status_cxx2017.xml: Update documentation of
671 implementation-defined strings for [variant.bad.access]. Fix typo in
672 documentation of implementation-defined support for [fs.conform.9945].
673 * doc/html/*: Regenerate.
674
91df033f 6752019-05-29 Jonathan Wakely <jwakely@redhat.com>
676
745ff931 677 PR libstdc++/85494
678 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
679 that fails on mingw-w64.
680
34bfd0d6 681 PR libstdc++/88881
682 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
683 (status(const path&, error_code&)): Use parent_path() to remove
684 trailing slash.
685 (symlink_status(const path&, error_code&)): Duplicate workaround for
686 bug in _wstat for paths with trailing slash.
687 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
688 with trailing slash.
689 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
690 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
691
5e115b34 692 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
693 once instead of building it iteratively.
694
913f5ef9 695 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
696
91df033f 697 PR libstdc++/85494 use rdseed and rand_s in std::random_device
698 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
699 the assembler supports rdseed.
700 * config.h.in: Regenerate.
701 * configure: Regenerate.
702 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
703 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
704 * doc/html/*: Regenerate.
705 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
706 * include/bits/random.h (random_device::random_device()): Always call
707 _M_init rather than _M_init_pretr1.
708 (random_device::random_device(const string&)): Likewise.
709 (random_device::operator()()): Always call _M_getval().
710 (random_device::_M_file): Replace first member of union with an
711 anonymous struct, with _M_file as its first member.
712 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
713 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
714 (USE_MT19937): Define if none of the above are defined.
715 (USE_POSIX_FILE_IO): Define.
716 (_M_strtoul): Remove.
717 [USE_RDSEED] (__x86_rdseed): Define new function.
718 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
719 (random_device::_M_init(const string&)): Initialize new union members.
720 Add support for "rdseed" and "rand_s" tokens. Decide what the
721 "default" token does according to which USE_* macros are defined.
722 [USE_POSIX_FILE_IO]: Store a file descriptor.
723 [USE_MT19937]: Forward to _M_init_pretr1 instead.
724 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
725 code from _M_strtoul.
726 [!USE_MT19937]: Call _M_init, transforming the old default token or
727 numeric tokens to "default".
728 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
729 (random_device::_M_getval()): Use new union members to obtain a
730 random number from the stored function pointer or file descriptor.
731 [USE_MT19937]: Obtain a value from the mt19937 engine.
732 (random_device::_M_getval_pretr1()): Call _M_getval().
733 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
734 instead of fileno.
735 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
736 * testsuite/26_numerics/random/random_device/85494.cc: New test.
737
88c39923 7382019-05-28 Jonathan Wakely <jwakely@redhat.com>
739
28d9dbe9 740 PR libstdc++/90634
741 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
742 _M_split_cmpts() for a path with multiple components.
743 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
744 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
745 components and reserve space in vector. Return early when there is
746 only one component.
747 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
748 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
749
88c39923 750 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
751 form of std::equals for C++11 compatibility.
752
ba475497 7532019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
754
755 * doc/xml/manual/appendix_contributing.xml: Update pointer to
756 C++ standard at ansi.org.
757
6c35f2e2 7582019-05-24 Jonathan Wakely <jwakely@redhat.com>
759
62ff07d4 760 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
761 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
762 to "run".
763
6c35f2e2 764 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
765 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
766
e0a966c0 7672019-05-23 Jonathan Wakely <jwakely@redhat.com>
768
2b16b231 769 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
770 tests to ...
771 * testsuite/20_util/function_objects/invoke/3.cc: New test.
772 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
773 "compile" test to "run".
774
a00d36cd 775 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
776 * doc/html/*: Regenerate.
777 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
778 rvalue aliasing constructor.
779 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
780 (reinterpret_pointer_cast): Add overloads taking rvalues.
781 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
782 Add rvalue aliasing constructor.
783 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
784 "run" and check return values as well as types.
785 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
786 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
787 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
788 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
789 values.
790
e0a966c0 791 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
792 * doc/xml/manual/intro.xml: Likewise.
793 * include/std/future (__create_task_state): Add default arguments
794 to make providing an allocator optional.
795 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
796 instead of delegating to another constructor.
797 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
798 define allocator-extended constructors for C++17 and later.
799 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
800 C++11 and C++14.
801 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
802 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
803 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
804
8e2a1096 8052019-05-23 Hans-Peter Nilsson <hp@axis.com>
806
807 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
808 Don't run the libstdc++/83237 part on simulator targets.
809
1db1e5cc 8102019-05-23 Jonathan Wakely <jwakely@redhat.com>
811
01e2f379 812 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
813 P0040R3.
814 * doc/html/*: Regenerate.
815
683f9728 816 * include/experimental/any (__any_caster): Use RTTI if comparing
817 addresses fails, to support non-unique addresses in shared libraries.
818 * include/std/any (__any_caster): Likewise.
819
1db1e5cc 820 PR libstdc++/90220
821 * include/experimental/any (__any_caster): Constrain to only be
822 callable for object types. Use remove_cv_t instead of decay_t.
823 If the type decays or isn't copy constructible, compare the manager
824 function to a dummy specialization.
825 (__any_caster): Add overload constrained for non-object types.
826 (any::_Manager_internal<_Op>): Add dummy specialization.
827 * testsuite/experimental/any/misc/any_cast.cc: Test function types
828 and array types.
829
0fd64d4b 8302019-05-22 Jonathan Wakely <jwakely@redhat.com>
831
f92c002f 832 PR libstdc++/90557
833 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
834 reversed arguments to uninitialized_copy_n.
835 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
836 is unchanged by copy assignment.
837 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
838 compare path components.
839
0fd64d4b 840 PR libstdc++/77691
841 * include/experimental/memory_resource: Add system header pragma and
842 do not define anything unless compiled as C++14 or later.
843 (__resource_adaptor_common::__guaranteed_alignment): Remove.
844 (__resource_adaptor_imp::do_allocate): If the requested alignment
845 is a fundamental alignment then either allocate directly from _M_alloc
846 or call the new _M_allocate function.
847 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
848 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
849 of the allocator rebound to a POD type with the specified alignment.
850 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
851 * testsuite/experimental/memory_resource/new_delete_resource.cc:
852 Adjust expected allocation sizes.
853 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
854 xfail for Solaris x86.
855
71835cce 8562019-05-21 Thomas Rodgers <trodgers@redhat.com>
857
858 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
859 * include/pstl/execution_defs.h (__enable_if_execution_policy):
860 Use std::__remove_cvref_t when building with GCC.
861
28ceb89c 8622019-05-21 Jonathan Wakely <jwakely@redhat.com>
863
f6baa5a2 864 PR libstdc++/90252
865 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
866 Use "additional_flags" to pass -ltbb to v3_target_compile command.
867 Use check_v3_target_prop_cached to cache the result of the test.
868
28ceb89c 869 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
870
4573584f 8712019-05-20 Thomas Rodgers <trodgers@redhat.com>
872
873 PR libstdc++/90252
874 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
875 Changed v3_target_compile check from preprocess to executable.
876 Added "-ltbb" to v3_target_compile flags.
877
c40bd82f 8782019-05-20 Thomas Rodgers <trodgers@redhat.com>
879
880 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
881 Add check for Thread Building Blocks 2018 or later.
882
4b6650e5 8832019-05-20 Jonathan Wakely <jwakely@redhat.com>
884
885 * testsuite/experimental/names.cc: Only include Networking TS headers
886 on targets with the necessary Gthreads support.
887
31d01c8b 8882019-05-20 Marek Polacek <polacek@redhat.com>
889
890 CWG 2094 - volatile scalars are trivially copyable.
891 PR c++/85679
892 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
893 result for volatile int.
894
48328bff 8952019-05-20 Jonathan Wakely <jwakely@redhat.com>
896
120050c3 897 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
898 * testsuite/experimental/names.cc: Include <experimental/filesystem>
899 conditionally.
900
48328bff 901 PR c++/90532 Ensure __is_constructible(T[]) is false
902 * include/std/type_traits (__do_is_default_constructible_impl)
903 (__is_default_constructible_atom, __is_default_constructible_safe):
904 Remove.
905 (is_default_constructible): Use is_constructible.
906 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
907 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
908 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
909 * testsuite/20_util/is_trivially_default_constructible/value.cc:
910 Likewise.
911
d07edb65 9122019-05-20 Pádraig Brady <pbrady@fb.com>
913
914 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
915 to the deallocator with -fsized-deallocation.
916
ca32b3df 9172019-05-20 Jonathan Wakely <jwakely@redhat.com>
918
919 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
920 test by passing correct alignment to deallocate function.
921
83454be6 9222019-05-18 Jonathan Wakely <jwakely@redhat.com>
923
924 PR libstdc++/90520
925 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
926 Raise exception if unique_ptr tuple member has unknown structure.
927 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
928 Adjust worker to support new __uniq_ptr_data base class. Do not
929 assume field called _M_head_impl is the first tuple element.
930
18788b25 9312019-05-17 François Dumont <fdumont@gcc.gnu.org>
932
933 * include/bits/stl_deque.h
934 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
935 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
936 (_Deque_base::_Deque_impl_data): New.
937 (_Deque_base::_Deque_impl): Inherit latter.
938 (_Deque_base::_Deque_impl::_M_swap_data): Move...
939 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
940 (_Deque_base::_Deque_impl()): Add noexcept qualification.
941 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
942 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
943 (deque<>::deque()): Default.
944 (deque<>::deque(deque&&)): Default.
945 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
946 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
947 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
948 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
949 _M_range_initialize.
950 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
951 (deque<>::resize(size_type, const value_type&)): Share a single
952 implementation.
953 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
954 _M_range_insert_aux.
955 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
956 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
957 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
958 * testsuite/23_containers/deque/allocator/default_init.cc: New.
959
f02e0f08 9602019-05-17 Jonathan Wakely <jwakely@redhat.com>
961
9bf46b60 962 PR libstdc++/90246
963 * include/std/variant (holds_alternative, get, get_if): Improve
964 static assertion messages.
965 (bad_variant_access::bad_variant_access()): Change default message.
966 (__throw_bad_variant_access(bool)): New overload.
967 (get): Use new overload.
968 (visit, visit<R>): Improve exception message.
969
ac93735b 970 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
971 targets. Add more cases from P0608R3.
972 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
973
8d58624a 974 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
975 * include/experimental/type_traits (is_detected_exact)
976 (is_detected_exact_v): Likewise.
977 * include/pstl/execution_defs.h (is_execution_policy)
978 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
979 * include/pstl/execution_impl.h (__policy_traits): Likewise.
980 * testsuite/17_intro/names.cc: Check for more non-reserved names.
981 * testsuite/experimental/names.cc: New test.
982
5d3695d0 983 PR libstdc++/85965
984 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
985 assertions from the destructor.
986 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
987 Move static_assert for hash function to here.
988 (_Hash_table_base::_M_equals): Move static_assert for equality
989 predicate to here.
990 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
991 Remove.
992 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
993 the value directly instead of calling _S_value.
994 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
995 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
996 _S_key(_Const_Link_type).
997 * testsuite/23_containers/set/85965.cc: Check construction,
998 destruction, assignment and size() do not trigger the assertions.
999 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1000 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1001 expected errors.
1002 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1003 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1004 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1005 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1006 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1007 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1008 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1009
2e431291 1010 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1011 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1012 in C++11.
1013
f02e0f08 1014 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1015 P1165R1 entries.
1016 * doc/html/*: Regenerate.
1017 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1018 of decay_t (P0777R1).
1019
0cde8d2e 10202019-05-17 François Dumont <fdumont@gcc.gnu.org>
1021
1022 Move from state of allocators (LWG2593)
1023 * include/bits/stl_deque.h
1024 (_Deque_base(_Deque_base&&, false_type)): Remove.
1025 (_Deque_base(_Deque_base&&, true_type)): Remove.
1026 (_Deque_base(_Deque_base&&)): Adapt.
1027 (_Deque_base::_M_move_impl()): Remove.
1028 * testsuite/util/testsuite_allocator.h
1029 (propagating_allocator(propagating_allocator&&)): Preserve move from
1030 state.
1031 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1032 Adapt.
1033 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1034 Adapt.
1035 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1036 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1037 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1038 Adapt.
1039 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1040 Adapt.
1041 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1042 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1043 (test02): Adapt.
1044 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1045 (test02): Adapt.
1046 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1047 (test02): Adapt.
1048 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1049 (test02): Adapt.
1050 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1051 Adapt.
1052 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1053 Adapt.
1054 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1055 (test02): Adapt.
1056 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1057 (test02): Adapt.
1058
68605c77 10592019-05-16 Jonathan Wakely <jwakely@redhat.com>
1060
4a0707ea 1061 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1062 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1063
a8a0d164 1064 * include/std/variant (__overload_set): Remove.
1065 (_Arr): New helper.
1066 (_Build_FUN): New class template to define a single FUN overload,
1067 with specializations to prevent unwanted conversions, as per P0608R3.
1068 (_Build_FUNs): New class template to build an overload set of FUN.
1069 (_FUN_type): New alias template to perform overload resolution.
1070 (__accepted_type): Use integer_constant base for failure case. Use
1071 _FUN_type for successful case.
1072 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1073 (variant::variant(_Tp&&)): Likewise.
1074 (variant::operator=(_Tp&&)): Likewise.
1075
facad3f4 1076 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1077 Replace raw visitation with a runtime check for the valueless state
1078 and a non-raw visitor.
1079 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1080 (variant::index()): Remove branch.
1081 (variant::swap(variant&)): Use valueless_by_exception() instead of
1082 comparing the index to variant_npos, and add likelihood attribute.
1083
47376ba0 1084 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1085 (_Hashtable_base::_Equal_hash_code): Define new class template.
1086 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1087 _Equal_helper.
1088
81262974 1089 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1090 Replace with _M_get non-static member function.
1091 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1092 member function.
1093 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1094 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1095
68605c77 1096 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1097 _S_get accessors for members in EBO helpers.
1098 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1099 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1100 overloads.
1101 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1102 helpers.
1103 (_Hashtable_base::_M_eq()): Remove non-const overload.
1104
970ec9ab 11052019-05-15 Jonathan Wakely <jwakely@redhat.com>
1106
1107 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1108
54f34abb 11092019-05-14 Jonathan Wakely <jwakely@redhat.com>
1110
1111 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1112 Fix return value.
1113
0fd03648 11142019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1115
1116 * config/os/solaris/solaris2.10: Move to ...
1117 * config/os/solaris: ... this.
1118 * configure.host (os_include_dir): Adapt.
1119 (abi_baseline_pair): Remove Solaris 10 handling.
1120 * config/abi/post/i386-solaris2.10: Remove.
1121 * config/abi/post/sparc-solaris2.10: Remove.
1122 * config/abi/post/i386-solaris2.11: Rename to ...
1123 * config/abi/post/i386-solaris: ... this.
1124 * config/abi/post/sparc-solaris2.11: Rename to ...
1125 * config/abi/post/sparc-solaris: ... this.
1126
1127 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1128 workaround.
1129
1130 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1131 xfail.
1132
f03f26fa 11332019-05-14 Jonathan Wakely <jwakely@redhat.com>
1134
1135 * include/std/variant (__visit_with_index): Remove typedef.
1136 (__deduce_visit_result): New tag type.
1137 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1138 visitation of possibly-valueless variants, forwarding to __do_visit
1139 with the relevant tag type.
1140 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1141 and make lambda return void.
1142 (__variant_construct): Likewise.
1143 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1144 __raw_idx_visit and make lambda return void.
1145 (_Multi_array::__untag_result): Add metafunction to check the function
1146 pointer type for a tag type that dictates the kind of visitation.
1147 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1148 Use decltype(auto) instead of tagged function pointer type.
1149 (__gen_vtable_impl): Remove bool non-type parameter and unused
1150 _Variant_tuple parameter.
1151 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1152 (__gen_vtable_impl::__do_visit_invoke): Remove.
1153 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1154 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1155 for the visit<R> case, rather than dispatching to separate functions.
1156 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1157 lambda return void.
1158 (variant::swap): Likewise.
1159 (__do_visit): Replace two non-type template parameters with a single
1160 type parameter, so that the caller must specify the visitor's return
1161 type (or one of the tag types).
1162 (visit): Deduce a return type from the visitor and use the
1163 __deduce_visit_result tag to enforce that all overloads return the
1164 same type.
1165 (visit<R>): Call __do_visit<R> with explicit result type.
1166 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1167 lambda return void.
1168
b8dcd41e 11692019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1170
1171 nonesuch is insufficiently useless (lwg2996)
1172 * include/std/type_traits (struct __nonesuch): Added private base
1173 class to make __nonesuch not an aggregate and removed deleted default
1174 constructor.
1175 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1176 (operator=(const pair&)): Use __nonesuch instead of
1177 __nonesuch_no_braces.
1178 (operator=(pair&&)): Likewise
1179 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1180 of __nonesuch_no_braces.
1181 (operator=(tuple&&)): Likewise
1182 * include/experimental/type_traits (struct nonesuch): Added private
1183 base class to make nonesuch not an aggregate and removed deleted
1184 default constructor.
1185 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1186 * testsuite/experimental/type_traits/nonesuch.cc: New.
1187
e0bcd31d 11882019-05-14 Jonathan Wakely <jwakely@redhat.com>
1189
3ff2b640 1190 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1191 (_Function_handler): Remove partial specializations for void return
1192 types and pointers to member.
1193 (_Function_handler::_M_manager): Adapt to removal of
1194 _Simple_type_wrapper.
1195 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1196 * include/std/functional (_Bind_result::__enable_if_void)
1197 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1198 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1199 return types.
1200 * include/std/future (__future_base::_Task_state::_M_run)
1201 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1202 change return type of lambda expressions.
1203
a858e2a4 1204 * include/bits/invoke.h (__invoke_r): Define new function implementing
1205 the INVOKE<R> pseudo-function.
1206 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1207 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1208
2cfc6a76 1209 * include/std/type_traits (__is_nt_convertible_helper): Define it
1210 unconditionally, not only for C++20.
1211 (__is_nothrow_convertible): Define internal trait for use in C++11.
1212 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1213 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1214 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1215 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1216 that has nothrow explicit conversion but potentially-throwing implicit
1217 conversion.
1218 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1219 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1220 function to only consider implicit conversions.
1221 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1222
e0d65374 1223 * include/std/iterator: Include <iosfwd> instead of <istream> and
1224 <ostream>.
1225
4a182e12 1226 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1227 Remove unused, non-standard function.
1228
d4a9b293 1229 * include/bits/regex.h (match_results::max_size()): Adjust return
1230 value to account for prefix/suffix/unmatched subs.
1231 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1232 reset the contained sub matches.
1233 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1234 function to set result state following a failed match.
1235 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1236 sub_match states after _M_resize. Use _M_establish_failed_match.
1237
e0bcd31d 1238 PR libstdc++/69724
1239 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1240 Replace single _Callable parameter with variadic _Args pack, to
1241 forward them directly to the tuple of decayed copies.
1242 * testsuite/30_threads/thread/cons/69724.cc: New test.
1243
872d7a1f 12442019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1245
1246 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1247 * include/bits/basic_string.h: (operator=(const basic_string&):
1248 Move allocator decision to assign.
1249 (assign(const basic_string&)): Move allocator decision here.
1250 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1251 Add tests.
1252 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1253 Add tests.
1254
67dff8a4 12552019-05-14 Jonathan Wakely <jwakely@redhat.com>
1256
155856f9 1257 * testsuite/util/testsuite_allocator.h (memory_resource)
1258 (default_resource_mgr): Fix indentation.
1259
94e98eda 1260 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1261 Use operator-> to access raw pointer member.
1262 * testsuite/23_containers/vector/59829.cc: Likewise.
1263 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1264 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1265 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1266 for tests.
1267 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1268 its constructors and equality operators. Change converting
1269 constructors to use operator-> to access private member of the other
1270 pointer type.
1271 (PointerBase_void::operator->()): Add, for access to private member.
1272 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1273 (operator==(PointerBase, PointerBase)): Remove.
1274 (operator!=(PointerBase, PointerBase)): Remove.
1275
8ac285f1 1276 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1277 not assume field called _M_head_impl is the first tuple element.
1278 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1279 implementation more accurate.
1280 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1281 empty pointer type and non-empty deleter.
1282
67dff8a4 1283 LWG 2899 - Make is_move_constructible correct for unique_ptr
1284 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1285 move assignment operator.
1286 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1287 (__uniq_ptr_data): New class template with conditionally deleted
1288 special members.
1289 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1290 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1291 constructor and move assignment operator as defaulted.
1292 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1293 __uniq_ptr_impl::release().
1294 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1295 to __uniq_ptr_impl::reset(pointer).
1296 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1297 Check for new __uniq_ptr_data type.
1298 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1299
6818ab51 13002019-05-13 Jonathan Wakely <jwakely@redhat.com>
1301
fecfaafd 1302 PR libstdc++/90454.cc path construction from void*
1303 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1304 pointers to void are rejected as well as void.
1305 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1306 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1307 pointers to void.
1308 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1309
6818ab51 1310 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1311 <remark> elements. Fix formatting of bibliography references.
1312
8967657e 13132019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1314
1315 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1316
8dd55415 13172019-05-13 Jonathan Wakely <jwakely@redhat.com>
ca8ead92 1318
b6cabd65 1319 Remove Profile Mode, deprecated since 7.1.0
1320 * doc/Makefile.am: Remove XML file for profile mode docs.
1321 * doc/Makefile.in: Regenerate.
1322 * doc/xml/authors.xml: Remove authors of profile mode docs.
1323 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1324 mode.
1325 * doc/xml/manual/debug.xml: Likewise.
1326 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1327 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1328 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1329 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1330 directive.
1331 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1332 macro.
1333 * doc/html/*: Regenerate.
1334 * include/Makefile.am: Remove profile mode headers.
1335 * include/Makefile.in: Regenerate.
1336 * include/bits/c++config (std::__profile): Remove namespace.
1337 [_GLIBCXX_PROFILE]: Remove checks for macro.
1338 * include/profile/array: Remove.
1339 * include/profile/base.h: Remove.
1340 * include/profile/bitset: Remove.
1341 * include/profile/deque: Remove.
1342 * include/profile/forward_list: Remove.
1343 * include/profile/impl/profiler.h: Remove.
1344 * include/profile/impl/profiler_algos.h: Remove.
1345 * include/profile/impl/profiler_container_size.h: Remove.
1346 * include/profile/impl/profiler_hash_func.h: Remove.
1347 * include/profile/impl/profiler_hashtable_size.h: Remove.
1348 * include/profile/impl/profiler_list_to_slist.h: Remove.
1349 * include/profile/impl/profiler_list_to_vector.h: Remove.
1350 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1351 * include/profile/impl/profiler_node.h: Remove.
1352 * include/profile/impl/profiler_state.h: Remove.
1353 * include/profile/impl/profiler_trace.h: Remove.
1354 * include/profile/impl/profiler_vector_size.h: Remove.
1355 * include/profile/impl/profiler_vector_to_list.h: Remove.
1356 * include/profile/iterator_tracker.h: Remove.
1357 * include/profile/list: Remove.
1358 * include/profile/map: Remove.
1359 * include/profile/map.h: Remove.
1360 * include/profile/multimap.h: Remove.
1361 * include/profile/multiset.h: Remove.
1362 * include/profile/ordered_base.h: Remove.
1363 * include/profile/set: Remove.
1364 * include/profile/set.h: Remove.
1365 * include/profile/unordered_base.h: Remove.
1366 * include/profile/unordered_map: Remove.
1367 * include/profile/unordered_set: Remove.
1368 * include/profile/vector: Remove.
1369 * scripts/run_doxygen: Do not process profile mode headers.
1370 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1371 profile mode type.
1372 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1373 Remove dg-skip-if for profile mode.
1374 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1375 preprocessor check for profile mode.
1376 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1377 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1378 for profile mode.
1379 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1380 Likewise.
1381 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1382 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1383 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1384 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1385 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1386 Likewise.
1387 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1388 Likewise.
1389 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1390 Likewise.
1391 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1392 Likewise.
1393 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1394 preprocessor check for profile mode.
1395 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1396 Likewise.
1397 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1398 Remove dg-skip-if for profile mode.
1399 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1400 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1401 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1402 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1403 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1404 * testsuite/Makefile.am: Remove profile_flags variable and
1405 * testsuite/Makefile.am: Remove profile_flags variable and
1406 check-profile target.
1407 * testsuite/Makefile.in: Regenerate.
1408 * testsuite/ext/profile/all.cc: Remove.
1409 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1410 * testsuite/ext/profile/profiler_algos.cc: Remove.
1411 * testsuite/ext/profile/replace_new.cc: Remove.
1412 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1413 preprocessor check for profile mode.
1414 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1415 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1416 (check_v3_target_normal_mode): Do not check for profile mode macro.
1417 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1418 profile mode.
1419 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1420 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1421 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1422 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1423 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1424 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1425 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1426 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1427 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1428 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1429
ca8ead92 1430 Remove array_allocator extension, deprecated since 4.9.0
1431 * doc/xml/manual/allocator.xml: Remove documentation for
1432 array_allocator.
1433 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1434 * doc/xml/manual/using.xml: Remove header from documentation.
1435 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1436 * include/Makefile.in: Regenerate.
1437 * include/ext/array_allocator.h: Remove.
1438 * include/precompiled/extc++.h: Do not include removed header.
1439 * testsuite/ext/array_allocator/1.cc: Remove.
1440 * testsuite/ext/array_allocator/2.cc: Remove.
1441 * testsuite/ext/array_allocator/26875.cc: Remove.
1442 * testsuite/ext/array_allocator/3.cc: Remove.
1443 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1444 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1445 * testsuite/ext/array_allocator/check_new.cc: Remove.
1446 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1447 * testsuite/ext/headers.cc: Do not include removed header.
1448
64b2700c 14492019-05-11 François Dumont <fdumont@gcc.gnu.org>
1450
1451 * include/bits/stl_bvector.h
1452 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1453 Make hidden friend.
1454 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1455 Likewise.
1456 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1457 Likewise.
1458 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1459 Likewise.
1460 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1461 Likewise.
1462 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1463 Likewise.
1464 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1465 Likewise.
1466 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1467 copy elision.
1468 (_Bit_iterator::operator-(difference_type)): Likewise.
1469 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1470 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1471 NRVO copy elision.
1472 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1473 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1474
de3f1d9a 14752019-05-10 Jonathan Wakely <jwakely@redhat.com>
1476
eb1be9e7 1477 PR libstdc++/81266
1478 * testsuite/util/thread/all.h: Do not use remove_pointer for
1479 std::thread::native_handle_type.
1480
5c6334a5 1481 PR libstdc++/90397
1482 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1483 (_Variant_storage<true, Types...>::_M_reset()))
1484 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1485 (__get_storage): Likewise.
1486 (variant): Add noexcept to friend declarations for __get and
1487 __get_storage.
1488
3e5c91bd 1489 PR libstdc++/90388
1490 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1491 Use _Require for constraints.
1492 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1493 per the standard.
1494 (__uniq_ptr_hash): New base class with conditionally-disabled call
1495 operator.
1496 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1497 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1498 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1499
de3f1d9a 1500 * include/bits/shared_ptr.h: Improve docs.
1501 * include/bits/shared_ptr_base.h: Likewise.
1502 * include/bits/stl_uninitialized.h: Likewise.
1503 * include/bits/unique_ptr.h: Likewise.
1504 * libsupc++/new: Likewise.
1505
d084c5ba 15062019-05-09 François Dumont <fdumont@gcc.gnu.org>
1507
1508 * include/bits/stl_deque.h
1509 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1510 Make hidden friend.
1511 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1512 Likewise.
1513 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1514 Likewise.
1515 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1516 Likewise.
1517 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1518 Likewise.
1519 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1520 Likewise.
1521 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1522 copy elision.
1523 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1524
0f61cb49 15252019-05-08 François Dumont <fdumont@gcc.gnu.org>
1526
1527 PR libstdc++/90277
1528 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
1529 (test01): Reserve for number of insertions to avoid rehash during test.
1530 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1531 (test01): Likewise.
1532 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
1533 (test01): Likewise.
1534 (test02): Likewise.
1535 (test03): Likewise.
1536
c800ee48 15372019-05-08 Jonathan Wakely <jwakely@redhat.com>
1538
1539 * include/experimental/bits/fs_path.h: Improve docs.
1540 * include/experimental/bits/net.h: Fix wrong header name in comment.
1541 Do not document implementation details.
1542 * include/experimental/netfwd: Fix doxygen grouping.
1543
b103d23d 15442019-05-07 Jonathan Wakely <jwakely@redhat.com>
1545
aa371af3 1546 * include/bits/stl_pair.h: Improve docs.
1547 * include/std/tuple: Likewise.
1548
dceea60f 1549 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1550 inline namespace.
1551 * include/std/chrono: Improve docs.
1552 * include/std/ratio: Do not document implementation details.
1553 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1554 line numbers.
1555 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1556
a9ae69b5 1557 PR libstdc++/89102
1558 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1559 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1560 (__duration_common_type): New helper.
1561 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1562 __duration_common_type.
1563 (__timepoint_common_type_wrapper): Replace with ...
1564 (__timepoint_common_type): New helper.
1565 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1566 Use __time_point_common_type.
1567 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1568 (__common_type_impl): If either argument is transformed by decay,
1569 use the common_type of the decayed types.
1570 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1571 decayed, use __do_common_type_impl to get the common_type.
1572 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1573 (__do_member_type_wrapper, __member_type_wrapper)
1574 (__expanded_common_type_wrapper): Remove.
1575 (__common_type_pack, __common_type_fold): New helpers.
1576 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1577 __member_type_wrapper and __expanded_common_type_wrapper.
1578 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1579 Test zero-length template argument list.
1580 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1581 Test single argument cases and argument types that should decay.
1582 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1583 Adjust expected error.
1584 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1585 dg-error lineno.
1586 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1587 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1588 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1589
b103d23d 1590 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1591
69be6ea5 15922019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1593
1594 Make allocator propagation more consistent for
1595 operator+(basic_string) (P1165R1)
1596 * include/bits/basic_string.h
1597 (operator+(basic_string&&, basic_string&&): Changed resulting
1598 allocator to always be the one from the first parameter.
1599 * include/bits/basic_string.tcc
1600 (operator+(const _CharT*, const basic_string&)): Changed
1601 resulting allocator to be SOCCC on the second parameter's allocator.
1602 (operator+(_CharT, const basic_string&)): Likewise.
1603 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1604 New.
1605 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1606 New.
1607
845d0fd6 16082019-05-07 Jonathan Wakely <jwakely@redhat.com>
1609
29499715 1610 * include/bits/regex.h: Improve docs.
1611 * include/bits/regex.tcc: Do not document implementation details.
1612
845d0fd6 1613 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1614
3eec8b67 16152019-05-06 François Dumont <fdumont@gcc.gnu.org>
1616
1617 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1618 Add type printer for container types in std::__debug namespace.
1619 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1620 (gdb-tests): Use distinct parameters for the type of test and use of
1621 regex.
1622 (gdb-test): Check for regex test even if 'whatis' test.
1623 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1624 mode.
1625 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1626 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1627 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1628 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1629 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1630 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1631 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1632
80175534 16332019-05-04 Jonathan Wakely <jwakely@redhat.com>
1634
2d527eb0 1635 * include/std/system_error (error_category): Fix comment.
1636
84eda927 1637 PR libstdc++/90299
1638 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1639 argument is an empty path.
1640 (absolute(const path&, error_code&)): Use invalid_argument as error
1641 code instead of no_such_file_or_directory.
1642 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1643 of non-existent paths and empty paths with both overloads of absolute.
1644
98a3d630 1645 * include/std/system_error (error_category, error_code)
1646 (error_condition): Improve docs.
1647 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1648 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1649 to class documentation. Suppress documentation for implementation
1650 details.
1651 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1652 Suppress documentation for implementation details.
1653
80175534 1654 * include/std/system_error (error_code): Remove friend declaration
1655 for hash<error_code>.
1656 (hash<error_code>::operator()): Use public member functions to access
1657 value and category.
1658 (hash<error_condition>::operator()): Use address of category, not
1659 its object representation.
1660 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1661 Use public member functions to access value and category.
1662 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1663
476bdccf 16642019-05-04 François Dumont <fdumont@gcc.gnu.org>
1665
1666 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1667 * include/bits/hashtable_policy.h
1668 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1669 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1670 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1671 smaller than input value rather than always greater. Preserve
1672 _M_next_resize if called with 0 input. Use __builtin_floorl.
1673 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1674 elements + number of insertions is greater than _M_next_resize. Start
1675 with 11 buckets if not told otherwise. Use __builtin_floorl.
1676 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1677 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1678 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1679 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1680 told otherwise. Use __builtin_floorl.
1681 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1682 to also validate _Power2_rehash_policy.
1683 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1684 Adapt.
1685
2051f7c0 16862019-05-03 Jonathan Wakely <jwakely@redhat.com>
1687
85015e21 1688 PR libstdc++/61761
1689 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1690 std::copysign.
1691
2051f7c0 1692 PR libstdc++/52119
1693 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1694 overflow warning with -Wpedantic -Wsystem-headers.
1695
c47265a8 16962019-05-02 Jonathan Wakely <jwakely@redhat.com>
1697
9766cefe 1698 PR libstdc++/90314
1699 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1700 * include/bits/move.h (swap): Remove extra parentheses.
1701
6bd15da3 1702 * include/experimental/bits/lfts_config.h: Improve doc markup.
1703 * include/experimental/optional: Improve docs.
1704 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1705 (__constexpr_addressof): Remove.
1706 (optional::operator->()): Use std::__addressof().
1707 * include/std/optional (optional::operator->()): Adjust whitespace.
1708 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1709 that operator-> is still constexpr with overloaded operator&. Change
1710 to compile-only test.
1711 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1712 compile-only test.
1713
f4673ac1 1714 * include/bits/shared_ptr.h: Improve docs.
1715 * include/bits/shared_ptr_atomic.h: Likewise.
1716 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1717
c88f1c9d 1718 * include/bits/basic_string.h: Fix iterator/index confusion in
1719 Doxygen comments.
1720 * include/bits/range_access.h: Fix Doxygen warnings.
1721 * include/bits/refwrap.h: Do not document implementation details.
1722 (ref, cref): Group docs with reference_wrapper.
1723 * include/std/fstream: Fix Doxygen markup.
1724 * libsupc++/initializer_list (begin, end): Group docs with
1725 initializer_list.
1726
0276ef36 1727 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1728
5ba27b7d 1729 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1730 * include/std/mutex: Likewise.
1731 * include/std/shared_mutex: Likewise.
1732
c2046340 1733 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1734 * include/bits/fs_fwd.h: Likewise.
1735 * include/bits/fs_ops.h: Likewise.
1736 * include/bits/fs_path.h: Likewise.
1737 * include/std/filesystem: Likewise.
1738
f73340aa 1739 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1740 * include/experimental/buffer: Likewise.
1741 * include/experimental/executor: Likewise.
1742 * include/experimental/internet: Likewise.
1743 * include/experimental/io_context: Likewise.
1744 * include/experimental/net: Likewise.
1745 * include/experimental/netfwd: Likewise.
1746 * include/experimental/socket: Likewise.
1747 * include/experimental/timer: Likewise.
1748
b87d52bd 1749 * doc/doxygen/doxygroups.cc: Move description of experimental group
1750 here.
1751 * include/experimental/algorithm: Add to libfund-ts doc group.
1752 * include/experimental/any: Likewise. Do not document implementation
1753 details.
1754 * include/experimental/array: Add to libfund-ts doc group.
1755 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1756 for Library Fundamentals.
1757 * include/experimental/chrono: Add to libfund-ts doc group.
1758 * include/experimental/deque: Likewise.
1759 * include/experimental/forward_list: Likewise.
1760 * include/experimental/functional: Likewise.
1761 * include/experimental/iterator: Likewise.
1762 * include/experimental/list: Likewise.
1763 * include/experimental/map: Likewise.
1764 * include/experimental/memory: Likewise.
1765 * include/experimental/memory_resource: Likewise. Improve docs.
1766 details.
1767 * include/experimental/numeric: Add to libfund-ts doc group.
1768 * include/experimental/optional: Likewise.
1769 * include/experimental/propagate_const: Likewise.
1770 * include/experimental/random: Likewise.
1771 * include/experimental/ratio: Likewise.
1772 * include/experimental/regex: Likewise.
1773 * include/experimental/set: Likewise.
1774 * include/experimental/source_location: Likewise.
1775 * include/experimental/string: Likewise.
1776 * include/experimental/string_view: Likewise.
1777 * include/experimental/system_error: Likewise.
1778 * include/experimental/tuple: Likewise.
1779 * include/experimental/type_traits: Likewise.
1780 * include/experimental/unordered_map: Likewise.
1781 * include/experimental/unordered_set: Likewise.
1782 * include/experimental/utility: Likewise.
1783 * include/experimental/vector: Likewise.
1784 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1785 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1786 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1787 Likewise.
1788 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1789 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1790 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1791 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1792 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1793
07894d48 1794 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1795 * include/experimental/bits/fs_fwd.h: Improve docs.
1796 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1797 * include/experimental/bits/fs_path.h: Likewise.
1798 (path, filesystem_error, u8path): Improve docs.
1799 * include/experimental/filesystem: Link to docs for TS.
1800
cd877474 1801 * config/allocator/new_allocator_base.h (__allocator_base): Add
1802 workaround for Doxygen bug #6945.
1803 * include/std/memory: Improve docs. Define group for pointer safety.
1804 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1805 conditional to suppress documentation for implementation details.
1806
72e8cf41 1807 * include/bits/specfun.h: Improve docs.
1808 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1809 and namespaces.
1810
633c66f0 1811 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1812 (std::experimental): Add docs.
1813 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1814 namespace to nothing when generating docs.
1815 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1816 * include/std/chrono (std::chrono): Likewise.
1817 * include/std/functional (std::placeholders): Likewise.
1818 * include/std/thread (std::this_thread): Likewise.
1819
17035a16 1820 * include/parallel/settings.h: Fix Doxygen markup.
1821
6de90d17 1822 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1823 anything unless PB_DS_CLASS_C_DEC is defined.
1824 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1825 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1826 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1827 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1828 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1829 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1830 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1831 Likewise.
1832 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1833 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1834 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1835 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1836 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1837 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1838 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1839 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1840 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1841 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1842 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1843 Likewise.
1844 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1845 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1846 Likewise.
1847 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1848 Likewise.
1849
c47265a8 1850 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1851 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1852 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1853 Doxygen expands.
1854
269f393a 18552019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1856
1857 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1858 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1859 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1860 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1861 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1862 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1863 Likewise.
1864 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1865 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1866 Likewise.
1867
c64aa5a2 18682019-05-01 Jonathan Wakely <jwakely@redhat.com>
1869
1870 PR libstdc++/61761
1871 * include/std/complex (__complex_proj): Return parameter unchanged.
1872 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1873 floating-point types to take std::complex arguments.
1874 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1875 floating-point types.
1876 * testsuite/26_numerics/complex/proj.cc: New test.
1877
9d5de90f 18782019-04-30 Jakub Jelinek <jakub@redhat.com>
1879
1880 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1881 to _Lock_policyE[012].
1882 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1883
612b2ae7 18842019-04-30 Jonathan Wakely <jwakely@redhat.com>
1885
1886 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1887 macros accidentally left in.
1888 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1889 unnecessary -lstdc++fs option. Fix test for mingw.
1890 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1891 Fix test for mingw.
1892
55843567 18932019-04-30 Jakub Jelinek <jakub@redhat.com>
1894
1895 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1896
c5aaf0af 18972019-04-29 Jonathan Wakely <jwakely@redhat.com>
1898
d9375e49 1899 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1900
744a3010 1901 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1902 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1903
e3600f25 1904 PR libstdc++/71312
1905 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1906
4b7f4f12 1907 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1908 attribute.
1909
94ed6c0a 1910 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1911 class template and partial specialization.
1912
c5aaf0af 1913 PR libstdc++/87982
1914 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1915 an integral type.
1916 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1917 functions to convert a value to an integral type.
1918 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1919 (fill_n): Convert _Size parameter to an integral type.
1920 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1921 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1922 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1923 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1924 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1925 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1926
ac8f540e 19272019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
a4360611 1928
1929 Adding noexcept-specification on tuple constructors (LWG 2899)
1930 * libstdc++-v3/include/std/tuple:
1931 (tuple()): Add noexcept-specification.
1932 (tuple(const _Elements&...)): Likewise
1933 (tuple(_UElements&&...)): Likewise
1934 (tuple(const tuple<_UElements...>&)): Likewise
1935 (tuple(tuple<_UElements...>&&)): Likewise
1936 (tuple(const _T1&, const _T2&)): Likewise
1937 (tuple(_U1&&, _U2&&)): Likewise
1938 (tuple(const tuple<_U1, _U2>&): Likewise
1939 (tuple(tuple<_U1, _U2>&&): Likewise
1940 (tuple(const pair<_U1, _U2>&): Likewise
1941 (tuple(pair<_U1, _U2>&&): Likewise
1942 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1943
b9fe1c54 19442019-04-27 Marc Glisse <marc.glisse@inria.fr>
1945
1946 PR libstdc++/87106
1947 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1948 arguments with __restrict.
1949
a596cded 19502019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1951
1952 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1953
051e444d 19542019-04-26 Jonathan Wakely <jwakely@redhat.com>
1955
3c259ff8 1956 * include/experimental/bits/fs_path.h
1957 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1958 avoid redundant call to _S_convert_loc with non-const pointers.
1959
2f95fa8e 1960 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1961 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1962 * testsuite/21_strings/basic_string/hash/hash.cc
1963 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1964 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1965 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1966
46933618 1967 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1968 wstring::_M_replace_dispatch with more specific patterns.
1969 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1970 Create const std::string to avoid redundant call to _S_convert_loc
1971 with non-const pointers.
1972 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1973 avoid unnecessary basic_string::assign instantiations.
1974
051e444d 1975 * include/std/memory (__uses_alloc_args): Add string-literal to
1976 static_assert, to match the one in __uses_alloc.
1977 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1978 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1979 for recursive uses-allocator construction of nested pairs.
1980 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1981 comment.
1982
db1349a6 19832019-04-26 Jakub Jelinek <jakub@redhat.com>
1984
dd693c4a 1985 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1986 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1987 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1988 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1989
db1349a6 1990 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1991 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1992 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1993 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1994 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1995 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1996 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1997
f0a82465 19982019-04-25 Jonathan Wakely <jwakely@redhat.com>
1999
2000 PR libstdc++/90239
2001 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2002 * include/std/scoped_allocator [__cplusplus > 201703L]
2003 (scoped_allocator_adaptor::construct): Define in terms of
2004 uses_allocator_construction_args, as per P0591R4.
2005 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2006 * testsuite/util/testsuite_allocator.h: Remove name of unused
2007 parameter.
2008
fd1863e1 20092019-04-24 Jonathan Wakely <jwakely@redhat.com>
2010
9ed11778 2011 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2012 * doc/html/*: Regenerate.
2013
39b59bb9 2014 * include/bits/fs_path.h (operator<, operator<=, operator>)
2015 (operator>=, operator==, operator!=): Make hidden friends, as per
2016 LWG 3065.
2017 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2018 string type in test.
2019 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2020
dd3b7006 2021 * include/std/any (any::any(ValueType&&)): Use __and_v.
2022 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2023 Likewise.
2024
14710c9d 2025 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2026 as per P0777R1.
2027 * include/std/type_traits (__result_of_memfun): Use remove_reference
2028 instead of __remove_cvref_t and remove redundant is_same check.
2029 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2030
809f1d63 2031 * include/experimental/string_view (basic_string_view::pointer)
2032 (basic_string_view::reference): Fix to refer to non-const value_type.
2033 * include/bits/basic_string.h (basic_string): Use __sv_check and
2034 __sv_limit instead of basic_string_view::_M_check and
2035 basic_string_view::_M_limit.
2036 * include/std/string_view (__sv_check, __sv_limit): New
2037 helper functions to replace basic_string_view::_M_check and
2038 basic_string_view::_M_limit.
2039 (basic_string_view): Add static assertions to enforce ill-formed
2040 requirement for traits_type::char_type from P1148R0, and to enforce
2041 required properties of char-like types.
2042 (basic_string_view::pointer, basic_string_view::reference): Fix to
2043 refer to non-const value_type.
2044 (basic_string_view::operator[], basic_string_view::at)
2045 (basic_string_view::front, basic_string_view::back)
2046 (basic_string_view::data): Use const_reference and const_pointer
2047 typedefs for return types.
2048 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2049 (hash<wstring_view>): Fix argument_type typedef.
2050 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2051 char/1.cc: Fix expected return type of basic_string_view::data().
2052 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2053 wchar_t/1.cc: Likewise.
2054 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2055 char/1.cc: Likewise.
2056 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2057 wchar_t/1.cc: Likewise.
2058 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2059 New test.
2060 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2061 Check reference and pointer typedefs.
2062 * testsuite/experimental/string_view/requirements/typedefs.cc:
2063 Likewise.
2064 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2065 Fix expected return type of basic_string_view::data().
2066 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2067 1.cc: Likewise.
2068 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2069 Likewise.
2070 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2071 1.cc: Likewise.
2072
37020b0a 2073 PR libstdc++/90220
2074 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2075 Avoid a runtime check for types that can never be stored in std::any.
2076 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2077 array types.
2078
b8e73341 2079 PR libstdc++/90220 (partial)
2080 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2081 not attempt ill-formed static_cast to pointers to non-object types.
2082 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2083 function types.
2084
1c9c8e0d 2085 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2086 prevent -Wcatch-value warning.
2087
fd1863e1 2088 * include/std/variant (__variant_construct): Use template parameter
2089 type instead of equivalent decltype-specifier.
2090 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2091 Replace forward with move.
2092 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2093 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2094 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2095 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2096 index after construction succeeds.
2097 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2098 if-constexpr checks that are always true. Use __remove_cvref_t instead
2099 of remove_reference so that is_nothrow_move_constructible check
2100 doesn't use a const rvalue parameter. In the potentially-throwing case
2101 construct a temporary and move assign it, as per LWG 2904.
2102 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2103 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2104 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2105 construct a temporary and move assign from it, as per LWG 2904.
2106 * testsuite/20_util/variant/exception_safety.cc: Check that
2107 assignment operators have strong exception safety guarantee.
2108
55bb4515 21092019-04-23 Thomas Rodgers <trodgers@redhat.com>
2110
2111 Document PSTL linker flags
2112
7f6a1a9c 2113 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
55bb4515 2114
b48cc8c5 21152019-04-23 Jonathan Wakely <jwakely@redhat.com>
2116
a4265b66 2117 * include/std/variant (__detail::__variant::_Traits): Make
2118 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2119 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2120 P0602R4.
2121 (__detail::__variant::_Copy_assign_alias): Only depend on
2122 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2123 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2124 move assignment operators.
2125
28cc38ec 2126 PR libstdc++/90165
2127 * include/std/variant (variant::__not_self): New helper for the
2128 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2129 (variant::__to_type_impl): Remove.
2130 (variant::__to_type): Add default argument to check pack size, instead
2131 of using __to_type_impl.
2132 (variant::__accepted_type): Add default argument using __not_self.
2133 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2134 for variant(T&&) constructor constraint.
2135 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2136 Extract __accepted_type into a named template parameter for reuse in
2137 other constraints and in the exception specification.
2138 (variant::variant(in_place_type_t<T>, Args&&...))
2139 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2140 (variant::variant(in_place_index_t<T>, Args&&...))
2141 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2142 (variant::operator=T&&)): Remove redundant && from trait arguments.
2143 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2144 isn't used for in_place_type or in_place_index arguments.
2145
b48cc8c5 2146 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2147 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2148 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2149
9ac9ee83 21502019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2151 Bernd Edlinger <bernd.edlinger@hotmail.de>
2152 Jakub Jelinek <jakub@redhat.com>
2153
2154 PR target/89093
2155 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2156 general-regs-only target attribute for ARM.
2157
e11f5aed 21582019-04-23 Jonathan Wakely <jwakely@redhat.com>
2159
b9d8292f 2160 PR libstdc++/87431
2161 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2162 specialization also depend on is_nothrow_move_constructible.
2163 * include/std/variant (__detail::__variant::__never_valueless()):
2164 Only true if the variant would have a move assignment operator.
2165 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2166 Check __never_valueless<T...>().
2167 (variant::emplace): Only perform non-throwing move assignments
2168 for never-valueless alternatives if the variant has a move assignment
2169 operator.
2170 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2171 types can be emplaced into non-assignable variants.
2172 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2173 don't get copied when emplaced into non-assignable variants.
2174
e11f5aed 2175 * include/std/variant (__detail::__variant::__ref_cast): Remove
2176 unused function.
2177 (__detail::__variant::_Uninitialized::_M_get)
2178 (__detail::__variant::__get)
2179 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2180
46fbb8aa 21812019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2182
2183 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2184 to Darwin10.
2185 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2186 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2187 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2188 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2189
dff3f73c 21902019-04-20 Thomas Rodgers <trodgers@redhat.com>
2191
2192 Delegate PSTL configuration to pstl/pstl_config.h
2193
2194 * include/bits/c++config: Remove explicit PSTL configuration
2195 macros and use definitions from <pstl/pstl_config.h>.
2196
3dbad48e 21972019-04-20 Thomas Rodgers <trodgers@redhat.com>
2198
2199 Cleanup algorithm implementations
2200 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
ed42fdb5 2201 execution policy.
3dbad48e 2202 (mismatch): Forward execution policy.
2203 (equal): Qualify call to std::equal().
2204 (partial_sort): Forward execution policy.
2205 (inplace_merge): Forward execution policy.
2206
5d637ddd 22072019-04-19 Thomas Rodgers <trodgers@redhat.com>
2208
2209 Improve implementation of parallel equal()
2210 * include/pstl/algorithm_impl.h
2211 (__internal::__brick_equal): use "4 iterator" version of
2212 std::equal().
2213 (__internal::__brick_equal): use simd for random access
2214 iterators on unsequenced execution policies.
2215 (__internal::__pattern_equal): add "4 iterator" version
2216 (__internal::__pattern_equal): dispatch to simd __brick_equal
2217 for vector-only execution policies.
2218 (__internal::__pattern_equal): dispatch to __parallel_or for
2219 parallel execution policies.
2220 * include/pstl/glue_algorithm_impl.h
2221 (std::equal): dispatch to "4 iterator" version of
2222 __internal::__pattern_equal().
2223
88dbeb04 22242019-04-17 Jonathan Wakely <jwakely@redhat.com>
2225
a0295ab5 2226 PR libstdc++/90105
2227 * include/bits/forward_list.h (operator==): Do not use operator!= to
2228 compare elements.
2229 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2230 earlier in the list, so that sort is stable.
2231 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2232 * testsuite/23_containers/forward_list/comparable.cc: Test with
2233 types that meet the minimum EqualityComparable and LessThanComparable
2234 requirements. Remove irrelevant comment.
2235
37a7dbf9 2236 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2237 Do not depend on whether all alternative types are move constructible.
2238 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2239 from the operand when deciding whether to perform the assignment.
2240 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2241 with deleted move constructor and deleted move assignment operator.
2242 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2243 behaviour of variants with DeletedMoves as an alternative.
2244 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2245 (move_ctor, move_assign): Check that moving a variant with a
2246 DeletedMoves alternative falls back to copying instead of moving.
2247
e9a490a4 2248 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2249 from static_assert declarations.
2250
c4495ab1 2251 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2252 actually match its name.
2253 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2254 (test_swap()): Fix result for MoveCtorOnly and check
2255 MoveCtorAndSwapOnly.
2256
88dbeb04 2257 * include/std/optional (optional::value_or(U&&) &&): Add missing
2258 constexpr specifier.
2259 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2260 for disengaged optionals and rvalue optionals.
2261 * testsuite/20_util/optional/observers/4.cc: Likewise.
2262
11deac81 22632019-04-12 Thomas Rodgers <trodgers@redhat.com>
2264
2265 * include/pstl/algorithm_impl.h: Uglify identfiers.
2266 * include/pstl/numeric_impl.h: Uglify identfiers.
2267 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2268
34d8d757 22692019-04-11 Thomas Rodgers <trodgers@redhat.com>
2270
2271 * include/bits/c++config:
2272 Add definition for __PSTL_ASSERT.
2273 Add definition for __PSTL_ASSERT_MSG.
2274 * include/pstl/algorithm_impl.h: Replace use of assert().
2275 * include/pstl/numeric_impl.h: Replace use of assert().
2276 * include/pstl/parallel_backend_tbb.h:
2277 Replace use of assert().
2278 Replace use of __TBB_ASSERT().
34d8d757 2279 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2280
629a2d18 22812019-04-11 Jonathan Wakely <jwakely@redhat.com>
2282
2283 PR libstdc++/90046
2284 * src/c++17/memory_resource.cc
2285 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2286 needed to allow placing a _Chunk at the end of the buffer.
2287 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2288
b047c9ae 22892019-04-10 Jonathan Wakely <jwakely@redhat.com>
2290
6a98b075 2291 * doc/xml/faq.xml: Add information about emergency EH pool.
2292 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2293 Move outdated information on mt_allocator to a separate section.
2294 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2295 doesn't affect the default allocator.
2296
706bf2a5 2297 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2298 typo.
2299
b047c9ae 2300 PR libstdc++/89851
2301 * testsuite/20_util/variant/89851.cc: New test.
2302
faa382bd 23032019-04-09 Jonathan Wakely <jwakely@redhat.com>
2304
492debfa 2305 * include/std/variant: Adjust whitespace. Add comments.
2306 (_Multi_array): Leave primary template undefined.
2307 (_Multi_array<_Tp>): Define partial specialization for base case of
2308 recursion.
2309 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2310 which is always a reference.
2311 (__gen_vtable::_S_apply()): Remove function, inline body into
2312 default member initializer.
2313 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2314
47cf9c4c 2315 * include/std/variant (__variant_idx_cookie): Add member type.
2316 (__visitor_result_type): Remove.
2317 (__do_visit): Use invoke_result instead of __visitor_result_type.
2318 * testsuite/20_util/variant/visit.cc: New test.
2319
faa382bd 2320 PR libstdc++/90008
2321 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2322 unused capture.
2323 * testsuite/20_util/variant/90008.cc: New test.
2324
e4da4897 23252019-04-09 Thomas Rodgers <trodgers@redhat.com>
2326
2327 * include/pstl/algorithm_impl.h: Add namespace qualification.
2328 * include/pstl/execution_defs.h: Add namespace qualification.
2329 * include/pstl/execution_impl.h: Add namespace qualification.
2330 * include/pstl/numeric_impl.h: Add namespace qualification.
2331 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2332 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2333 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2334
ff7d433d 23352019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2336
2337 Fix visit<R> for variant.
2338 * include/std/variant (__do_visit): Add a template parameter
2339 for enforcing same return types for visit.
2340 (__gen_vtable_impl): Likewise.
2341 (_S_apply_single_alt): Adjust.
2342 (__visit_invoke_impl): New. Handle casting to void.
2343 (__do_visit_invoke): New. Enforces same return types.
2344 (__do_visit_invoke_r): New. Converts return types.
2345 (__visit_invoke): Adjust.
2346 (__gen_vtable): Add a template parameter for enforcing
2347 same return types for visit.
2348 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2349 different return types.
2350 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2351 visitors with different return types don't accidentally
2352 compile with regular visitation.
2353
d0f56531 23542019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2355
2356 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2357 dg-require-filesystem-ts.
2358
781cb64d 23592019-04-05 Jonathan Wakely <jwakely@redhat.com>
2360
bfbd20f7 2361 * doc/xml/manual/status_cxx2020.xml: Update status.
2362 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2363 * testsuite/20_util/variant/visit_r.cc: New test.
2364
83bd31bf 2365 * include/bits/fs_dir.h (directory_iterator::operator*)
2366 (directory_iterator::operator->): Add noexcept.
2367 (operator==, operator!=): Replace namespace-scope equality operators
2368 for directory iterators with hidden friends.
2369
0067a809 2370 PR libstdc++/89986
2371 * config/abi/pre/gnu.ver: Add missing exports.
2372 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2373 increment member.
2374
7d0ae205 2375 * config/abi/pre/gnu.ver: Export new symbols.
2376 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2377 (recursive_directory_iterator::recursion_pending())
2378 (recursive_directory_iterator::disable_recursion_pending()): Remove
2379 inline definitions. Make noexcept.
2380 (recursive_directory_iterator::depth())
2381 (recursive_directory_iterator::operator*())
2382 (recursive_directory_iterator::operator->()): Make noexcept.
2383 (recursive_directory_iterator::_M_options)
2384 (recursive_directory_iterator::_M_pending): Remove data members.
2385 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2386 (recursive_directory_iterator::recursive_directory_iterator): Remove
2387 ctor-initializer. Use new constructor for _Dir_stack.
2388 (recursive_directory_iterator::options())
2389 (recursive_directory_iterator::recursion_pending())
2390 (recursive_directory_iterator::disable_recursion_pending()): Add
2391 non-inline definitions.
2392 (recursive_directory_iterator::depth()): Make noexcept.
2393 (recursive_directory_iterator::increment(error_code&))
2394 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2395 location of options and recursion_pending members.
2396 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2397 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2398 user-declared move constructor and assignment operator, to make the
2399 type move-only.
2400
5a6e0b73 2401 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2402 d_type == DT_UNKNOWN immediately.
2403 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2404 handling here.
2405 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2406
aa9c570e 2407 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2408 assignment.
2409 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2410 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2411 assignment.
2412
781cb64d 2413 PR libstdc++/87431 (again)
2414 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2415 Define partial specialization for basic_string.
2416 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2417 shared_ptr and weak_ptr.
2418 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2419 function.
2420 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2421 vector.
2422 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2423 unique_ptr.
2424 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2425 vector.
2426 * include/std/any (_Never_valueless_alt): Define explicit
2427 specialization for any.
2428 * include/std/variant (_Never_valueless_alt): Define primary template.
2429 (__never_valueless): Use _Never_valueless_alt instead of
2430 is_trivially_copyable.
2431 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2432 initializations to avoid try-catch overhead. Add special case for
2433 scalars produced by potentially-throwing conversions. Use
2434 _Never_valueless_alt instead of is_trivially_copyable for the
2435 remaining strong exception-safety cases.
2436 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2437 * testsuite/20_util/variant/87431.cc: Run both test functions.
2438 * testsuite/20_util/variant/exception_safety.cc: New test.
2439 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2440 so the variant becomes valueless.
2441
62fd39e8 24422019-04-03 Jonathan Wakely <jwakely@redhat.com>
2443
e1d699b8 2444 PR libstdc++/85184
2445 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2446 Remove assertions.
72be2bb7 2447 (variant::emplace<_Tp>): Return result of emplace<N> directly.
e1d699b8 2448
62fd39e8 2449 * include/std/string (__hash_string_base): New class template defining
2450 operator() for hashing strings.
2451 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2452 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2453 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2454 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2455
4f3e024d 24562019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2457
2458 Use single-visitation in variant assignment and swap and relops.
2459 Also use indices instead of types when checking whether
2460 variants hold the same thing.
2461 * include/std/variant (__do_visit): Add a template parameter
2462 for index visitation, invoke with indices if index visitation
2463 is used.
2464 (__variant_idx_cookie): New.
2465 (__visit_with_index): Likewise.
2466 (_Copy_assign_base::operator=): Do single-visitation with
2467 an index visitor.
2468 (_Move_assign_base::operator=): Likewise.
2469 (_Extra_visit_slot_needed): Adjust.
2470 (__visit_invoke): Call with indices if it's an index visitor.
2471 (relops): Do single-visitation with an index visitor.
2472 (swap): Likewise.
2473 (__visitor_result_type): New.
2474
106979b7 24752019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2476
2477 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2478
225ca87b 24792019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2480
2481 Don't revisit a variant we are already visiting.
2482 * include/std/variant (__variant_construct_single): New.
2483 (__variant_construct): Use it.
2484 (_M_destructive_move): Likewise.
2485 (_M_destructive_copy): Likewise.
2486 (_Copy_assign_base::operator=): Adjust.
2487 (_Move_assign_base::operator=): Likewise.
2488 (swap): Likewise.
2489
7237dce7 24902019-03-26 Jonathan Wakely <jwakely@redhat.com>
2491
2492 PR libstdc++/85965
2493 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2494 destructor so they are not evaluated until the _Key type is complete.
2495 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2496 * testsuite/23_containers/set/85965.cc: New test.
2497 * testsuite/23_containers/unordered_set/85965.cc: New test.
2498 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2499 with regexp matching the corresponding _Rb_tree specialization.
2500 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2501 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2502 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2503 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2504 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2505 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2506 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2507
4c0ef551 25082019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2509
2510 PR libstdc++/89825
2511 Fix based on a suggestion by Antony Polukhin.
2512 * include/std/variant (__never_valueless): New.
2513 (_M_valid): Use it.
2514 (_Extra_visit_slot_needed): New.
2515 (_Multi_array): Use it.
2516 (_S_apply_all_alts): Likewise.
2517
28b460dd 25182019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2519
2520 PR libstdc++/89824
2521 Fix based on a suggestion by Antony Polukhin.
2522 * include/std/variant (__gen_vtable): Don't reserve an
2523 additional table slot, _Multi_array already does that.
2524
4d235dc5 25252019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2526
2527 PR libstdc++/89816
2528 Fix based on a suggestion by Antony Polukhin.
2529 * include/std/variant (__variant_construct): Capture a pointer
2530 to the storage and visit just one variant.
2531
d0595c7e 25322019-03-22 Jonathan Wakely <jwakely@redhat.com>
2533
5c34f7ca 2534 * doc/xml/manual/backwards_compatibility.xml: Remove link to
2535 Doxygen-generated pages with unstable URL.
2536 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2537 * doc/xml/manual/extensions.xml: Likewise.
2538 * doc/xml/manual/parallel_mode.xml: Likewise.
2539 * doc/xml/manual/support.xml: Likewise.
2540
d0595c7e 2541 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
2542 avoid -Wconversion warnings.
2543
7e155e54 25442019-03-21 Thomas Rodgers <trodgers@redhat.com>
2545
2546 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
2547 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2548 (allstamped): Add stamp-pstl.
2549 (install-headers): Add ptsl_builddir.
2550 * include/Makefile.in: Regenerate.
2551 * include/bits/c++config: Add pstl configuration.
2552 * include/pstl/LICENSE.txt: New file.
2553 * include/pstl/algorithm_fwd.h: New file.
2554 * include/pstl/algorithm_impl.h: New file.
2555 * include/pstl/execution_defs.h: New file.
2556 * include/pstl/execution_impl.h: New file.
2557 * include/pstl/glue_algorithm_defs.h: New file.
2558 * include/pstl/glue_algorithm_impl.h: New file.
2559 * include/pstl/glue_execution_defs.h: New file.
2560 * include/pstl/glue_memory_defs.h: New file.
2561 * include/pstl/glue_memory_impl.h: New file.
2562 * include/pstl/glue_numeric_defs.h: New file.
2563 * include/pstl/glue_numeric_impl.h: New file.
2564 * include/pstl/memory_impl.h: New file.
2565 * include/pstl/numeric_fwd.h: New file.
2566 * include/pstl/numeric_impl.h: New file.
2567 * include/pstl/parallel_backend.h: New file.
2568 * include/pstl/parallel_backend_tbb.h: New file.
2569 * include/pstl/parallel_backend_utils.h: New file.
2570 * include/pstl/parallel_impl.h: New file.
2571 * include/pstl/pstl_config.h: New file.
2572 * include/pstl/unseq_backend_simd.h: New file.
2573 * include/pstl/utils.h: New file.
2574 * include/std/algorithm: Include parallel algorithm implementations.
2575 * include/std/execution: New file.
2576 * include/std/memory: Include parallel algorithm implementations.
2577 * include/std/numeric: Include parallel algorithm implementations.
2578 * include/std/version: Add parallel algorithms feature test macro.
2579 * testsuite/util/pstl/pstl_test_config.h: New file.
2580 * testsuite/util/pstl/test_utils.h: New file.
2581 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2582 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2583 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2584 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2585 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2586 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2587 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2588 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2589 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2590 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2591 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2592 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2593 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2594 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2595 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2596 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2597 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2598 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2599 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2600 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2601 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2602 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2603 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2604 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2605 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2606 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2607 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2608 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2609 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2610 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2611 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2612 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2613 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2614 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2615 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2616 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2617 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2618 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2619 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2620 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2621 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2622 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2623 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2624 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2625 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2626 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2627 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2628 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2629 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2630 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2631 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2632 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2633 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2634 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2635 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2636 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2637 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2638 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2639 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2640 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2641 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2642 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2643 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2644 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2645 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2646 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2647 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2648 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2649 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2650 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2651 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2652 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2653 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2654 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2655 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2656 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2657 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2658 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2659 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2660 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2661 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2662 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2663 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2664 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2665 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2666 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2667 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2668 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2669 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2670 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2671 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2672 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2673 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2674 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2675 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2676 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2677 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2678 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2679 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2680 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2681 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2682 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2683 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2684 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2685 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2686 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2687
480b3b75 26882019-03-21 Jonathan Wakely <jwakely@redhat.com>
2689
0a4390ac 2690 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2691 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2692 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2693 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2694 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2695 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2696 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2697 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2698 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2699 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2700 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2701 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2702 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2703 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2704 when the special functions IS is enabled, not for C++17.
2705 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2706 Replace with ...
2707 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2708 without checks for special functions in C++17.
2709 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2710 New test.
2711
480b3b75 2712 PR libstdc++/88066
2713 * include/backward/hash_map: Use <> for includes not "".
2714 * include/backward/hash_set: Likewise.
2715 * include/backward/strstream: Likewise.
2716 * include/tr1/bessel_function.tcc: Likewise.
2717 * include/tr1/exp_integral.tcc: Likewise.
2718 * include/tr1/legendre_function.tcc: Likewise.
2719 * include/tr1/modified_bessel_func.tcc: Likewise.
2720 * include/tr1/riemann_zeta.tcc: Likewise.
2721
ed360d55 27222019-03-19 Jonathan Wakely <jwakely@redhat.com>
2723
2724 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2725 of extension allocators.
2726 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2727 Document new headers in 7.2, 8.1 and 9.1 releases.
2728 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2729 * doc/html/*: Regenerate.
2730
8f9d7eb1 27312019-03-12 John David Anglin <dave.anglin@bell.net>
2732
2733 PR libstdc++/89461
2734 * testsuite/lib/libstdc++.exp: Locate libatomic.
2735 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2736 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2737 libatomic options.
2738 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2739 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2740 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2741 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2742
0bd005b6 27432019-03-11 Jonathan Wakely <jwakely@redhat.com>
2744
5995ba3a 2745 PR libstdc++/89460
2746 * configure.ac: Check for sockatmark.
2747 * crossconfig.m4: Check for sockatmark.
2748 * config.h.in: Regenerate.
2749 * configure: Regenerate.
2750 * include/experimental/internet (address_v4::_S_hton): Rename
2751 overloaded functions to _S_hton_16 and _S_ntoh_16.
2752 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2753 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2754 * include/experimental/socket (basic_socket::at_mark): Check
2755 _GLIBCXX_HAVE_SOCKATMARK.
2756
5aa8571a 2757 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2758 const variables instead of macros.
2759
0bd005b6 2760 PR libstdc++/89629
2761 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2762 Use correct type for len_aligned.
2763 * testsuite/20_util/hash/89629.cc: New test.
2764
bc204227 27652019-03-11 Jakub Jelinek <jakub@redhat.com>
2766
2767 PR libstdc++/89641
2768 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2769 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2770 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2771 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2772 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2773 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2774 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2775 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2776 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2777 memory_order_seq_cst to int.
2778
fc557c2b 27792019-03-08 Jonathan Wakely <jwakely@redhat.com>
2780
59b5e890 2781 * doc/xml/manual/using.xml: Use link element instead of xref.
2782 * doc/html/*: Regenerate.
2783
fc557c2b 2784 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2785
66c6ff9e 27862019-03-08 François Dumont <fdumont@gcc.gnu.org>
2787
448338d0 2788 PR libstdc++/89477
2789 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2790 parameters in deduction guides.
2791 * include/debug/multimap.h (multimap): Likewise.
2792 * include/debug/set.h (multimap): Likewise.
2793 * include/debug/multiset.h (multimap): Likewise.
2794 * include/debug/unordered_map (unordered_map): Likewise.
2795 (unordered_multimap): Likewise.
2796 * include/debug/unordered_set (unordered_set): Likewise.
2797 (unordered_multiset): Likewise.
2798
66c6ff9e 2799 PR libstdc++/89608
2800 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2801 Invalidate all iterators in case of rehash.
2802 (unordered_multimap<>::_M_check_rehashed): Likewise.
2803 * include/debug/unordered_set
2804 (unordered_set<>::_M_check_rehashed): Likewise.
2805 (unordered_multiset<>::_M_check_rehashed): Likewise.
2806 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2807
32e92dc2 28082019-03-07 Andreas Schwab <schwab@suse.de>
2809
2810 * config/abi/post/riscv64-linux-gnu: New directory.
2811 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2812
61dcf2e1 28132019-03-07 Jonathan Wakely <jwakely@redhat.com>
2814
682ee94e 2815 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2816 compile test to run. Fix typo.
2817
f24442bd 2818 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2819 * doc/html/*: Regenerate.
2820
61dcf2e1 2821 P0356R5 Simplified partial function application
2822 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2823 helpers for bind_front.
2824 (bind_front, __cpp_lib_bind_front): Define.
2825 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2826
b4af2395 28272019-03-06 Jonathan Wakely <jwakely@redhat.com>
2828
2829 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2830 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2831 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2832 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2833
f1857b8b 28342019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2835
2836 PR libstdc++/86655 - std::assoc_legendre should not constrain
2837 the value of m (or x).
2838 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2839 __sph_legendre): If degree > order Don't throw, return 0.
2840 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2841 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2842 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2843 * testsuite/tr1/5_numerical_facilities/special_functions/
2844 02_assoc_legendre/pr86655.cc: New test.
2845 * testsuite/tr1/5_numerical_facilities/special_functions/
2846 22_sph_legendre/pr86655.cc: New test.
2847
49c83dca 28482019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2849
2850 Rewrite variant.
2851 Also PR libstdc++/85517
2852 * include/std/variant (__do_visit): New.
2853 (__variant_cast): Likewise.
2854 (__variant_cookie): Likewise.
2855 (__erased_*): Remove.
2856 (_Variant_storage::_S_vtable): Likewise.
2857 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2858 (_Variant_storage::__M_reset): Adjust.
2859 (__variant_construct): New.
2860 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2861 __variant_construct.
2862 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2863 (_Move_ctor_base::__M_destructive_copy): New.
2864 (_Move_ctor_base::__M_destructive_move): Adjust to use
2865 __variant_construct.
2866 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2867 (_Copy_assign_alias): Adjust to check both copy assignment
2868 and copy construction for triviality.
2869 (_Move_assign_base::operator=): Adjust to use __do_visit.
2870 (_Multi_array): Add support for visitors that accept and return
2871 a __variant_cookie.
2872 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2873 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2874 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2875 a __variant_cookie temporary for a variant that is valueless and..
2876 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2877 (__gen_vtable::_Array_type): Conditionally make space for
2878 the __variant_cookie visitor case.
2879 (__variant_construct_by_index): New.
2880 (get_if): Adjust to use std::addressof.
2881 (relops): Adjust to use __do_visit.
2882 (variant): Add __variant_cast and __variant_construct_by_index
2883 as friends.
2884 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2885 instead of self-destruction.
2886 (variant::swap): Adjust to use __do_visit.
2887 (visit): Reimplement in terms of __do_visit.
2888 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2889 * testsuite/20_util/variant/compile.cc: Adjust.
2890 * testsuite/20_util/variant/run.cc: Likewise.
2891
13825fb2 28922019-03-06 Jonathan Wakely <jwakely@redhat.com>
2893
2613fa6b 2894 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2895 constant.
2896 * testsuite/experimental/feat-char8_t.cc: Likewise.
2897
a17f06b3 2898 * include/std/type_traits [C++20] (is_bounded_array)
2899 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2900 Define.
2901 * testsuite/20_util/is_bounded_array/requirements/
2902 explicit_instantiation.cc: New test.
2903 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2904 test.
2905 * testsuite/20_util/is_bounded_array/value.cc: New test.
2906 * testsuite/20_util/is_unbounded_array/requirements/
2907 explicit_instantiation.cc: New test.
2908 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2909 * test.
2910 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2911
13825fb2 2912 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2913 Add constexpr.
2914 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2915
2e73e63a 29162019-03-05 Jonathan Wakely <jwakely@redhat.com>
2917
2918 * include/c_compatibility/math.h [C++20] (lerp): Add using
2919 declaration.
2920 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2921 (__lerp): Define function template to implement lerp.
2922 (lerp(float, float, float), lerp(double, double, double))
2923 (lerp(long double, long double, long double)): Define for C++20.
2924 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2925 (midpoint(T, T), midpoint(T*, T*)): Define.
2926 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2927 * testsuite/26_numerics/lerp.cc: New test.
2928 * testsuite/26_numerics/midpoint/floating.cc: New test.
2929 * testsuite/26_numerics/midpoint/integral.cc: New test.
2930 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2931
08d3ce5b 29322019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2933
2934 PR libstdc++/88996 Implement P0439R0
2935 Make std::memory_order a scoped enumeration.
2936 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2937 add variables for the old enumerators. Adjust calls.
2938 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2939 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2940
ad29ad75 29412019-03-04 Jonathan Wakely <jwakely@redhat.com>
2942
4233f2a8 2943 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2944 directive.
2945
ad29ad75 2946 * include/std/memory_resource (polymorphic_allocator): Add default
2947 template argument for C++20.
2948 (polymorphic_allocator::allocate_bytes)
2949 (polymorphic_allocator::deallocate_bytes)
2950 (polymorphic_allocator::allocate_object)
2951 (polymorphic_allocator::deallocate_object)
2952 (polymorphic_allocator::new_object)
2953 (polymorphic_allocator::delete_object): New member functions for
2954 C++20.
2955 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2956 test.
2957
d4c27c4a 29582019-03-03 Jonathan Wakely <jwakely@redhat.com>
2959
2960 PR libstdc++/89562
2961 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2962 mode for mingw.
2963
6a9c77f1 29642019-03-01 Jonathan Wakely <jwakely@redhat.com>
2965
5b313df9 2966 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2967 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2968
6a9c77f1 2969 * include/std/memory (uses_allocator_construction_args): New set of
2970 overloaded functions.
2971 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2972 New functions.
2973 * include/std/memory_resource (polymorphic_allocator::construct)
2974 [__cplusplus > 201703l]: Replace all overloads with a single function
2975 using uses_allocator_construction_args.
2976 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2977 test.
2978 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2979
53ea0887 29802019-02-27 Jonathan Wakely <jwakely@redhat.com>
2981
2982 PR libstdc++/89466
2983 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2984 stylesheet directories before check for xsltproc. Try to use
2985 xmlcatalog to find local stylesheet directory before trying hardcoded
2986 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2987 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2988 use xsltproc if xmlcatalog fails to find a local stylesheet.
2989 * configure.ac: Check for xmlcatalog.
2990 * Makefile.in: Regenerate.
2991 * configure: Likewise.
2992 * doc/Makefile.in: Likewise.
2993 * include/Makefile.in: Likewise.
2994 * libsupc++/Makefile.in: Likewise.
2995 * po/Makefile.in: Likewise.
2996 * python/Makefile.in: Likewise.
2997 * src/Makefile.in: Likewise.
2998 * src/c++11/Makefile.in: Likewise.
2999 * src/c++17/Makefile.in: Likewise.
3000 * src/c++98/Makefile.in: Likewise.
3001 * src/filesystem/Makefile.in: Likewise.
3002 * testsuite/Makefile.in: Likewise.
3003
72ebb7e8 30042019-02-26 Jonathan Wakely <jwakely@redhat.com>
3005
a7f2f1b1 3006 PR libstdc++/89477
3007 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3008 container deduction guides.
3009 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3010 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3011 parameters in deduction guides.
3012 * include/bits/stl_multimap.h (multimap): Likewise.
3013 * include/bits/stl_multiset.h (multiset): Likewise.
3014 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3015 * include/bits/stl_set.h (set): Likewise.
3016 * include/bits/stl_stack.h (stack): Likewise.
3017 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3018 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3019 constrain parameters in deduction guides.
3020 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3021 Likewise.
3022 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3023 deduction cases.
3024 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3025 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3026 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3027 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3028 Likewise.
3029 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3030 Likewise.
3031 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3032
72ebb7e8 3033 PR libstdc++/89416
3034 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3035 to class template and partial specialization using void_t.
3036 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3037
c9f61a64 30382019-02-24 Jonathan Wakely <jwakely@redhat.com>
3039
3040 PR libstdc++/89416
3041 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3042 copy and move members public.
3043
61e2d6f7 30442019-02-23 Jonathan Wakely <jwakely@redhat.com>
3045
87798f3f 3046 * include/std/type_traits (__underlying_type_impl): New helper to
3047 make underlying_type SFINAE-friendly.
3048 (underlying_type): Derive from __underlying_type_impl.
3049 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3050 test.
3051
61e2d6f7 3052 PR libstdc++/89446
3053 * include/bits/char_traits.h (__constant_char_array): Check index is
3054 in range before dereferencing.
3055 (char_traits<char>::compare, char_traits<char>::find)
3056 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3057 immediately if n is zero.
3058 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3059 Remove workarounds for PR 67026.
3060 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3061 New test.
3062 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3063 New test.
3064
90a443b3 30652019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3066
3067 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3068 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3069
98485ce3 30702019-02-22 Jakub Jelinek <jakub@redhat.com>
3071
3072 PR libstdc++/89402
3073 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3074 type to std::size_t and argument to type to long double.
3075
26b4fc38 30762019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3077
3078 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3079 * config/abi/post/sparc64-linux-gnu: New directory.
3080 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3081 * config/abi/post/sparc64-linux-gnu/32: New directory.
3082 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3083
4f847a8e 30842019-02-21 Jonathan Wakely <jwakely@redhat.com>
3085
3086 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3087 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3088 test.
3089
aad651b3 30902019-02-22 Tom Honermann <tom@honermann.net>
3091
3092 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3093 printers for u8string and u8string_view.
3094
c783b3cc 30952019-02-22 Tom Honermann <tom@honermann.net>
3096
3097 * testsuite/18_support/byte/ops.cc: Validate
3098 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3099 std::to_integer<char32_t>.
3100 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3101 std::numeric_limits<char8_t>.
3102 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3103 std::numeric_limits<char8_t>::lowest().
3104 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3105 std::numeric_limits<char8_t>::max_digits10.
3106 * testsuite/18_support/type_info/fundamental.cc: Validate
3107 typeinfo for char8_t.
3108 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3109 std::from_chars with char8_t.
3110 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3111 Validate explicit instantiation of std::hash<char8_t>.
3112 * testsuite/20_util/is_integral/value.cc: Validate
3113 std::is_integral<char8_t>.
3114 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3115 Validate std::make_signed<char8_t>.
3116 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3117 Validate u8string construction from char8_t sources.
3118 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3119 std::pmr::u8string.
3120 * testsuite/21_strings/basic_string_view/operations/compare/
3121 char/70483.cc: Validate substr operations on u8string_view.
3122 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3123 the u8string_view typedef is defined.
3124 * testsuite/21_strings/char_traits/requirements/
3125 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3126 member functions.
3127 * testsuite/21_strings/char_traits/requirements/
3128 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3129 constexpr member functions.
3130 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3131 that the u8string typedef is defined.
3132 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3133 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3134 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3135 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3136 numbers.
3137 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3138 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3139 Likewise.
3140 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3141 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3142 Validate std::atomic<char8_t>::is_always_lock_free
3143 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3144 Update line numbers.
3145 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3146 Likewise.
3147 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3148 Likewise.
3149 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3150 Validate std::experimental::pmr::u8string.
3151 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3152 u8string_view typedef is defined.
3153 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3154 char32_t to the typelists.
3155
ef96a935 31562019-02-22 Tom Honermann <tom@honermann.net>
3157
3158 * include/ext/typelist.h: Constrain a partial specialization of
3159 typelist::detail::append_ to only match chain<T1,T2>.
3160
d373b606 31612019-02-21 Jonathan Wakely <jwakely@redhat.com>
3162
3163 PR libstdc++/89416
3164 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3165 class template with class. Replace move and copy member types with
3166 member alias templates, so they are only instantiated when needed.
3167 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3168 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3169 test for C++11/14/17 as well.
3170 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3171 test.
3172
25395ee8 31732019-02-20 Jakub Jelinek <jakub@redhat.com>
3174
3175 PR libstdc++/89402
3176 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3177 _GLIBCXX_PURE to the alias declaration.
3178
affcb65b 31792019-02-19 Jonathan Wakely <jwakely@redhat.com>
3180
3181 * testsuite/21_strings/basic_string/literals/types.cc
3182 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3183 * testsuite/21_strings/basic_string/literals/values.cc
3184 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3185 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3186 potentially having different type.
3187 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3188 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3189 to char.
3190 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3191 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3192 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3193 string literals only using basic character set.
3194 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3195 u8 literals to char.
3196 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3197 Test ATOMIC_CHAR8_T_LOCK_FREE.
3198 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3199 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3200 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3201 * testsuite/experimental/string_view/literals/types.cc
3202 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3203 literal.
3204 * testsuite/experimental/string_view/literals/values.cc
3205 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3206
4acc5060 32072019-02-19 Tom Honermann <tom@honermann.net>
3208
3209 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3210 from char16_32_t.cc; validates numeric_limits<char8_t>.
3211 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3212 test cloned from types.cc; validates operator""s for char8_t
3213 returns u8string.
3214 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3215 test cloned from values.cc; validates construction and comparison
3216 of u8string values.
3217 * testsuite/21_strings/basic_string/requirements/
3218 /explicit_instantiation/char8_t/1.cc: New test cloned from
3219 char16_t/1.cc; validates explicit instantiation of
3220 basic_string<char8_t>.
3221 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3222 New test cloned from types.cc; validates operator""sv for char8_t
3223 returns u8string_view.
3224 * testsuite/21_strings/basic_string_view/literals/
3225 values-char8_t.cc: New test cloned from values.cc; validates
3226 construction and comparison of u8string_view values.
3227 * testsuite/21_strings/basic_string_view/requirements/
3228 explicit_instantiation/char8_t/1.cc: New test cloned from
3229 char16_t/1.cc; validates explicit instantiation of
3230 basic_string_view<char8_t>.
3231 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3232 New test cloned from char16_t/65049.cc; validates that
3233 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3234 * testsuite/21_strings/char_traits/requirements/char8_t/
3235 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3236 that char_traits<char8_t> member typedefs are present and correct.
3237 * testsuite/21_strings/char_traits/requirements/
3238 explicit_instantiation/char8_t/1.cc: New test cloned from
3239 char16_t/1.cc; validates explicit instantiation of
3240 char_traits<char8_t>.
3241 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3242 from char16_t.cc: validates
3243 codecvt<char16_t, char8_t, mbstate_t>.
3244 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3245 from char32_t.cc: validates
3246 codecvt<char32_t, char8_t, mbstate_t>.
3247 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3248 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3249 codecvt<char32_t, char8_t, std::mbstate_t>.
3250 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3251 test cloned from string.cc; validates filesystem::path construction
3252 from char8_t input.
3253 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3254 the __cpp_lib_char8_t feature test macro is defined with the
3255 correct value.
3256 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3257 New test cloned from string.cc; validates filesystem::path
3258 construction from char8_t input.
3259 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3260 test cloned from types.cc; validates operator""sv for char8_t
3261 returns u8string_view.
3262 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3263 New test cloned from values.cc; validates construction and
3264 comparison of u8string_view values.
3265 * testsuite/experimental/string_view/requirements/
3266 explicit_instantiation/char8_t/1.cc: New test cloned from
3267 char16_t/1.cc; validates explicit instantiation of
3268 basic_string_view<char8_t>.
3269 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3270 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3271 enabled.
3272
25694c85 32732019-02-19 Tom Honermann <tom@honermann.net>
3274
3275 P0482R5 char8_t: Standard library support
3276 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3277 typeinfo symbols for char8_t.
3278 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3279 (GLIBCXX_3.4.26): Add symbols for specializations of
3280 numeric_limits and codecvt that involve char8_t.
3281 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3282 * include/bits/atomic_base.h: Add atomic_char8_t.
3283 * include/bits/basic_string.h: Add std::hash<u8string> and
3284 operator""s(const char8_t*, size_t).
3285 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3286 __cpp_lib_char8_t.
3287 * include/bits/char_traits.h: Add char_traits<char8_t>.
3288 * include/bits/codecvt.h: Add
3289 codecvt<char16_t, char8_t, mbstate_t>,
3290 codecvt<char32_t, char8_t, mbstate_t>,
3291 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3292 codecvt_byname<char32_t, char8_t, mbstate_t>.
3293 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3294 recognize char8_t as an integral type.
3295 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3296 char8_t.
3297 (path::u8string): Return std::u8string when char8_t support is
3298 enabled.
3299 (path::generic_u8string): Likewise.
3300 (path::_S_convert): Handle conversion from char8_t input.
3301 (path::_S_str_convert): Likewise.
3302 * include/bits/functional_hash.h: Add hash<char8_t>.
3303 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3304 char8_t.
3305 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3306 for new char8_t specializations.
3307 * include/bits/localefwd.h: Add missing declarations of
3308 codecvt<char16_t, char, mbstate_t> and
3309 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3310 codecvt<char16_t, char8_t, mbstate_t> and
3311 codecvt<char32_t, char8_t, mbstate_t>.
3312 * include/bits/postypes.h: Add u8streampos
3313 * include/bits/stringfwd.h: Add declarations of
3314 char_traits<char8_t> and u8string.
3315 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3316 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3317 Recognize char8_t.
3318 (path::u8string): Return std::u8string when char8_t support is
3319 enabled.
3320 (path::generic_u8string): Likewise.
3321 (path::_S_convert): Handle conversion from char8_t input.
3322 (path::_S_str_convert): Likewise.
3323 * include/experimental/string: Add u8string.
3324 * include/experimental/string_view: Add u8string_view,
3325 hash<experimental::u8string_view>, and
3326 operator""sv(const char8_t*, size_t).
3327 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3328 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3329 as a character type.
3330 * include/std/limits: Add numeric_limits<char8_t>.
3331 * include/std/string_view: Add u8string_view,
3332 hash<experimental::u8string_view>, and
3333 operator""sv(const char8_t*, size_t).
3334 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3335 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3336 * libsupc++/atomic_lockfree_defines.h: Define
3337 ATOMIC_CHAR8_T_LOCK_FREE.
3338 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3339 codecvt.cc and limits.cc so that char8_t specializations of
3340 numeric_limits and codecvt and emitted.
3341 * src/c++11/Makefile.in: Likewise.
3342 * src/c++11/codecvt.cc: Define members of
3343 codecvt<char16_t, char8_t, mbstate_t>,
3344 codecvt<char32_t, char8_t, mbstate_t>,
3345 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3346 codecvt_byname<char32_t, char8_t, mbstate_t>.
3347 * src/c++11/limits.cc: Define members of
3348 numeric_limits<char8_t>.
3349 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3350 locale_init.cc and localename.cc.
3351 * src/c++98/Makefile.in: Likewise.
3352 * src/c++98/locale_init.cc: Add initialization for the
3353 codecvt<char16_t, char8_t, mbstate_t> and
3354 codecvt<char32_t, char8_t, mbstate_t> facets.
3355 * src/c++98/localename.cc: Likewise.
3356 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3357
140615bb 33582019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3359
3360 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3361 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3362 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3363
c677a9d7 33642019-02-14 Jonathan Wakely <jwakely@redhat.com>
3365
1bbfe9f8 3366 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3367 * doc/html/*: Regenerate.
3368
b24f00b1 3369 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3370 * doc/html/*: Regenerate.
3371
a3d1baa9 3372 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3373 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3374 allocator type in is_constructible checks.
3375 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3376 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3377 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3378 problematic type from LWG 2586 discussion.
3379 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3380 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3381
99d130bf 3382 * configure.ac: Check for C11 timespec_get function.
3383 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3384 (openbsd): Likewise
3385 * config.h.in: Regenerate.
3386 * configure: Regenerate.
3387 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3388 std for C++17 and up.
3389
48772ec3 3390 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3391 * include/bits/stl_queue.h
3392 (priority_queue(const Compare&, const Container&, const Alloc&))
3393 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3394 make_heap.
3395 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3396
ee32dd64 3397 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3398 * include/bits/stl_queue.h (queue, priority_queue): Add static
3399 assertions to enforce LWG 2566 requirement on value_type.
3400 * include/bits/stl_stack.h (stack): Likewise.
3401
9724de38 3402 PR middle-end/89303
3403 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3404
c677a9d7 3405 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3406 * include/bits/std_abs.h: Add comment about LWG 2735.
3407 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3408
4194f872 34092019-02-13 Jonathan Wakely <jwakely@redhat.com>
3410
3411 PR libstdc++/89345
3412 * include/std/version [__cpp_impl_destroying_delete]
3413 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3414 * libsupc++/new [__cpp_impl_destroying_delete]
3415 (__cpp_lib_destroying_delete): Likewise.
3416 (destroying_delete_t, destroying_delete): Likewise, but define even
3417 when __cpp_impl_destroying_delete is not defined.
3418 * testsuite/18_support/destroying_delete.cc: New test.
3419
aaacaee2 34202019-02-11 Jonathan Wakely <jwakely@redhat.com>
3421
3422 PR libstdc++/89023
3423 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3424 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3425 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3426 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3427
5256b0dd 34282019-02-09 Jonathan Wakely <jwakely@redhat.com>
3429
3430 PR libstdc++/71044
3431 * include/bits/fs_path.h (path::has_root_name)
3432 (path::has_root_directory, path::has_root_path)
3433 (path::has_relative_path, path::has_parent_path)
3434 (path::has_filename, path::has_stem, path::has_extension)
3435 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3436 noexcept.
3437 * src/c++17/fs_path.cc (path::has_root_name)
3438 (path::has_root_directory, path::has_root_path)
3439 (path::has_relative_path, path::has_parent_path)
3440 (path::has_filename, path::_M_find_extension): Add noexcept.
3441
e32f625e 34422019-02-06 Jonathan Wakely <jwakely@redhat.com>
3443
3444 PR libstdc++/89102 (partial)
3445 * include/std/type_traits (common_type<>): Define.
3446 (common_type<T>): Derive from common_type<T, T>.
3447 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3448 Test zero-length template argument list.
3449 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3450 Test additional single argument cases.
3451 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3452 Adjust expected error.
3453
b03489db 34542019-02-05 Jonathan Wakely <jwakely@redhat.com>
3455
e89e4fec 3456 PR libstdc++/89128
3457 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3458 guides.
3459 * include/bits/stl_stack.h (stack): Likewise.
3460 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3461 * testsuite/23_containers/queue/deduction.cc: New test.
3462 * testsuite/23_containers/stack/deduction.cc: New test.
3463
b640dd11 3464 PR libstdc++/89194
3465 * include/std/type_traits (__is_convertible_helper)
3466 (__is_convertible_helper<_From, _To, false>): Revert changes to
3467 support is_nothrow_convertible.
3468 (__is_nt_convertible_helper): New helper.
3469 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3470
74c88c5f 3471 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3472 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3473
eca5e8d4 3474 PR libstdc++/89130
3475 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3476 __is_alloc_insertable_impl. Replace single type member with two
3477 members, one for each of copy and move insertable.
3478 (__is_move_insertable): New trait for internal use.
3479 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3480 (vector::_S_nothrow_relocate(true_type)): New functions to
3481 conditionally check if __relocate_a can throw.
3482 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3483 on __is_move_insertable.
3484 (vector::_S_do_relocate): New overloaded functions to conditionally
3485 call __relocate_a.
3486 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3487 based on _S_use_relocate.
3488 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3489 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3490 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3491
b03489db 3492 PR libstdc++/89090
3493 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3494 parameter unnamed. Add message to static assertion.
3495 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3496 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3497 in C++11 code.
3498
71625a15 34992019-02-05 Marc Glisse <marc.glisse@inria.fr>
3500
3501 PR libstdc++/87106
3502 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3503 Rename...
3504 (__is_bitwise_relocatable): ... to this.
3505 (__relocate_a_1): Adapt.
3506 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3507 (__is_bitwise_relocatable): ... to this.
3508
e7b22e58 35092019-01-30 Jonathan Wakely <jwakely@redhat.com>
3510
3511 PR libstdc++/89117
3512 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3513 final component as well as from _M_pathname. Append the dot using
3514 operator+= instead of only to _M_pathname.
3515 (path::_M_find_extension): Reformat slightly.
3516 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3517 Add more test cases.
3518
dae923a7 35192019-01-30 Ulrich Drepper <drepper@redhat.com>
3520
3521 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3522
710397ad 35232019-01-29 Jonathan Wakely <jwakely@redhat.com>
3524
5efc4356 3525 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3526 constexpr specifiers from arg and proj.
3527
5f15e718 3528 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
3529 __shared_ptr instantiations used by gcc4-compatible ABI.
3530
307e86fc 3531 * include/experimental/forward_list (experimental::erase): Qualify
3532 call to erase_if.
3533 * include/experimental/list (experimental::erase): Likewise.
3534 * include/std/forward_list (std::erase): Likewise.
3535 * include/std/list (std::erase): Likewise.
3536
38129d1a 3537 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
3538 C++2a.
3539 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
3540 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
3541 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
3542 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
3543 * testsuite/ext/array_allocator/26875.cc: Likewise.
3544 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
3545 * testsuite/util/replacement_memory_operators.h: Likewise.
3546 * testsuite/util/testsuite_allocator.h: Likewise.
3547
710397ad 3548 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3549 normal mode vector, even for debug mode.
3550 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3551 Define alias template for normal mode vector.
3552
70f71249 35532019-01-28 Jonathan Wakely <jwakely@redhat.com>
3554
3555 PR libstdc++/68737
3556 * config/locale/generic/c_locale.h (__convert_from_v)
3557 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3558 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3559 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3560 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3561
f1074115 35622019-01-24 Jonathan Wakely <jwakely@redhat.com>
3563
4bc4fd90 3564 PR libstdc++/88840
3565 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3566 data member with static member function _S_use_relocate().
3567 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3568 (vector::_M_default_append): Use _S_use_relocate() instead of
3569 __use_relocate.
3570
f1074115 3571 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3572 sign of results.
3573
1c4657a3 35742019-01-22 Jonathan Wakely <jwakely@redhat.com>
3575
3576 PR libstdc++/88740
3577 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3578 write to stderr instead of using printf.
3579
dafe8c59 35802019-01-21 Jakub Jelinek <jakub@redhat.com>
3581
3582 PR libstdc++/86590
3583 * include/bits/char_traits.h (__constant_string_p,
3584 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3585 available.
3586
eaf966f3 35872019-01-20 Ulrich Drepper <drepper@redhat.com>
3588
3589 Implement C++20 P0600r1.
3590 * include/backward/hash_map: Add nodiscard attribute to empty.
3591 * include/backward/hash_set: Likewise.
3592 * backward/hashtable.h: Likewise.
3593 * include/bits/basic_string.h: Likewise.
3594 * include/bits/forward_list.h: Likewise.
3595 * include/bits/hashtable.h: Likewise.
3596 * include/bits/regex.h: Likewise.
3597 * include/bits/stl_deque.h: Likewise.
3598 * include/bits/stl_list.h: Likewise.
3599 * include/bits/stl_map.h: Likewise.
3600 * include/bits/stl_multimap.h: Likewise.
3601 * include/bits/stl_multiset.h: Likewise.
3602 * include/bits/stl_queue.h: Likewise.
3603 * include/bits/stl_set.h: Likewise.
3604 * include/bits/stl_stack.h: Likewise.
3605 * include/bits/stl_tree.h: Likewise.
3606 * include/bits/stl_vector.h: Likewise.
3607 * include/bits/unordered_map.h: Likewise.
3608 * include/bits/unordered_set.h: Likewise.
3609 * include/debug/array: Likewise.
3610 * include/experimental/any: Likewise.
3611 * include/experimental/bits/fs_path.h: Likewise.
3612 * include/experimental/internet: Likewise.
3613 * include/experimental/string_view: Likewise.
3614 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3615 Likewise.
3616 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3617 Likewise.
3618 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3619 Likewise.
3620 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3621 Likewise.
3622 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3623 Likewise.
3624 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3625 Likewise.
3626 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3627 Likewise.
3628 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3629 Likewise.
3630 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3631 info_fn_imps.hpp: Likewise.
3632 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3633 left_child_next_sibling_heap_.hpp: Likewise.
3634 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3635 Likewise.
3636 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3637 Likewise.
3638 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3639 Likewise.
3640 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3641 Likewise.
3642 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3643 Likewise.
3644 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3645 Likewise.
3646 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3647 Likewise.
3648 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3649 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3650 * include/ext/rope: Likewise.
3651 * include/ext/slist: Likewise.
3652 * include/ext/vstring.h: Likewise.
3653 * include/profile/array: Likewise.
3654 * include/std/array: Likewise.
3655 * include/tr1/array: Likewise.
3656 * include/tr1/hashtable.h: Likewise.
3657 * include/tr1/regex: Likewise.
3658 * include/tr2/dynamic_bitset: Likewise.
3659 * include/bits/alloc_traits.h: Add nodiscard attribute to
3660 allocate.
3661 * include/experimental/memory_resource: Likewise.
3662 * include/ext/alloc_traits.h: Likewise.
3663 * include/ext/array_allocator.h: Likewise.
3664 * include/ext/bitmap_allocator.h: Likewise.
3665 * include/ext/debug_allocator.h: Likewise.
3666 * include/ext/extptr_allocator.h: Likewise.
3667 * include/ext/mt_allocator.h: Likewise.
3668 * include/ext/new_allocator.h: Likewise.
3669 * include/ext/pool_allocator.h: Likewise.
3670 * include/ext/throw_allocator.h: Likewise.
3671 * include/std/scoped_allocator: Likewise.
3672 * libsupc++/eh_alloc.cc: Likewise.
3673 * include/std/future: Add nodiscard attribute to async.
3674 * libsupc++/new: Add nodiscard attribute to new.
3675
3c1c2a8c 36762019-01-18 Jonathan Wakely <jwakely@redhat.com>
3677
3678 PR libstdc++/87514
3679 PR libstdc++/87520
3680 PR libstdc++/88782
3681 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3682 * include/bits/shared_ptr.h
3683 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3684 (allocate_shared): Change to use new tag type.
3685 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3686 Declare new member function.
3687 (_Sp_alloc_shared_tag): Define new type.
3688 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3689 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3690 _Sp_make_shared_tag::_S_eq to check type_info.
3691 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3692 Constrain to prevent being called with _Sp_alloc_shared_tag.
3693 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3694 Replace constructor with ...
3695 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3696 reference parameter so address of the new object can be returned to
3697 the caller. Obtain the allocator from the tag type.
3698 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3699 constructor with ...
3700 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3701 to the __shared_count constructor.
3702 (__allocate_shared): Change to use new tag type.
3703 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3704
21a962b2 37052019-01-17 Jonathan Wakely <jwakely@redhat.com>
3706
464ac146 3707 * src/c++17/fs_ops.cc
3708 (equivalent(const path&, const path&, error_code&))
3709 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3710 compare files instead of relying on incomplete info returned by stat.
3711
2987a93d 3712 PR libstdc++/88884
3713 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3714 if the path is already absolute.
3715 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3716 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3717
21a962b2 3718 PR libstdc++/88881
3719 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3720 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3721 of filesystem::exists.
3722 (create_directories(const path&, error_code&)): Add assertions.
3723 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3724 Add workaround for bug in _wstat for paths with trailing slash.
3725 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3726 for expected behaviour on mingw.
3727 * testsuite/experimental/filesystem/operations/create_directories.cc:
3728 Likewise.
3729 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3730 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3731 not test permissions on mingw targets.
3732
93478c9f 37332019-01-16 Jonathan Wakely <jwakely@redhat.com>
3734
3735 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3736 constructors and open members taking wide strings. Fix patterns for
3737 filesystem::path members to match wstring_view parameters. Add
3738 exports for shared_ptr members used by directory iterators.
3739 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3740 error code parameter if the file doesn't exist.
3741 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3742 Likewise.
3743 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3744 values for mingw targets, where "/" is not an absolute path. Do not
3745 test symlinks on mingw targets.
3746 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3747 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3748 on mingw targets.
3749 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3750 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3751 that each component of the path is created.
3752 * testsuite/experimental/filesystem/operations/create_directories.cc:
3753 Likewise.
3754 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3755 permissions on mingw targets.
3756 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3757 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3758 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3759 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3760 mingw targets.
3761 * testsuite/experimental/filesystem/operations/permissions.cc:
3762 Likewise.
3763 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3764 symlinks or permissions on mingw targets.
3765 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3766 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3767 symlinks on mingw targets.
3768 * testsuite/experimental/filesystem/operations/remove_all.cc:
3769 Likewise.
3770 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3771 permissions on mingw targets.
3772 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3773 test symlinks on mingw targets.
3774 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3775 for mingw targets.
3776
af93b844 37772019-02-14 Ulrich Drepper <drepper@redhat.com>
3778
3779 PR libstdc++/88738
3780 Warn about unused comparisons of shared_ptr/unique_ptr
3781 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3782 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3783 <, <=, >, >= for shared_ptr.
3784 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3785
8793c0de 37862019-01-15 Jonathan Wakely <jwakely@redhat.com>
3787
afa61572 3788 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3789 as 201611L, because P0497R0 changes are supported.
3790 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3791
feb89906 3792 * include/bits/erase_if.h [__cplusplus > 201703L]
3793 (__cpp_lib_erase_if): Only define for C++2a.
3794 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3795 (__cpp_lib_null_iterators): Define.
3796 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3797 (__cpp_lib_null_iterators): Define.
3798 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3799
d253bcb1 3800 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3801 status.
3802 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3803 Define.
3804 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3805 changes are supported.
3806 * include/std/optional (__cpp_lib_optional): Likewise.
3807 * include/std/variant (__cpp_lib_variant): Likewise.
3808 * include/std/version [!__STRICT_ANSI__]
3809 (__cpp_lib_uncaught_exceptions): Define as long integer.
3810 [__cplusplus >= 201703L] (__cpp_lib_any)
3811 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3812 (__cpp_lib_variant): Define for C++17.
3813 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3814 as long integer.
3815 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3816 integer.
3817
8793c0de 3818 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3819
a8cd4b2b 38202019-01-12 Jonathan Wakely <jwakely@redhat.com>
3821
3822 PR libstdc++/88811
3823 PR libstdc++/83306
3824 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3825 before second path.
3826 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3827 test.
3828
a5b1332c 38292019-01-11 Jonathan Wakely <jwakely@redhat.com>
3830
656ac8b7 3831 * doc/xml/manual/intro.xml: Include new section.
3832 * doc/xml/manual/status_cxx2017.xml: Document more
3833 implementation-defined properties of the library.
3834 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3835 * doc/html/*: Regenerate.
3836
f5480b8c 3837 * include/bits/refwrap.h [__cplusplus > 201703L]
3838 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3839 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3840 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3841 for C++2a.
3842 (reference_wrapper::operator()): Add static assertion.
3843 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3844
36496c4d 3845 * include/std/chrono (duration_values::zero(), duration_values::min())
3846 (duration_values::max()): Add noexcept.
3847 (duration::zero(), duration::min(), duration::max()): Likewise.
3848 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3849 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3850 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3851
a5b1332c 3852 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3853
d9de68bc 38542019-01-11 Jakub Jelinek <jakub@redhat.com>
3855
3856 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3857 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3858
beb370cb 38592019-01-11 Jonathan Wakely <jwakely@redhat.com>
3860
1d628fd4 3861 PR libstdc++/88802
3862 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3863 specialization for C++17 (P0513R0, LWG 2817).
3864 * testsuite/20_util/hash/nullptr.cc: New test.
3865
a18b3766 3866 PR libstdc++/88125
3867 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3868 pattern for std::basic_stringbuf::str().
3869
beb370cb 3870 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3871 basic_ostream::operator<< patterns.
3872
cbbb35ec 38732019-01-10 Jonathan Wakely <jwakely@redhat.com>
3874
1715824b 3875 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3876 test failures on targets with 32-bit time_t.
3877
f5529091 3878 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3879 * include/std/deque: Likewise.
3880 * include/std/forward_list: Likewise.
3881 * include/std/list: Likewise.
3882 * include/std/string: Likewise.
3883 * include/std/vector: Likewise.
3884 * include/std/version: Likewise.
3885 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3886 * testsuite/23_containers/deque/erasure.cc: Likewise.
3887 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3888 * testsuite/23_containers/list/erasure.cc: Likewise.
3889 * testsuite/23_containers/map/erasure.cc: Likewise.
3890 * testsuite/23_containers/set/erasure.cc: Likewise.
3891 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3892 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3893 * testsuite/23_containers/vector/erasure.cc: Likewise.
3894
cbbb35ec 3895 * include/experimental/internet [AI_NUMERICSERV]
3896 (resolver_base::numeric_service): Define conditionally.
3897 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3898 conditionally.
3899 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3900 Likewise.
3901
ac9a8436 39022019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3903 Jonathan Wakely <jwakely@redhat.com>
3904
3905 Implement LWG 2221
3906 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3907 (GLIBCXX_3.4.26): Add new exports.
3908 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3909 correct list of sources.
3910 * include/Makefile.in: Regenerate.
3911 * include/std/ostream (operator<<(nullptr_t)): New member function.
3912 * src/c++17/ostream-inst.cc: New file.
3913 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3914 test.
3915
5f027941 39162019-01-10 Jonathan Wakely <jwakely@redhat.com>
3917
3918 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3919 of the source file containing the caller.
3920 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3921 directories created by test.
3922 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3923 Likewise.
3924 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3925 Likewise.
3926 * testsuite/experimental/filesystem/iterators/
3927 recursive_directory_iterator.cc: Likewise.
3928
3273d2e6 39292019-01-10 Jakub Jelinek <jakub@redhat.com>
3930
3931 PR tree-optimization/88775
3932 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3933 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3934 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3935 instead of __builtin_constant_p if available. Don't bother with
3936 the pointer comparison in C++11 and earlier.
3937
f4d3c071 39382019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3939
3940 PR other/16615
3941
3942 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3943 with "cannot".
3944
8eba10af 39452019-01-09 Jonathan Wakely <jwakely@redhat.com>
3946
6a6ade9f 3947 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3948 for filesystem::path. Give variables more distinctive names.
3949
41cda271 3950 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3951 member function to perform non-trivial assignment.
3952 (_Optional_payload_base::_M_move_assign): Likewise.
3953 (_Optional_payload<T, true, false, true>::operator=)
3954 (_Optional_payload<T, true, true, false>::operator=)
3955 (_Optional_payload<T, true, false, false>::operator=): Call
3956 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3957
8eba10af 3958 PR libstdc++/88204
3959 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3960 test std::complex<long double> if long double format is IBM128.
3961 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3962 Likewise.
3963
64a50f48 39642019-01-08 Jonathan Wakely <jwakely@redhat.com>
3965
73f3ad16 3966 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3967 for old std::unique_ptr layout.
3968 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3969 to become valueless. Add filesystem::path tests.
3970
58e897da 3971 PR libstdc++/87855
3972 * include/std/optional (_Optional_payload_base): New class template
3973 for common code hoisted from _Optional_payload specializations. Use
3974 a template for the union, to allow a partial specialization for
3975 types with non-trivial destructors. Add constructors for in-place
3976 initialization to the union.
3977 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3978 to perform non-trivial copy construction, instead of relying on
3979 non-standard copy elision in a delegating constructor.
3980 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3981 non-trivial move construction.
3982 (_Optional_payload): Derive from _Optional_payload_base and use it
3983 for everything except the non-trivial assignment operators, which are
3984 defined as needed.
3985 (_Optional_payload<false, C, M>): Derive from the specialization
3986 _Optional_payload<true, false, false> and add a destructor.
3987 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3988 Forward to corresponding members of _Optional_payload.
3989 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3990 Hoist common members from _Optional_base.
3991 (_Optional_base): Make all members and base class public.
3992 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3993 _Optional_base_impl.
3994 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3995 support for new std::optional layout.
3996 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3997
64a50f48 3998 PR libstdc++/88066
3999 * include/bits/locale_conv.h: Use <> for includes not "".
4000 * include/ext/random: Likewise.
4001 * include/ext/vstring.h: Likewise.
4002
95b40931 40032019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4004
4005 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4006 (GLIBCXX_3.4.21): Likewise.
4007
fa00ec77 40082019-01-08 Jonathan Wakely <jwakely@redhat.com>
4009
4010 PR libstdc++/88749
4011 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4012 to match the one that controls whether utimbuf and utime are declared.
4013
3f304b2d 40142019-01-07 Jonathan Wakely <jwakely@redhat.com>
4015
fc6ac813 4016 PR libstdc++/87787
4017 * include/bits/char_traits.h (char_traits::move): Do not pass null
4018 pointers to memmove.
4019 * include/bits/locale_facets.h
4020 (ctype<char>::widen(const char*, const char*, char*)): Do not
4021 pass null pointers to memcpy.
4022 (ctype<char>::narrow(const char*, const char*, char, char*)):
4023 Likewise.
4024 (ctype<char>::do_widen(const char*, const char*, char*)):
4025 Likewise.
4026 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4027 Likewise.
4028
bbc66c45 4029 * doc/xml/manual/spine.xml: Update copyright years.
4030 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4031 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4032 for C++17 filesystem library.
4033 * doc/html/*: Regenerate.
4034
3f304b2d 4035 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4036 * config.h.in: Regenerate.
4037 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4038 alphabetically and add missing entries for copy_symlink,
4039 hard_link_count, rename, and resize_file.
4040 * configure: Regenerate.
4041 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4042 used unconditionally.
4043 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4044 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4045 supports truncating to zero length.
4046 * testsuite/27_io/filesystem/operations/all.cc: New test.
4047 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4048
0ebb0980 40492019-01-06 Jonathan Wakely <jwakely@redhat.com>
4050
3935f409 4051 PR libstdc++/86756
4052 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4053 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4054 * config.h.in: Regenerate.
4055 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4056 remaining std::filesystem types and functions.
4057 * configure: Regenerate.
4058 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4059 * src/c++17/Makefile.in: Regenerate.
4060 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4061 here, and change name of included file.
4062 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4063 here, and change name of included file.
4064 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4065 path to dir-common.h.
4066 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4067 path to ops-common.h. Disable -Wunused-parameter warnings.
4068 (internal_file_clock): Define unconditionally.
4069 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4070 define.
4071 (do_copy_file, do_space): Move definitions to ops.common.h.
4072 (copy, file_size, hard_link_count, last_write_time, space): Only
4073 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4074 report an error.
4075 (last_write_time, read_symlink): Remove unused attributes from
4076 parameters.
4077 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4078 * src/filesystem/Makefile.in: Regenerate.
4079 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4080 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4081 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4082 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4083 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4084 dummy types and functions instead of using #error.
4085 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4086 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4087 in terms of stat.
4088 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4089 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4090 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4091 to account for new namespace.
4092 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4093 -lstdc++fs from dg-options.
4094 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4095 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4096 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4097 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4098 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4099 Likewise.
4100 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4101 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4102 Likewise.
4103 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4104 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4105 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4106 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4107 * testsuite/27_io/filesystem/operations/create_directories.cc:
4108 Likewise.
4109 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4110 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4111 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4112 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4113 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4114 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4115 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4116 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4117 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4118 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4119 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4120 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4121 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4122 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4123 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4124 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4125 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4126 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4127 Likewise.
4128 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4129
4130
c6e37a9f 4131 PR libstdc++/86756
4132 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4133 typeinfo and vtables less greedy.
4134 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4135 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4136 * src/c++17/Makefile.in: Regenerate.
4137 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4138 here, and change name of included file.
4139 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4140 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4141 from sources.
4142 * src/filesystem/Makefile.in: Regenerate.
4143 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4144 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4145 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4146 from dg-options and remove dg-require-filesystem-ts.
4147 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4148 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4149 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4150 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4151 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4152 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4153 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4154 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4155 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4156 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4157 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4158 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4159 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4160 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4161 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4162 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4163 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4164 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4165 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4166 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4167 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4168 Likewise.
4169 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4170 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4171 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4172 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4173 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4174 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4175 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4176 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4177 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4178 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4179 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4180 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4181 Likewise.
4182 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4183 Likewise.
4184 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4185 Likewise.
4186 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4187 Likewise.
4188 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4189 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4190 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4191 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4192 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4193 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4194 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4195 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4196 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4197 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4198 Likewise.
4199 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4200 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4201 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4202 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4203 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4204
8815ac91 4205 PR libstdc++/87431
4206 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4207 Check is_trivially_copyable instead of is_scalar.
4208 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4209 contained value can throw and its type is trivially copyable then
4210 construct into a temporary variant and move from it, to provide the
4211 strong exception safety guarantee.
4212 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4213 Likewise.
4214 * testsuite/20_util/variant/87431.cc: New test.
4215 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4216 conversion causes valueless state.
4217
0ebb0980 4218 PR libstdc++/88607
4219 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4220 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4221 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4222 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4223 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4224
adc6beee 42252019-01-05 Jonathan Wakely <jwakely@redhat.com>
4226
4227 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4228 (file_time_type): Redefine in terms of __file_clock.
4229 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4230 overflow.
4231 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4232 internal linkage.
4233 (internal_file_lock): New helper type for accessing __file_clock.
4234 (do_copy_file): Use internal_file_lock to convert system time to
4235 file_time_type.
4236 (last_write_time(const path&, error_code&)): Likewise.
4237 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4238
6b4a77f2 42392019-01-04 Jonathan Wakely <jwakely@redhat.com>
4240
98185b9f 4241 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4242 for const member functions of std::basic_string.
4243 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4244 in C++17.
4245 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4246 Make non-standard constructor private.
4247 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4248 Likewise.
4249 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4250 explicit instantiations for C++17 as well as earlier dialects.
4251 * src/c++17/Makefile.am: Add new source files.
4252 * src/c++17/Makefile.in: Regenerate.
4253 * src/c++17/cow-string-inst.cc: New file defining explicit
4254 instantiations for basic_string member functions added in C++17.
4255 * src/c++17/string-inst.cc: Likewise.
4256
859e6fed 4257 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4258 copy/move constructors for old std::basic_string.
4259 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4260 (basic_string::reference, basic_string::const_reference): Define
4261 as plain references for C++11 and later.
4262 (basic_string::basic_string()): Put constructor body outside
4263 preprocessor conditional groups.
4264 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4265 instead of copying it.
4266 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4267 Define.
4268 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4269 Define.
4270 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4271 cases for old basic_string.
4272 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4273 allocator-extended constructors unconditionally. Add extra members to
4274 allocator type when using old string ABI.
4275 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4276 for old string ABI.
4277 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4278
e13f6a7f 4279 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4280 -fno-inline added to test flags.
4281
a18fccd0 4282 * testsuite/21_strings/basic_string/requirements/
4283 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4284
7f77ca07 4285 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4286 assertion failures with old std::string ABI.
4287
9346fb0e 4288 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4289 with ...
4290 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4291 functions that will only erase elements at the end.
4292 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4293 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4294 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4295 of erase(p, end()).
4296 (path::_List::pop_back()): Define.
4297 (path::_List::_M_erase_from(const_iterator)): Define.
4298 (path::operator/=(const path&)): Use pop_back to remove last component
4299 and _M_erase_from to remove multiple components.
4300 (path::_M_append(basic_string_view<value_type>)): Likewise.
4301 (path::operator+=(const path&)): Likewise.
4302 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4303 (path::remove_filename()): Likewise.
4304 (path::lexically_normal()): Use _List::_Impl iterators instead of
4305 path::iterator. Use pop_back to remove components from the end. Clear
4306 trailing filename, instead of using erase(const_iterator) to remove
4307 a non-final component.
4308 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4309 additional cases.
4310 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4311
24230cab 4312 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4313 incorrect treatment of empty filename after trailing slash.
4314 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4315
6b4a77f2 4316 * testsuite/21_strings/basic_string/modifiers/assign/char/
4317 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4318 to test flags.
4319 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4320 move_assign_optim.cc: Likewise.
4321
02df5941 43222019-01-03 Jonathan Wakely <jwakely@redhat.com>
4323 Jakub Jelinek <jakub@redhat.com>
4324
4325 PR libstdc++/88607
4326 * include/experimental/memory: Replace UTF-8 quote characters.
4327 * include/std/future: Replace UTF-8 "em dash" characters.
4328
f8ad40d8 43292019-01-03 Jonathan Wakely <jwakely@redhat.com>
4330
9013258b 4331 PR libstdc++/88607
4332 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4333 * include/debug/forward_list: Likewise.
4334 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4335 character.
4336 * include/experimental/chrono: Likewise.
4337 * include/experimental/functional: Likewise.
4338 * include/experimental/ratio: Likewise.
4339 * include/experimental/system_error: Likewise.
4340 * include/experimental/tuple: Likewise.
4341 * include/experimental/type_traits: Likewise.
4342 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4343 * include/parallel/multiseq_selection.h: Likewise.
4344
f8ad40d8 4345 PR libstdc++/88681
4346 * config/abi/pre/gnu.ver: Add missing exports.
4347 * testsuite/22_locale/collate_byname/88681.cc: New test.
4348 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4349 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4350
138292f4 43512019-01-02 Jonathan Wakely <jwakely@redhat.com>
4352
553d41a8 4353 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4354 initializer_list<value_type> and from input iterator ranges.
4355 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4356
138292f4 4357 * testsuite/experimental/string_view/element_access/char/empty.cc:
4358 Fix year range in copyright header.
4359
963c0125 43602019-01-02 Joel Brobecker <brobecker@adacore.com>
4361
4362 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4363 Fix year range in copyright header.
4364
fbd26352 43652019-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 4366
4367 Update copyright years.
fb96fbb3 4368\f
fbd26352 4369Copyright (C) 2019 Free Software Foundation, Inc.
fb96fbb3 4370
4371Copying and distribution of this file, with or without modification,
4372are permitted in any medium without royalty provided the copyright
4373notice and this notice are preserved.