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