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