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