]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/ChangeLog
8bba4b3d028e36fa03af320cfbad5d4296e17bee
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
1 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2
3 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
4 actually match its name.
5 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
6 (test_swap()): Fix result for MoveCtorOnly and check
7 MoveCtorAndSwapOnly.
8
9 * include/std/optional (optional::value_or(U&&) &&): Add missing
10 constexpr specifier.
11 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
12 for disengaged optionals and rvalue optionals.
13 * testsuite/20_util/optional/observers/4.cc: Likewise.
14
15 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
16
17 * include/pstl/algorithm_impl.h: Uglify identfiers.
18 * include/pstl/numeric_impl.h: Uglify identfiers.
19 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
20
21 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
22
23 * include/bits/c++config:
24 Add definition for __PSTL_ASSERT.
25 Add definition for __PSTL_ASSERT_MSG.
26 * include/pstl/algorithm_impl.h: Replace use of assert().
27 * include/pstl/numeric_impl.h: Replace use of assert().
28 * include/pstl/parallel_backend_tbb.h:
29 Replace use of assert().
30 Replace use of __TBB_ASSERT().
31 * include/pstl/parallel_backend_utils.h: Replace use of assert().
32
33 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
34
35 PR libstdc++/90046
36 * src/c++17/memory_resource.cc
37 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
38 needed to allow placing a _Chunk at the end of the buffer.
39 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
40
41 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
42
43 * doc/xml/faq.xml: Add information about emergency EH pool.
44 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
45 Move outdated information on mt_allocator to a separate section.
46 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
47 doesn't affect the default allocator.
48
49 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
50 typo.
51
52 PR libstdc++/89851
53 * testsuite/20_util/variant/89851.cc: New test.
54
55 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
56
57 * include/std/variant: Adjust whitespace. Add comments.
58 (_Multi_array): Leave primary template undefined.
59 (_Multi_array<_Tp>): Define partial specialization for base case of
60 recursion.
61 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
62 which is always a reference.
63 (__gen_vtable::_S_apply()): Remove function, inline body into
64 default member initializer.
65 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
66
67 * include/std/variant (__variant_idx_cookie): Add member type.
68 (__visitor_result_type): Remove.
69 (__do_visit): Use invoke_result instead of __visitor_result_type.
70 * testsuite/20_util/variant/visit.cc: New test.
71
72 PR libstdc++/90008
73 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
74 unused capture.
75 * testsuite/20_util/variant/90008.cc: New test.
76
77 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
78
79 * include/pstl/algorithm_impl.h: Add namespace qualification.
80 * include/pstl/execution_defs.h: Add namespace qualification.
81 * include/pstl/execution_impl.h: Add namespace qualification.
82 * include/pstl/numeric_impl.h: Add namespace qualification.
83 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
84 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
85 * include/pstl/parallel_backend_utils.h: Include <cassert>.
86
87 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
88
89 Fix visit<R> for variant.
90 * include/std/variant (__do_visit): Add a template parameter
91 for enforcing same return types for visit.
92 (__gen_vtable_impl): Likewise.
93 (_S_apply_single_alt): Adjust.
94 (__visit_invoke_impl): New. Handle casting to void.
95 (__do_visit_invoke): New. Enforces same return types.
96 (__do_visit_invoke_r): New. Converts return types.
97 (__visit_invoke): Adjust.
98 (__gen_vtable): Add a template parameter for enforcing
99 same return types for visit.
100 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
101 different return types.
102 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
103 visitors with different return types don't accidentally
104 compile with regular visitation.
105
106 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
107
108 * testsuite/27_io/filesystem/iterators/caching.cc: Add
109 dg-require-filesystem-ts.
110
111 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
112
113 * doc/xml/manual/status_cxx2020.xml: Update status.
114 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
115 * testsuite/20_util/variant/visit_r.cc: New test.
116
117 * include/bits/fs_dir.h (directory_iterator::operator*)
118 (directory_iterator::operator->): Add noexcept.
119 (operator==, operator!=): Replace namespace-scope equality operators
120 for directory iterators with hidden friends.
121
122 PR libstdc++/89986
123 * config/abi/pre/gnu.ver: Add missing exports.
124 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
125 increment member.
126
127 * config/abi/pre/gnu.ver: Export new symbols.
128 * include/bits/fs_dir.h (recursive_directory_iterator::options())
129 (recursive_directory_iterator::recursion_pending())
130 (recursive_directory_iterator::disable_recursion_pending()): Remove
131 inline definitions. Make noexcept.
132 (recursive_directory_iterator::depth())
133 (recursive_directory_iterator::operator*())
134 (recursive_directory_iterator::operator->()): Make noexcept.
135 (recursive_directory_iterator::_M_options)
136 (recursive_directory_iterator::_M_pending): Remove data members.
137 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
138 (recursive_directory_iterator::recursive_directory_iterator): Remove
139 ctor-initializer. Use new constructor for _Dir_stack.
140 (recursive_directory_iterator::options())
141 (recursive_directory_iterator::recursion_pending())
142 (recursive_directory_iterator::disable_recursion_pending()): Add
143 non-inline definitions.
144 (recursive_directory_iterator::depth()): Make noexcept.
145 (recursive_directory_iterator::increment(error_code&))
146 (recursive_directory_iterator::pop(error_code&)): Adjust to new
147 location of options and recursion_pending members.
148 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
149 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
150 user-declared move constructor and assignment operator, to make the
151 type move-only.
152
153 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
154 d_type == DT_UNKNOWN immediately.
155 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
156 handling here.
157 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
158
159 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
160 assignment.
161 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
162 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
163 assignment.
164
165 PR libstdc++/87431 (again)
166 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
167 Define partial specialization for basic_string.
168 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
169 shared_ptr and weak_ptr.
170 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
171 function.
172 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
173 vector.
174 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
175 unique_ptr.
176 * include/debug/vector (_Never_valueless_alt): Likewise for debug
177 vector.
178 * include/std/any (_Never_valueless_alt): Define explicit
179 specialization for any.
180 * include/std/variant (_Never_valueless_alt): Define primary template.
181 (__never_valueless): Use _Never_valueless_alt instead of
182 is_trivially_copyable.
183 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
184 initializations to avoid try-catch overhead. Add special case for
185 scalars produced by potentially-throwing conversions. Use
186 _Never_valueless_alt instead of is_trivially_copyable for the
187 remaining strong exception-safety cases.
188 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
189 * testsuite/20_util/variant/87431.cc: Run both test functions.
190 * testsuite/20_util/variant/exception_safety.cc: New test.
191 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
192 so the variant becomes valueless.
193
194 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
195
196 PR libstdc++/85184
197 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
198 Remove assertions.
199 (variant::emplace<_Tp>): Return result of emplace<N> directly.
200
201 * include/std/string (__hash_string_base): New class template defining
202 operator() for hashing strings.
203 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
204 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
205 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
206 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
207
208 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
209
210 Use single-visitation in variant assignment and swap and relops.
211 Also use indices instead of types when checking whether
212 variants hold the same thing.
213 * include/std/variant (__do_visit): Add a template parameter
214 for index visitation, invoke with indices if index visitation
215 is used.
216 (__variant_idx_cookie): New.
217 (__visit_with_index): Likewise.
218 (_Copy_assign_base::operator=): Do single-visitation with
219 an index visitor.
220 (_Move_assign_base::operator=): Likewise.
221 (_Extra_visit_slot_needed): Adjust.
222 (__visit_invoke): Call with indices if it's an index visitor.
223 (relops): Do single-visitation with an index visitor.
224 (swap): Likewise.
225 (__visitor_result_type): New.
226
227 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
228
229 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
230
231 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
232
233 Don't revisit a variant we are already visiting.
234 * include/std/variant (__variant_construct_single): New.
235 (__variant_construct): Use it.
236 (_M_destructive_move): Likewise.
237 (_M_destructive_copy): Likewise.
238 (_Copy_assign_base::operator=): Adjust.
239 (_Move_assign_base::operator=): Likewise.
240 (swap): Likewise.
241
242 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
243
244 PR libstdc++/85965
245 * include/bits/hashtable.h (_Hashtable): Move static assertions to
246 destructor so they are not evaluated until the _Key type is complete.
247 * include/bits/stl_tree.h (_Rb_tree): Likewise.
248 * testsuite/23_containers/set/85965.cc: New test.
249 * testsuite/23_containers/unordered_set/85965.cc: New test.
250 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
251 with regexp matching the corresponding _Rb_tree specialization.
252 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
253 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
254 * testsuite/23_containers/set/48101_neg.cc: Likewise.
255 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
256 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
257 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
258 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
259
260 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
261
262 PR libstdc++/89825
263 Fix based on a suggestion by Antony Polukhin.
264 * include/std/variant (__never_valueless): New.
265 (_M_valid): Use it.
266 (_Extra_visit_slot_needed): New.
267 (_Multi_array): Use it.
268 (_S_apply_all_alts): Likewise.
269
270 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
271
272 PR libstdc++/89824
273 Fix based on a suggestion by Antony Polukhin.
274 * include/std/variant (__gen_vtable): Don't reserve an
275 additional table slot, _Multi_array already does that.
276
277 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
278
279 PR libstdc++/89816
280 Fix based on a suggestion by Antony Polukhin.
281 * include/std/variant (__variant_construct): Capture a pointer
282 to the storage and visit just one variant.
283
284 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
285
286 * doc/xml/manual/backwards_compatibility.xml: Remove link to
287 Doxygen-generated pages with unstable URL.
288 * doc/xml/manual/concurrency_extensions.xml: Likewise.
289 * doc/xml/manual/extensions.xml: Likewise.
290 * doc/xml/manual/parallel_mode.xml: Likewise.
291 * doc/xml/manual/support.xml: Likewise.
292
293 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
294 avoid -Wconversion warnings.
295
296 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
297
298 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
299 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
300 (allstamped): Add stamp-pstl.
301 (install-headers): Add ptsl_builddir.
302 * include/Makefile.in: Regenerate.
303 * include/bits/c++config: Add pstl configuration.
304 * include/pstl/LICENSE.txt: New file.
305 * include/pstl/algorithm_fwd.h: New file.
306 * include/pstl/algorithm_impl.h: New file.
307 * include/pstl/execution_defs.h: New file.
308 * include/pstl/execution_impl.h: New file.
309 * include/pstl/glue_algorithm_defs.h: New file.
310 * include/pstl/glue_algorithm_impl.h: New file.
311 * include/pstl/glue_execution_defs.h: New file.
312 * include/pstl/glue_memory_defs.h: New file.
313 * include/pstl/glue_memory_impl.h: New file.
314 * include/pstl/glue_numeric_defs.h: New file.
315 * include/pstl/glue_numeric_impl.h: New file.
316 * include/pstl/memory_impl.h: New file.
317 * include/pstl/numeric_fwd.h: New file.
318 * include/pstl/numeric_impl.h: New file.
319 * include/pstl/parallel_backend.h: New file.
320 * include/pstl/parallel_backend_tbb.h: New file.
321 * include/pstl/parallel_backend_utils.h: New file.
322 * include/pstl/parallel_impl.h: New file.
323 * include/pstl/pstl_config.h: New file.
324 * include/pstl/unseq_backend_simd.h: New file.
325 * include/pstl/utils.h: New file.
326 * include/std/algorithm: Include parallel algorithm implementations.
327 * include/std/execution: New file.
328 * include/std/memory: Include parallel algorithm implementations.
329 * include/std/numeric: Include parallel algorithm implementations.
330 * include/std/version: Add parallel algorithms feature test macro.
331 * testsuite/util/pstl/pstl_test_config.h: New file.
332 * testsuite/util/pstl/test_utils.h: New file.
333 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
334 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
335 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
336 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
337 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
338 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
339 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
340 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
341 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
342 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
343 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
344 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
345 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
346 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
347 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
348 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
349 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
350 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
351 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
352 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
353 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
354 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
355 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
356 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
357 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
358 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
359 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
360 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
361 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
362 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
363 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
364 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
365 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
366 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
367 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
368 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
369 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
370 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
371 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
372 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
373 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
374 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
375 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
376 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
377 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
378 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
379 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
380 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
381 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
382 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
383 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
384 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
385 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
386 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
387 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
388 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
389 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
390 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
391 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
392 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
393 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
394 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
395 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
396 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
397 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
398 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
399 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
400 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
401 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
402 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
403 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
404 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
405 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
406 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
407 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
408 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
409 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
410 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
411 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
412 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
413 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
414 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
415 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
416 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
417 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
418 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
419 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
420 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
421 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
422 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
423 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
424 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
425 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
426 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
427 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
428 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
429 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
430 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
431 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
432 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
433 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
434 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
435 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
436 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
437 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
438 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
439
440 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
441
442 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
443 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
444 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
445 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
446 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
447 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
448 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
449 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
450 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
451 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
452 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
453 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
454 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
455 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
456 when the special functions IS is enabled, not for C++17.
457 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
458 Replace with ...
459 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
460 without checks for special functions in C++17.
461 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
462 New test.
463
464 PR libstdc++/88066
465 * include/backward/hash_map: Use <> for includes not "".
466 * include/backward/hash_set: Likewise.
467 * include/backward/strstream: Likewise.
468 * include/tr1/bessel_function.tcc: Likewise.
469 * include/tr1/exp_integral.tcc: Likewise.
470 * include/tr1/legendre_function.tcc: Likewise.
471 * include/tr1/modified_bessel_func.tcc: Likewise.
472 * include/tr1/riemann_zeta.tcc: Likewise.
473
474 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
475
476 * doc/xml/manual/allocator.xml: Link to table documenting evolution
477 of extension allocators.
478 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
479 Document new headers in 7.2, 8.1 and 9.1 releases.
480 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
481 * doc/html/*: Regenerate.
482
483 2019-03-12 John David Anglin <dave.anglin@bell.net>
484
485 PR libstdc++/89461
486 * testsuite/lib/libstdc++.exp: Locate libatomic.
487 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
488 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
489 libatomic options.
490 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
491 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
492 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
493 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
494
495 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
496
497 PR libstdc++/89460
498 * configure.ac: Check for sockatmark.
499 * crossconfig.m4: Check for sockatmark.
500 * config.h.in: Regenerate.
501 * configure: Regenerate.
502 * include/experimental/internet (address_v4::_S_hton): Rename
503 overloaded functions to _S_hton_16 and _S_ntoh_16.
504 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
505 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
506 * include/experimental/socket (basic_socket::at_mark): Check
507 _GLIBCXX_HAVE_SOCKATMARK.
508
509 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
510 const variables instead of macros.
511
512 PR libstdc++/89629
513 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
514 Use correct type for len_aligned.
515 * testsuite/20_util/hash/89629.cc: New test.
516
517 2019-03-11 Jakub Jelinek <jakub@redhat.com>
518
519 PR libstdc++/89641
520 * include/std/atomic (atomic<T>::store, atomic<T>::load,
521 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
522 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
523 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
524 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
525 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
526 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
527 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
528 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
529 memory_order_seq_cst to int.
530
531 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
532
533 * doc/xml/manual/using.xml: Use link element instead of xref.
534 * doc/html/*: Regenerate.
535
536 * include/bits/fs_path.h (path::format): Add fixed underlying type.
537
538 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
539
540 PR libstdc++/89477
541 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
542 parameters in deduction guides.
543 * include/debug/multimap.h (multimap): Likewise.
544 * include/debug/set.h (multimap): Likewise.
545 * include/debug/multiset.h (multimap): Likewise.
546 * include/debug/unordered_map (unordered_map): Likewise.
547 (unordered_multimap): Likewise.
548 * include/debug/unordered_set (unordered_set): Likewise.
549 (unordered_multiset): Likewise.
550
551 PR libstdc++/89608
552 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
553 Invalidate all iterators in case of rehash.
554 (unordered_multimap<>::_M_check_rehashed): Likewise.
555 * include/debug/unordered_set
556 (unordered_set<>::_M_check_rehashed): Likewise.
557 (unordered_multiset<>::_M_check_rehashed): Likewise.
558 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
559
560 2019-03-07 Andreas Schwab <schwab@suse.de>
561
562 * config/abi/post/riscv64-linux-gnu: New directory.
563 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
564
565 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
566
567 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
568 compile test to run. Fix typo.
569
570 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
571 * doc/html/*: Regenerate.
572
573 P0356R5 Simplified partial function application
574 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
575 helpers for bind_front.
576 (bind_front, __cpp_lib_bind_front): Define.
577 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
578
579 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
580
581 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
582 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
583 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
584 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
585
586 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
587
588 PR libstdc++/86655 - std::assoc_legendre should not constrain
589 the value of m (or x).
590 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
591 __sph_legendre): If degree > order Don't throw, return 0.
592 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
593 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
594 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
595 * testsuite/tr1/5_numerical_facilities/special_functions/
596 02_assoc_legendre/pr86655.cc: New test.
597 * testsuite/tr1/5_numerical_facilities/special_functions/
598 22_sph_legendre/pr86655.cc: New test.
599
600 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
601
602 Rewrite variant.
603 Also PR libstdc++/85517
604 * include/std/variant (__do_visit): New.
605 (__variant_cast): Likewise.
606 (__variant_cookie): Likewise.
607 (__erased_*): Remove.
608 (_Variant_storage::_S_vtable): Likewise.
609 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
610 (_Variant_storage::__M_reset): Adjust.
611 (__variant_construct): New.
612 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
613 __variant_construct.
614 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
615 (_Move_ctor_base::__M_destructive_copy): New.
616 (_Move_ctor_base::__M_destructive_move): Adjust to use
617 __variant_construct.
618 (_Copy_assign_base::operator=): Adjust to use __do_visit.
619 (_Copy_assign_alias): Adjust to check both copy assignment
620 and copy construction for triviality.
621 (_Move_assign_base::operator=): Adjust to use __do_visit.
622 (_Multi_array): Add support for visitors that accept and return
623 a __variant_cookie.
624 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
625 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
626 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
627 a __variant_cookie temporary for a variant that is valueless and..
628 (__gen_vtable_impl::__visit_invoke): ..adjust here.
629 (__gen_vtable::_Array_type): Conditionally make space for
630 the __variant_cookie visitor case.
631 (__variant_construct_by_index): New.
632 (get_if): Adjust to use std::addressof.
633 (relops): Adjust to use __do_visit.
634 (variant): Add __variant_cast and __variant_construct_by_index
635 as friends.
636 (variant::emplace): Use _M_reset() and __variant_construct_by_index
637 instead of self-destruction.
638 (variant::swap): Adjust to use __do_visit.
639 (visit): Reimplement in terms of __do_visit.
640 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
641 * testsuite/20_util/variant/compile.cc: Adjust.
642 * testsuite/20_util/variant/run.cc: Likewise.
643
644 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
645
646 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
647 constant.
648 * testsuite/experimental/feat-char8_t.cc: Likewise.
649
650 * include/std/type_traits [C++20] (is_bounded_array)
651 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
652 Define.
653 * testsuite/20_util/is_bounded_array/requirements/
654 explicit_instantiation.cc: New test.
655 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
656 test.
657 * testsuite/20_util/is_bounded_array/value.cc: New test.
658 * testsuite/20_util/is_unbounded_array/requirements/
659 explicit_instantiation.cc: New test.
660 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
661 * test.
662 * testsuite/20_util/is_unbounded_array/value.cc: New test.
663
664 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
665 Add constexpr.
666 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
667
668 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
669
670 * include/c_compatibility/math.h [C++20] (lerp): Add using
671 declaration.
672 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
673 (__lerp): Define function template to implement lerp.
674 (lerp(float, float, float), lerp(double, double, double))
675 (lerp(long double, long double, long double)): Define for C++20.
676 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
677 (midpoint(T, T), midpoint(T*, T*)): Define.
678 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
679 * testsuite/26_numerics/lerp.cc: New test.
680 * testsuite/26_numerics/midpoint/floating.cc: New test.
681 * testsuite/26_numerics/midpoint/integral.cc: New test.
682 * testsuite/26_numerics/midpoint/pointer.cc: New test.
683
684 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
685
686 PR libstdc++/88996 Implement P0439R0
687 Make std::memory_order a scoped enumeration.
688 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
689 add variables for the old enumerators. Adjust calls.
690 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
691 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
692
693 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
694
695 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
696 directive.
697
698 * include/std/memory_resource (polymorphic_allocator): Add default
699 template argument for C++20.
700 (polymorphic_allocator::allocate_bytes)
701 (polymorphic_allocator::deallocate_bytes)
702 (polymorphic_allocator::allocate_object)
703 (polymorphic_allocator::deallocate_object)
704 (polymorphic_allocator::new_object)
705 (polymorphic_allocator::delete_object): New member functions for
706 C++20.
707 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
708 test.
709
710 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
711
712 PR libstdc++/89562
713 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
714 mode for mingw.
715
716 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
717
718 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
719 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
720
721 * include/std/memory (uses_allocator_construction_args): New set of
722 overloaded functions.
723 (make_obj_using_allocator, uninitialized_construct_using_allocator):
724 New functions.
725 * include/std/memory_resource (polymorphic_allocator::construct)
726 [__cplusplus > 201703l]: Replace all overloads with a single function
727 using uses_allocator_construction_args.
728 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
729 test.
730 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
731
732 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
733
734 PR libstdc++/89466
735 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
736 stylesheet directories before check for xsltproc. Try to use
737 xmlcatalog to find local stylesheet directory before trying hardcoded
738 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
739 check to look for the same stylesheet as doc/Makefile.am uses. Don't
740 use xsltproc if xmlcatalog fails to find a local stylesheet.
741 * configure.ac: Check for xmlcatalog.
742 * Makefile.in: Regenerate.
743 * configure: Likewise.
744 * doc/Makefile.in: Likewise.
745 * include/Makefile.in: Likewise.
746 * libsupc++/Makefile.in: Likewise.
747 * po/Makefile.in: Likewise.
748 * python/Makefile.in: Likewise.
749 * src/Makefile.in: Likewise.
750 * src/c++11/Makefile.in: Likewise.
751 * src/c++17/Makefile.in: Likewise.
752 * src/c++98/Makefile.in: Likewise.
753 * src/filesystem/Makefile.in: Likewise.
754 * testsuite/Makefile.in: Likewise.
755
756 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
757
758 PR libstdc++/89477
759 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
760 container deduction guides.
761 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
762 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
763 parameters in deduction guides.
764 * include/bits/stl_multimap.h (multimap): Likewise.
765 * include/bits/stl_multiset.h (multiset): Likewise.
766 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
767 * include/bits/stl_set.h (set): Likewise.
768 * include/bits/stl_stack.h (stack): Likewise.
769 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
770 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
771 constrain parameters in deduction guides.
772 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
773 Likewise.
774 * testsuite/23_containers/map/cons/deduction.cc: Test additional
775 deduction cases.
776 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
777 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
778 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
779 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
780 Likewise.
781 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
782 Likewise.
783 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
784
785 PR libstdc++/89416
786 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
787 to class template and partial specialization using void_t.
788 (__is_copy_insertable, __is_move_insertable): Adjust base class.
789
790 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
791
792 PR libstdc++/89416
793 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
794 copy and move members public.
795
796 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
797
798 * include/std/type_traits (__underlying_type_impl): New helper to
799 make underlying_type SFINAE-friendly.
800 (underlying_type): Derive from __underlying_type_impl.
801 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
802 test.
803
804 PR libstdc++/89446
805 * include/bits/char_traits.h (__constant_char_array): Check index is
806 in range before dereferencing.
807 (char_traits<char>::compare, char_traits<char>::find)
808 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
809 immediately if n is zero.
810 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
811 Remove workarounds for PR 67026.
812 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
813 New test.
814 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
815 New test.
816
817 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
818
819 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
820 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
821
822 2019-02-22 Jakub Jelinek <jakub@redhat.com>
823
824 PR libstdc++/89402
825 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
826 type to std::size_t and argument to type to long double.
827
828 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
829
830 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
831 * config/abi/post/sparc64-linux-gnu: New directory.
832 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
833 * config/abi/post/sparc64-linux-gnu/32: New directory.
834 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
835
836 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
837
838 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
839 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
840 test.
841
842 2019-02-22 Tom Honermann <tom@honermann.net>
843
844 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
845 printers for u8string and u8string_view.
846
847 2019-02-22 Tom Honermann <tom@honermann.net>
848
849 * testsuite/18_support/byte/ops.cc: Validate
850 std::to_integer<char8_t>, std::to_integer<char16_t>, and
851 std::to_integer<char32_t>.
852 * testsuite/18_support/numeric_limits/dr559.cc: Validate
853 std::numeric_limits<char8_t>.
854 * testsuite/18_support/numeric_limits/lowest.cc: Validate
855 std::numeric_limits<char8_t>::lowest().
856 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
857 std::numeric_limits<char8_t>::max_digits10.
858 * testsuite/18_support/type_info/fundamental.cc: Validate
859 typeinfo for char8_t.
860 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
861 std::from_chars with char8_t.
862 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
863 Validate explicit instantiation of std::hash<char8_t>.
864 * testsuite/20_util/is_integral/value.cc: Validate
865 std::is_integral<char8_t>.
866 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
867 Validate std::make_signed<char8_t>.
868 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
869 Validate u8string construction from char8_t sources.
870 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
871 std::pmr::u8string.
872 * testsuite/21_strings/basic_string_view/operations/compare/
873 char/70483.cc: Validate substr operations on u8string_view.
874 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
875 the u8string_view typedef is defined.
876 * testsuite/21_strings/char_traits/requirements/
877 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
878 member functions.
879 * testsuite/21_strings/char_traits/requirements/
880 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
881 constexpr member functions.
882 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
883 that the u8string typedef is defined.
884 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
885 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
886 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
887 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
888 numbers.
889 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
890 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
891 Likewise.
892 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
893 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
894 Validate std::atomic<char8_t>::is_always_lock_free
895 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
896 Update line numbers.
897 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
898 Likewise.
899 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
900 Likewise.
901 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
902 Validate std::experimental::pmr::u8string.
903 * testsuite/experimental/string_view/typedefs.cc: Validate that the
904 u8string_view typedef is defined.
905 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
906 char32_t to the typelists.
907
908 2019-02-22 Tom Honermann <tom@honermann.net>
909
910 * include/ext/typelist.h: Constrain a partial specialization of
911 typelist::detail::append_ to only match chain<T1,T2>.
912
913 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
914
915 PR libstdc++/89416
916 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
917 class template with class. Replace move and copy member types with
918 member alias templates, so they are only instantiated when needed.
919 (__is_copy_insertable, __is_move_insertable): Adjust base class.
920 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
921 test for C++11/14/17 as well.
922 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
923 test.
924
925 2019-02-20 Jakub Jelinek <jakub@redhat.com>
926
927 PR libstdc++/89402
928 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
929 _GLIBCXX_PURE to the alias declaration.
930
931 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
932
933 * testsuite/21_strings/basic_string/literals/types.cc
934 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
935 * testsuite/21_strings/basic_string/literals/values.cc
936 [_GLIBCXX_USE_CHAR8_T]: Likewise.
937 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
938 potentially having different type.
939 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
940 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
941 to char.
942 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
943 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
944 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
945 string literals only using basic character set.
946 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
947 u8 literals to char.
948 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
949 Test ATOMIC_CHAR8_T_LOCK_FREE.
950 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
951 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
952 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
953 * testsuite/experimental/string_view/literals/types.cc
954 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
955 literal.
956 * testsuite/experimental/string_view/literals/values.cc
957 [_GLIBCXX_USE_CHAR8_T]: Likewise.
958
959 2019-02-19 Tom Honermann <tom@honermann.net>
960
961 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
962 from char16_32_t.cc; validates numeric_limits<char8_t>.
963 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
964 test cloned from types.cc; validates operator""s for char8_t
965 returns u8string.
966 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
967 test cloned from values.cc; validates construction and comparison
968 of u8string values.
969 * testsuite/21_strings/basic_string/requirements/
970 /explicit_instantiation/char8_t/1.cc: New test cloned from
971 char16_t/1.cc; validates explicit instantiation of
972 basic_string<char8_t>.
973 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
974 New test cloned from types.cc; validates operator""sv for char8_t
975 returns u8string_view.
976 * testsuite/21_strings/basic_string_view/literals/
977 values-char8_t.cc: New test cloned from values.cc; validates
978 construction and comparison of u8string_view values.
979 * testsuite/21_strings/basic_string_view/requirements/
980 explicit_instantiation/char8_t/1.cc: New test cloned from
981 char16_t/1.cc; validates explicit instantiation of
982 basic_string_view<char8_t>.
983 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
984 New test cloned from char16_t/65049.cc; validates that
985 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
986 * testsuite/21_strings/char_traits/requirements/char8_t/
987 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
988 that char_traits<char8_t> member typedefs are present and correct.
989 * testsuite/21_strings/char_traits/requirements/
990 explicit_instantiation/char8_t/1.cc: New test cloned from
991 char16_t/1.cc; validates explicit instantiation of
992 char_traits<char8_t>.
993 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
994 from char16_t.cc: validates
995 codecvt<char16_t, char8_t, mbstate_t>.
996 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
997 from char32_t.cc: validates
998 codecvt<char32_t, char8_t, mbstate_t>.
999 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1000 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1001 codecvt<char32_t, char8_t, std::mbstate_t>.
1002 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1003 test cloned from string.cc; validates filesystem::path construction
1004 from char8_t input.
1005 * testsuite/experimental/feat-char8_t.cc: New test; validates that
1006 the __cpp_lib_char8_t feature test macro is defined with the
1007 correct value.
1008 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1009 New test cloned from string.cc; validates filesystem::path
1010 construction from char8_t input.
1011 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1012 test cloned from types.cc; validates operator""sv for char8_t
1013 returns u8string_view.
1014 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1015 New test cloned from values.cc; validates construction and
1016 comparison of u8string_view values.
1017 * testsuite/experimental/string_view/requirements/
1018 explicit_instantiation/char8_t/1.cc: New test cloned from
1019 char16_t/1.cc; validates explicit instantiation of
1020 basic_string_view<char8_t>.
1021 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1022 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1023 enabled.
1024
1025 2019-02-19 Tom Honermann <tom@honermann.net>
1026
1027 P0482R5 char8_t: Standard library support
1028 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1029 typeinfo symbols for char8_t.
1030 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1031 (GLIBCXX_3.4.26): Add symbols for specializations of
1032 numeric_limits and codecvt that involve char8_t.
1033 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1034 * include/bits/atomic_base.h: Add atomic_char8_t.
1035 * include/bits/basic_string.h: Add std::hash<u8string> and
1036 operator""s(const char8_t*, size_t).
1037 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1038 __cpp_lib_char8_t.
1039 * include/bits/char_traits.h: Add char_traits<char8_t>.
1040 * include/bits/codecvt.h: Add
1041 codecvt<char16_t, char8_t, mbstate_t>,
1042 codecvt<char32_t, char8_t, mbstate_t>,
1043 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1044 codecvt_byname<char32_t, char8_t, mbstate_t>.
1045 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1046 recognize char8_t as an integral type.
1047 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1048 char8_t.
1049 (path::u8string): Return std::u8string when char8_t support is
1050 enabled.
1051 (path::generic_u8string): Likewise.
1052 (path::_S_convert): Handle conversion from char8_t input.
1053 (path::_S_str_convert): Likewise.
1054 * include/bits/functional_hash.h: Add hash<char8_t>.
1055 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
1056 char8_t.
1057 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
1058 for new char8_t specializations.
1059 * include/bits/localefwd.h: Add missing declarations of
1060 codecvt<char16_t, char, mbstate_t> and
1061 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
1062 codecvt<char16_t, char8_t, mbstate_t> and
1063 codecvt<char32_t, char8_t, mbstate_t>.
1064 * include/bits/postypes.h: Add u8streampos
1065 * include/bits/stringfwd.h: Add declarations of
1066 char_traits<char8_t> and u8string.
1067 * include/c_global/cstddef: Add __byte_operand<char8_t>.
1068 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1069 Recognize char8_t.
1070 (path::u8string): Return std::u8string when char8_t support is
1071 enabled.
1072 (path::generic_u8string): Likewise.
1073 (path::_S_convert): Handle conversion from char8_t input.
1074 (path::_S_str_convert): Likewise.
1075 * include/experimental/string: Add u8string.
1076 * include/experimental/string_view: Add u8string_view,
1077 hash<experimental::u8string_view>, and
1078 operator""sv(const char8_t*, size_t).
1079 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
1080 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
1081 as a character type.
1082 * include/std/limits: Add numeric_limits<char8_t>.
1083 * include/std/string_view: Add u8string_view,
1084 hash<experimental::u8string_view>, and
1085 operator""sv(const char8_t*, size_t).
1086 * include/std/type_traits: Add __is_integral_helper<char8_t>,
1087 __make_unsigned<char8_t>, and __make_signed<char8_t>.
1088 * libsupc++/atomic_lockfree_defines.h: Define
1089 ATOMIC_CHAR8_T_LOCK_FREE.
1090 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
1091 codecvt.cc and limits.cc so that char8_t specializations of
1092 numeric_limits and codecvt and emitted.
1093 * src/c++11/Makefile.in: Likewise.
1094 * src/c++11/codecvt.cc: Define members of
1095 codecvt<char16_t, char8_t, mbstate_t>,
1096 codecvt<char32_t, char8_t, mbstate_t>,
1097 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1098 codecvt_byname<char32_t, char8_t, mbstate_t>.
1099 * src/c++11/limits.cc: Define members of
1100 numeric_limits<char8_t>.
1101 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
1102 locale_init.cc and localename.cc.
1103 * src/c++98/Makefile.in: Likewise.
1104 * src/c++98/locale_init.cc: Add initialization for the
1105 codecvt<char16_t, char8_t, mbstate_t> and
1106 codecvt<char32_t, char8_t, mbstate_t> facets.
1107 * src/c++98/localename.cc: Likewise.
1108 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
1109
1110 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
1111
1112 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
1113 * 27_io/filesystem/operations/resize_file.cc: Likewise.
1114 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
1115
1116 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
1117
1118 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
1119 * doc/html/*: Regenerate.
1120
1121 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
1122 * doc/html/*: Regenerate.
1123
1124 * doc/xml/manual/intro.xml: Document LWG 2586 status.
1125 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
1126 allocator type in is_constructible checks.
1127 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
1128 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
1129 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
1130 problematic type from LWG 2586 discussion.
1131 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
1132 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1133
1134 * configure.ac: Check for C11 timespec_get function.
1135 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
1136 (openbsd): Likewise
1137 * config.h.in: Regenerate.
1138 * configure: Regenerate.
1139 * include/c_global/ctime (timespec, timespec_get): Add to namespace
1140 std for C++17 and up.
1141
1142 * doc/xml/manual/intro.xml: Document LWG 2537 status.
1143 * include/bits/stl_queue.h
1144 (priority_queue(const Compare&, const Container&, const Alloc&))
1145 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
1146 make_heap.
1147 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
1148
1149 * doc/xml/manual/intro.xml: Document LWG 2566 status.
1150 * include/bits/stl_queue.h (queue, priority_queue): Add static
1151 assertions to enforce LWG 2566 requirement on value_type.
1152 * include/bits/stl_stack.h (stack): Likewise.
1153
1154 PR middle-end/89303
1155 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
1156
1157 * doc/xml/manual/intro.xml: Document LWG 2735 status.
1158 * include/bits/std_abs.h: Add comment about LWG 2735.
1159 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
1160
1161 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
1162
1163 PR libstdc++/89345
1164 * include/std/version [__cpp_impl_destroying_delete]
1165 (__cpp_lib_destroying_delete): Only define for C++2a and later.
1166 * libsupc++/new [__cpp_impl_destroying_delete]
1167 (__cpp_lib_destroying_delete): Likewise.
1168 (destroying_delete_t, destroying_delete): Likewise, but define even
1169 when __cpp_impl_destroying_delete is not defined.
1170 * testsuite/18_support/destroying_delete.cc: New test.
1171
1172 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
1173
1174 PR libstdc++/89023
1175 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
1176 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
1177 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
1178 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
1179
1180 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
1181
1182 PR libstdc++/71044
1183 * include/bits/fs_path.h (path::has_root_name)
1184 (path::has_root_directory, path::has_root_path)
1185 (path::has_relative_path, path::has_parent_path)
1186 (path::has_filename, path::has_stem, path::has_extension)
1187 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
1188 noexcept.
1189 * src/c++17/fs_path.cc (path::has_root_name)
1190 (path::has_root_directory, path::has_root_path)
1191 (path::has_relative_path, path::has_parent_path)
1192 (path::has_filename, path::_M_find_extension): Add noexcept.
1193
1194 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
1195
1196 PR libstdc++/89102 (partial)
1197 * include/std/type_traits (common_type<>): Define.
1198 (common_type<T>): Derive from common_type<T, T>.
1199 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1200 Test zero-length template argument list.
1201 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1202 Test additional single argument cases.
1203 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1204 Adjust expected error.
1205
1206 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
1207
1208 PR libstdc++/89128
1209 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
1210 guides.
1211 * include/bits/stl_stack.h (stack): Likewise.
1212 * testsuite/23_containers/priority_queue/deduction.cc: New test.
1213 * testsuite/23_containers/queue/deduction.cc: New test.
1214 * testsuite/23_containers/stack/deduction.cc: New test.
1215
1216 PR libstdc++/89194
1217 * include/std/type_traits (__is_convertible_helper)
1218 (__is_convertible_helper<_From, _To, false>): Revert changes to
1219 support is_nothrow_convertible.
1220 (__is_nt_convertible_helper): New helper.
1221 (is_nothrow_convertible): Use __is_nt_convertible_helper.
1222
1223 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
1224 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
1225
1226 PR libstdc++/89130
1227 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
1228 __is_alloc_insertable_impl. Replace single type member with two
1229 members, one for each of copy and move insertable.
1230 (__is_move_insertable): New trait for internal use.
1231 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
1232 (vector::_S_nothrow_relocate(true_type)): New functions to
1233 conditionally check if __relocate_a can throw.
1234 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
1235 on __is_move_insertable.
1236 (vector::_S_do_relocate): New overloaded functions to conditionally
1237 call __relocate_a.
1238 (vector::_S_relocate): New function that dispatches to _S_do_relocate
1239 based on _S_use_relocate.
1240 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1241 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
1242 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
1243
1244 PR libstdc++/89090
1245 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
1246 parameter unnamed. Add message to static assertion.
1247 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1248 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
1249 in C++11 code.
1250
1251 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
1252
1253 PR libstdc++/87106
1254 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
1255 Rename...
1256 (__is_bitwise_relocatable): ... to this.
1257 (__relocate_a_1): Adapt.
1258 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
1259 (__is_bitwise_relocatable): ... to this.
1260
1261 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
1262
1263 PR libstdc++/89117
1264 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
1265 final component as well as from _M_pathname. Append the dot using
1266 operator+= instead of only to _M_pathname.
1267 (path::_M_find_extension): Reformat slightly.
1268 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1269 Add more test cases.
1270
1271 2019-01-30 Ulrich Drepper <drepper@redhat.com>
1272
1273 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
1274
1275 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
1276
1277 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
1278 constexpr specifiers from arg and proj.
1279
1280 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
1281 __shared_ptr instantiations used by gcc4-compatible ABI.
1282
1283 * include/experimental/forward_list (experimental::erase): Qualify
1284 call to erase_if.
1285 * include/experimental/list (experimental::erase): Likewise.
1286 * include/std/forward_list (std::erase): Likewise.
1287 * include/std/list (std::erase): Likewise.
1288
1289 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
1290 C++2a.
1291 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
1292 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
1293 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
1294 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
1295 * testsuite/ext/array_allocator/26875.cc: Likewise.
1296 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
1297 * testsuite/util/replacement_memory_operators.h: Likewise.
1298 * testsuite/util/testsuite_allocator.h: Likewise.
1299
1300 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
1301 normal mode vector, even for debug mode.
1302 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
1303 Define alias template for normal mode vector.
1304
1305 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
1306
1307 PR libstdc++/68737
1308 * config/locale/generic/c_locale.h (__convert_from_v)
1309 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1310 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1311 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
1312 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1313
1314 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
1315
1316 PR libstdc++/88840
1317 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
1318 data member with static member function _S_use_relocate().
1319 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1320 (vector::_M_default_append): Use _S_use_relocate() instead of
1321 __use_relocate.
1322
1323 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
1324 sign of results.
1325
1326 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
1327
1328 PR libstdc++/88740
1329 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
1330 write to stderr instead of using printf.
1331
1332 2019-01-21 Jakub Jelinek <jakub@redhat.com>
1333
1334 PR libstdc++/86590
1335 * include/bits/char_traits.h (__constant_string_p,
1336 __constant_char_array_p): Use __builtin_is_constant_evaluated if
1337 available.
1338
1339 2019-01-20 Ulrich Drepper <drepper@redhat.com>
1340
1341 Implement C++20 P0600r1.
1342 * include/backward/hash_map: Add nodiscard attribute to empty.
1343 * include/backward/hash_set: Likewise.
1344 * backward/hashtable.h: Likewise.
1345 * include/bits/basic_string.h: Likewise.
1346 * include/bits/forward_list.h: Likewise.
1347 * include/bits/hashtable.h: Likewise.
1348 * include/bits/regex.h: Likewise.
1349 * include/bits/stl_deque.h: Likewise.
1350 * include/bits/stl_list.h: Likewise.
1351 * include/bits/stl_map.h: Likewise.
1352 * include/bits/stl_multimap.h: Likewise.
1353 * include/bits/stl_multiset.h: Likewise.
1354 * include/bits/stl_queue.h: Likewise.
1355 * include/bits/stl_set.h: Likewise.
1356 * include/bits/stl_stack.h: Likewise.
1357 * include/bits/stl_tree.h: Likewise.
1358 * include/bits/stl_vector.h: Likewise.
1359 * include/bits/unordered_map.h: Likewise.
1360 * include/bits/unordered_set.h: Likewise.
1361 * include/debug/array: Likewise.
1362 * include/experimental/any: Likewise.
1363 * include/experimental/bits/fs_path.h: Likewise.
1364 * include/experimental/internet: Likewise.
1365 * include/experimental/string_view: Likewise.
1366 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
1367 Likewise.
1368 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
1369 Likewise.
1370 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
1371 Likewise.
1372 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
1373 Likewise.
1374 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
1375 Likewise.
1376 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
1377 Likewise.
1378 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
1379 Likewise.
1380 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
1381 Likewise.
1382 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1383 info_fn_imps.hpp: Likewise.
1384 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1385 left_child_next_sibling_heap_.hpp: Likewise.
1386 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
1387 Likewise.
1388 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
1389 Likewise.
1390 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
1391 Likewise.
1392 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
1393 Likewise.
1394 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
1395 Likewise.
1396 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
1397 Likewise.
1398 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
1399 Likewise.
1400 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
1401 * include/ext/pb_ds/trie_policy.hpp: Likewise.
1402 * include/ext/rope: Likewise.
1403 * include/ext/slist: Likewise.
1404 * include/ext/vstring.h: Likewise.
1405 * include/profile/array: Likewise.
1406 * include/std/array: Likewise.
1407 * include/tr1/array: Likewise.
1408 * include/tr1/hashtable.h: Likewise.
1409 * include/tr1/regex: Likewise.
1410 * include/tr2/dynamic_bitset: Likewise.
1411 * include/bits/alloc_traits.h: Add nodiscard attribute to
1412 allocate.
1413 * include/experimental/memory_resource: Likewise.
1414 * include/ext/alloc_traits.h: Likewise.
1415 * include/ext/array_allocator.h: Likewise.
1416 * include/ext/bitmap_allocator.h: Likewise.
1417 * include/ext/debug_allocator.h: Likewise.
1418 * include/ext/extptr_allocator.h: Likewise.
1419 * include/ext/mt_allocator.h: Likewise.
1420 * include/ext/new_allocator.h: Likewise.
1421 * include/ext/pool_allocator.h: Likewise.
1422 * include/ext/throw_allocator.h: Likewise.
1423 * include/std/scoped_allocator: Likewise.
1424 * libsupc++/eh_alloc.cc: Likewise.
1425 * include/std/future: Add nodiscard attribute to async.
1426 * libsupc++/new: Add nodiscard attribute to new.
1427
1428 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
1429
1430 PR libstdc++/87514
1431 PR libstdc++/87520
1432 PR libstdc++/88782
1433 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
1434 * include/bits/shared_ptr.h
1435 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
1436 (allocate_shared): Change to use new tag type.
1437 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
1438 Declare new member function.
1439 (_Sp_alloc_shared_tag): Define new type.
1440 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
1441 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
1442 _Sp_make_shared_tag::_S_eq to check type_info.
1443 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
1444 Constrain to prevent being called with _Sp_alloc_shared_tag.
1445 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
1446 Replace constructor with ...
1447 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
1448 reference parameter so address of the new object can be returned to
1449 the caller. Obtain the allocator from the tag type.
1450 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
1451 constructor with ...
1452 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
1453 to the __shared_count constructor.
1454 (__allocate_shared): Change to use new tag type.
1455 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
1456
1457 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
1458
1459 * src/c++17/fs_ops.cc
1460 (equivalent(const path&, const path&, error_code&))
1461 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
1462 compare files instead of relying on incomplete info returned by stat.
1463
1464 PR libstdc++/88884
1465 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
1466 if the path is already absolute.
1467 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
1468 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
1469
1470 PR libstdc++/88881
1471 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
1472 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
1473 of filesystem::exists.
1474 (create_directories(const path&, error_code&)): Add assertions.
1475 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1476 Add workaround for bug in _wstat for paths with trailing slash.
1477 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
1478 for expected behaviour on mingw.
1479 * testsuite/experimental/filesystem/operations/create_directories.cc:
1480 Likewise.
1481 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
1482 "TMP" instead of "TMPDIR" and clean environment before each test. Do
1483 not test permissions on mingw targets.
1484
1485 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
1486
1487 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
1488 constructors and open members taking wide strings. Fix patterns for
1489 filesystem::path members to match wstring_view parameters. Add
1490 exports for shared_ptr members used by directory iterators.
1491 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
1492 error code parameter if the file doesn't exist.
1493 * src/filesystem/ops.cc (remove(const path&, error_code&)):
1494 Likewise.
1495 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
1496 values for mingw targets, where "/" is not an absolute path. Do not
1497 test symlinks on mingw targets.
1498 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1499 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
1500 on mingw targets.
1501 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1502 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
1503 that each component of the path is created.
1504 * testsuite/experimental/filesystem/operations/create_directories.cc:
1505 Likewise.
1506 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
1507 permissions on mingw targets.
1508 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1509 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1510 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1511 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
1512 mingw targets.
1513 * testsuite/experimental/filesystem/operations/permissions.cc:
1514 Likewise.
1515 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
1516 symlinks or permissions on mingw targets.
1517 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1518 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
1519 symlinks on mingw targets.
1520 * testsuite/experimental/filesystem/operations/remove_all.cc:
1521 Likewise.
1522 * testsuite/27_io/filesystem/operations/status.cc: Do not test
1523 permissions on mingw targets.
1524 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
1525 test symlinks on mingw targets.
1526 * testsuite/experimental/filesystem/operations/space.cc: Fix test
1527 for mingw targets.
1528
1529 2019-02-14 Ulrich Drepper <drepper@redhat.com>
1530
1531 PR libstdc++/88738
1532 Warn about unused comparisons of shared_ptr/unique_ptr
1533 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
1534 * include/bits/shared_ptr.h: Use it for operator ==, !=,
1535 <, <=, >, >= for shared_ptr.
1536 * include/bits/unique_ptr.h: Likewise for unique_ptr.
1537
1538 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
1539
1540 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
1541 as 201611L, because P0497R0 changes are supported.
1542 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
1543
1544 * include/bits/erase_if.h [__cplusplus > 201703L]
1545 (__cpp_lib_erase_if): Only define for C++2a.
1546 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1547 (__cpp_lib_null_iterators): Define.
1548 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1549 (__cpp_lib_null_iterators): Define.
1550 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
1551
1552 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
1553 status.
1554 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
1555 Define.
1556 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
1557 changes are supported.
1558 * include/std/optional (__cpp_lib_optional): Likewise.
1559 * include/std/variant (__cpp_lib_variant): Likewise.
1560 * include/std/version [!__STRICT_ANSI__]
1561 (__cpp_lib_uncaught_exceptions): Define as long integer.
1562 [__cplusplus >= 201703L] (__cpp_lib_any)
1563 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
1564 (__cpp_lib_variant): Define for C++17.
1565 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
1566 as long integer.
1567 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
1568 integer.
1569
1570 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
1571
1572 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
1573
1574 PR libstdc++/88811
1575 PR libstdc++/83306
1576 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
1577 before second path.
1578 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
1579 test.
1580
1581 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
1582
1583 * doc/xml/manual/intro.xml: Include new section.
1584 * doc/xml/manual/status_cxx2017.xml: Document more
1585 implementation-defined properties of the library.
1586 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
1587 * doc/html/*: Regenerate.
1588
1589 * include/bits/refwrap.h [__cplusplus > 201703L]
1590 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
1591 (_Reference_wrapper_base_memfun): Do not define for C++2a.
1592 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
1593 for C++2a.
1594 (reference_wrapper::operator()): Add static assertion.
1595 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
1596
1597 * include/std/chrono (duration_values::zero(), duration_values::min())
1598 (duration_values::max()): Add noexcept.
1599 (duration::zero(), duration::min(), duration::max()): Likewise.
1600 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
1601 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
1602 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
1603
1604 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
1605
1606 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1607
1608 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
1609 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
1610
1611 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
1612
1613 PR libstdc++/88802
1614 * include/bits/functional_hash.h (hash<nullptr_t>): Define
1615 specialization for C++17 (P0513R0, LWG 2817).
1616 * testsuite/20_util/hash/nullptr.cc: New test.
1617
1618 PR libstdc++/88125
1619 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
1620 pattern for std::basic_stringbuf::str().
1621
1622 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
1623 basic_ostream::operator<< patterns.
1624
1625 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
1626
1627 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
1628 test failures on targets with 32-bit time_t.
1629
1630 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
1631 * include/std/deque: Likewise.
1632 * include/std/forward_list: Likewise.
1633 * include/std/list: Likewise.
1634 * include/std/string: Likewise.
1635 * include/std/vector: Likewise.
1636 * include/std/version: Likewise.
1637 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
1638 * testsuite/23_containers/deque/erasure.cc: Likewise.
1639 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
1640 * testsuite/23_containers/list/erasure.cc: Likewise.
1641 * testsuite/23_containers/map/erasure.cc: Likewise.
1642 * testsuite/23_containers/set/erasure.cc: Likewise.
1643 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1644 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
1645 * testsuite/23_containers/vector/erasure.cc: Likewise.
1646
1647 * include/experimental/internet [AI_NUMERICSERV]
1648 (resolver_base::numeric_service): Define conditionally.
1649 * testsuite/experimental/net/internet/resolver/base.cc: Test it
1650 conditionally.
1651 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1652 Likewise.
1653
1654 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1655 Jonathan Wakely <jwakely@redhat.com>
1656
1657 Implement LWG 2221
1658 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
1659 (GLIBCXX_3.4.26): Add new exports.
1660 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
1661 correct list of sources.
1662 * include/Makefile.in: Regenerate.
1663 * include/std/ostream (operator<<(nullptr_t)): New member function.
1664 * src/c++17/ostream-inst.cc: New file.
1665 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
1666 test.
1667
1668 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
1669
1670 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
1671 of the source file containing the caller.
1672 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
1673 directories created by test.
1674 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1675 Likewise.
1676 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1677 Likewise.
1678 * testsuite/experimental/filesystem/iterators/
1679 recursive_directory_iterator.cc: Likewise.
1680
1681 2019-01-10 Jakub Jelinek <jakub@redhat.com>
1682
1683 PR tree-optimization/88775
1684 * include/bits/stl_function.h (greater<_Tp*>::operator(),
1685 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
1686 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
1687 instead of __builtin_constant_p if available. Don't bother with
1688 the pointer comparison in C++11 and earlier.
1689
1690 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1691
1692 PR other/16615
1693
1694 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
1695 with "cannot".
1696
1697 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
1698
1699 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
1700 for filesystem::path. Give variables more distinctive names.
1701
1702 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
1703 member function to perform non-trivial assignment.
1704 (_Optional_payload_base::_M_move_assign): Likewise.
1705 (_Optional_payload<T, true, false, true>::operator=)
1706 (_Optional_payload<T, true, true, false>::operator=)
1707 (_Optional_payload<T, true, false, false>::operator=): Call
1708 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
1709
1710 PR libstdc++/88204
1711 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
1712 test std::complex<long double> if long double format is IBM128.
1713 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
1714 Likewise.
1715
1716 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
1717
1718 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
1719 for old std::unique_ptr layout.
1720 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
1721 to become valueless. Add filesystem::path tests.
1722
1723 PR libstdc++/87855
1724 * include/std/optional (_Optional_payload_base): New class template
1725 for common code hoisted from _Optional_payload specializations. Use
1726 a template for the union, to allow a partial specialization for
1727 types with non-trivial destructors. Add constructors for in-place
1728 initialization to the union.
1729 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
1730 to perform non-trivial copy construction, instead of relying on
1731 non-standard copy elision in a delegating constructor.
1732 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
1733 non-trivial move construction.
1734 (_Optional_payload): Derive from _Optional_payload_base and use it
1735 for everything except the non-trivial assignment operators, which are
1736 defined as needed.
1737 (_Optional_payload<false, C, M>): Derive from the specialization
1738 _Optional_payload<true, false, false> and add a destructor.
1739 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
1740 Forward to corresponding members of _Optional_payload.
1741 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
1742 Hoist common members from _Optional_base.
1743 (_Optional_base): Make all members and base class public.
1744 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
1745 _Optional_base_impl.
1746 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
1747 support for new std::optional layout.
1748 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
1749
1750 PR libstdc++/88066
1751 * include/bits/locale_conv.h: Use <> for includes not "".
1752 * include/ext/random: Likewise.
1753 * include/ext/vstring.h: Likewise.
1754
1755 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1756
1757 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
1758 (GLIBCXX_3.4.21): Likewise.
1759
1760 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
1761
1762 PR libstdc++/88749
1763 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
1764 to match the one that controls whether utimbuf and utime are declared.
1765
1766 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
1767
1768 PR libstdc++/87787
1769 * include/bits/char_traits.h (char_traits::move): Do not pass null
1770 pointers to memmove.
1771 * include/bits/locale_facets.h
1772 (ctype<char>::widen(const char*, const char*, char*)): Do not
1773 pass null pointers to memcpy.
1774 (ctype<char>::narrow(const char*, const char*, char, char*)):
1775 Likewise.
1776 (ctype<char>::do_widen(const char*, const char*, char*)):
1777 Likewise.
1778 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
1779 Likewise.
1780
1781 * doc/xml/manual/spine.xml: Update copyright years.
1782 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
1783 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
1784 for C++17 filesystem library.
1785 * doc/html/*: Regenerate.
1786
1787 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
1788 * config.h.in: Regenerate.
1789 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
1790 alphabetically and add missing entries for copy_symlink,
1791 hard_link_count, rename, and resize_file.
1792 * configure: Regenerate.
1793 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
1794 used unconditionally.
1795 * src/filesystem/ops-common.h (__gnu_posix::truncate)
1796 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
1797 supports truncating to zero length.
1798 * testsuite/27_io/filesystem/operations/all.cc: New test.
1799 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
1800
1801 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
1802
1803 PR libstdc++/86756
1804 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
1805 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
1806 * config.h.in: Regenerate.
1807 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
1808 remaining std::filesystem types and functions.
1809 * configure: Regenerate.
1810 * src/c++17/Makefile.am: Add C++17 filesystem sources.
1811 * src/c++17/Makefile.in: Regenerate.
1812 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
1813 here, and change name of included file.
1814 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
1815 here, and change name of included file.
1816 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
1817 path to dir-common.h.
1818 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
1819 path to ops-common.h. Disable -Wunused-parameter warnings.
1820 (internal_file_clock): Define unconditionally.
1821 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
1822 define.
1823 (do_copy_file, do_space): Move definitions to ops.common.h.
1824 (copy, file_size, hard_link_count, last_write_time, space): Only
1825 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
1826 report an error.
1827 (last_write_time, read_symlink): Remove unused attributes from
1828 parameters.
1829 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
1830 * src/filesystem/Makefile.in: Regenerate.
1831 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
1832 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
1833 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
1834 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
1835 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
1836 dummy types and functions instead of using #error.
1837 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
1838 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
1839 in terms of stat.
1840 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
1841 (do_copy_file, do_space): Move definitions here from std-ops.cc.
1842 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
1843 to account for new namespace.
1844 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
1845 -lstdc++fs from dg-options.
1846 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
1847 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
1848 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
1849 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
1850 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
1851 Likewise.
1852 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
1853 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1854 Likewise.
1855 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
1856 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
1857 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
1858 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1859 * testsuite/27_io/filesystem/operations/create_directories.cc:
1860 Likewise.
1861 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
1862 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
1863 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
1864 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
1865 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
1866 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
1867 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1868 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
1869 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
1870 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
1871 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
1872 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
1873 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
1874 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
1875 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
1876 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1877 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1878 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1879 Likewise.
1880 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
1881
1882
1883 PR libstdc++/86756
1884 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
1885 typeinfo and vtables less greedy.
1886 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
1887 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
1888 * src/c++17/Makefile.in: Regenerate.
1889 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
1890 here, and change name of included file.
1891 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
1892 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
1893 from sources.
1894 * src/filesystem/Makefile.in: Regenerate.
1895 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
1896 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
1897 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
1898 from dg-options and remove dg-require-filesystem-ts.
1899 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
1900 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
1901 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
1902 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
1903 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1904 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
1905 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
1906 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
1907 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
1908 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
1909 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
1910 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
1911 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
1912 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
1913 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
1914 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
1915 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
1916 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
1917 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
1918 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
1919 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
1920 Likewise.
1921 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
1922 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
1923 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
1924 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
1925 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
1926 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
1927 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
1928 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
1929 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
1930 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
1931 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
1932 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
1933 Likewise.
1934 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
1935 Likewise.
1936 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1937 Likewise.
1938 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
1939 Likewise.
1940 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
1941 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1942 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
1943 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
1944 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1945 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1946 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1947 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1948 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
1949 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1950 Likewise.
1951 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1952 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1953 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1954 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
1955 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1956
1957 PR libstdc++/87431
1958 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
1959 Check is_trivially_copyable instead of is_scalar.
1960 (variant::emplace<N, Args>(Args&&...)): If construction of the new
1961 contained value can throw and its type is trivially copyable then
1962 construct into a temporary variant and move from it, to provide the
1963 strong exception safety guarantee.
1964 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
1965 Likewise.
1966 * testsuite/20_util/variant/87431.cc: New test.
1967 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
1968 conversion causes valueless state.
1969
1970 PR libstdc++/88607
1971 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
1972 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
1973 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
1974 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
1975 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
1976
1977 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
1978
1979 * include/bits/fs_fwd.h (__file_clock): Define new clock.
1980 (file_time_type): Redefine in terms of __file_clock.
1981 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
1982 overflow.
1983 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
1984 internal linkage.
1985 (internal_file_lock): New helper type for accessing __file_clock.
1986 (do_copy_file): Use internal_file_lock to convert system time to
1987 file_time_type.
1988 (last_write_time(const path&, error_code&)): Likewise.
1989 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
1990
1991 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
1992
1993 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
1994 for const member functions of std::basic_string.
1995 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
1996 in C++17.
1997 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
1998 Make non-standard constructor private.
1999 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2000 Likewise.
2001 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2002 explicit instantiations for C++17 as well as earlier dialects.
2003 * src/c++17/Makefile.am: Add new source files.
2004 * src/c++17/Makefile.in: Regenerate.
2005 * src/c++17/cow-string-inst.cc: New file defining explicit
2006 instantiations for basic_string member functions added in C++17.
2007 * src/c++17/string-inst.cc: Likewise.
2008
2009 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2010 copy/move constructors for old std::basic_string.
2011 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2012 (basic_string::reference, basic_string::const_reference): Define
2013 as plain references for C++11 and later.
2014 (basic_string::basic_string()): Put constructor body outside
2015 preprocessor conditional groups.
2016 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2017 instead of copying it.
2018 (basic_string::basic_string(const basic_string&, const _Alloc&)):
2019 Define.
2020 (basic_string::basic_string(basic_string&&, const _Alloc&)):
2021 Define.
2022 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2023 cases for old basic_string.
2024 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2025 allocator-extended constructors unconditionally. Add extra members to
2026 allocator type when using old string ABI.
2027 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2028 for old string ABI.
2029 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2030
2031 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2032 -fno-inline added to test flags.
2033
2034 * testsuite/21_strings/basic_string/requirements/
2035 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2036
2037 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2038 assertion failures with old std::string ABI.
2039
2040 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2041 with ...
2042 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2043 functions that will only erase elements at the end.
2044 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2045 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2046 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2047 of erase(p, end()).
2048 (path::_List::pop_back()): Define.
2049 (path::_List::_M_erase_from(const_iterator)): Define.
2050 (path::operator/=(const path&)): Use pop_back to remove last component
2051 and _M_erase_from to remove multiple components.
2052 (path::_M_append(basic_string_view<value_type>)): Likewise.
2053 (path::operator+=(const path&)): Likewise.
2054 (path::_M_concat(basic_string_view<value_type>)): Likewise.
2055 (path::remove_filename()): Likewise.
2056 (path::lexically_normal()): Use _List::_Impl iterators instead of
2057 path::iterator. Use pop_back to remove components from the end. Clear
2058 trailing filename, instead of using erase(const_iterator) to remove
2059 a non-final component.
2060 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
2061 additional cases.
2062 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
2063
2064 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
2065 incorrect treatment of empty filename after trailing slash.
2066 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
2067
2068 * testsuite/21_strings/basic_string/modifiers/assign/char/
2069 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
2070 to test flags.
2071 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2072 move_assign_optim.cc: Likewise.
2073
2074 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2075 Jakub Jelinek <jakub@redhat.com>
2076
2077 PR libstdc++/88607
2078 * include/experimental/memory: Replace UTF-8 quote characters.
2079 * include/std/future: Replace UTF-8 "em dash" characters.
2080
2081 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
2082
2083 PR libstdc++/88607
2084 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
2085 * include/debug/forward_list: Likewise.
2086 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
2087 character.
2088 * include/experimental/chrono: Likewise.
2089 * include/experimental/functional: Likewise.
2090 * include/experimental/ratio: Likewise.
2091 * include/experimental/system_error: Likewise.
2092 * include/experimental/tuple: Likewise.
2093 * include/experimental/type_traits: Likewise.
2094 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
2095 * include/parallel/multiseq_selection.h: Likewise.
2096
2097 PR libstdc++/88681
2098 * config/abi/pre/gnu.ver: Add missing exports.
2099 * testsuite/22_locale/collate_byname/88681.cc: New test.
2100 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
2101 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2102
2103 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
2104
2105 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
2106 initializer_list<value_type> and from input iterator ranges.
2107 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2108
2109 * testsuite/experimental/string_view/element_access/char/empty.cc:
2110 Fix year range in copyright header.
2111
2112 2019-01-02 Joel Brobecker <brobecker@adacore.com>
2113
2114 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2115 Fix year range in copyright header.
2116
2117 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2118
2119 Update copyright years.
2120 \f
2121 Copyright (C) 2019 Free Software Foundation, Inc.
2122
2123 Copying and distribution of this file, with or without modification,
2124 are permitted in any medium without royalty provided the copyright
2125 notice and this notice are preserved.