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