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