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