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