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