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