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