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