1 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
3 * include/debug/array: Remove.
4 * include/Makefile.am: Remove <debug/array>.
5 * include/Makefile.in: Regenerate.
6 * include/experimental/functional: Adapt.
7 * include/std/array: Move to _GLIBCXX_INLINE_VERSION namespace.
8 * include/std/functional: Adapt.
9 * include/std/span: Adapt.
10 * testsuite/23_containers/array/debug/back1_neg.cc:
11 Remove dg-require-debug-mode. Add -D_GLIBCXX_ASSERTIONS option.
12 * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
13 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
14 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
15 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
17 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
19 * testsuite/23_containers/array/element_access/60497.cc
20 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
22 * testsuite/23_containers/array/tuple_interface/get_neg.cc
23 * testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc
24 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
26 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
28 * include/debug/assertions.h (__glibcxx_requires_non_empty_range):
29 Remove __builtin_expect.
30 (__glibcxx_requires_subscript): Likewise.
31 (__glibcxx_requires_nonempty): Likewise.
32 * include/debug/formatter.h (__check_singular): Add C++11 constexpr
34 * include/debug/helper_functions.h (__check_singular): Likewise. Skip
35 check if constant evaluated.
36 (__valid_range): Do not skip check if constant evaluated.
37 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_COND_AT): Add
39 (_GLIBCXX_DEBUG_VERIFY_AT_F): Use __glibcxx_assert_1.
40 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
42 * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc: New test.
43 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc: New test.
44 * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
46 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
48 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
50 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc: New test.
51 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc: New test.
52 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
54 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: New test.
55 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
56 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: New test.
57 * testsuite/25_algorithms/lower_bound/debug/partitioned_neg.cc: New test.
58 * testsuite/25_algorithms/lower_bound/debug/partitioned_pred_neg.cc: New test.
59 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: New test.
60 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
61 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: New test.
62 * testsuite/25_algorithms/upper_bound/debug/partitioned_neg.cc: New test.
63 * testsuite/25_algorithms/upper_bound/debug/partitioned_pred_neg.cc: New test.
65 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
67 * include/bits/uniform_int_dist.h (__detail::_Power_of_2):
68 Document that true result for zero is intentional.
70 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
72 * include/std/bit (__popcount): Remove redundant check for zero.
74 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
77 * libsupc++/exception_ptr.h (exception_ptr::exception_ptr())
78 (exception_ptr::exception_ptr(const exception_ptr&))
79 (exception_ptr::~exception_ptr()): Remove 'always_inline'
80 attributes. Use 'inline' unconditionally.
82 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
85 * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
87 2020-11-07 Liu Hao <lh_mouse@126.com>
89 * libsupc++/cxxabi.h: (__cxa_atexit): mark with _GLIBCXX_CDTOR_CALLABI
90 (__cxa_thread_atexit): ditto
91 * libsupc++/atexit_thread.cc: (__cxa_atexit): mark with
92 _GLIBCXX_CDTOR_CALLABI
93 (__cxa_thread_atexit): ditto
96 2020-11-06 Jonathan Wakely <jwakely@redhat.com>
98 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
99 for basic_stringbuf that refer to __xfer_bufptrs.
101 2020-11-05 Marek Polacek <polacek@redhat.com>
104 * testsuite/20_util/reference_wrapper/lwg2993.cc: Add a dg-warning.
105 * testsuite/25_algorithms/generate_n/87982_neg.cc: Likewise.
107 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
110 * include/std/optional (operator==, operator!=, operator<)
111 (operator>, operator<=, operator>=): Fix types used in
113 * testsuite/20_util/optional/relops/96269.cc: New test.
115 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
118 * src/filesystem/dir.cc (recursive_directory_iterator): Call the
119 right overload of _Dir::advance.
120 * testsuite/experimental/filesystem/iterators/97731.cc: New test.
122 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
125 * include/std/future (__basic_future::_M_get_result): Use
126 nullptr for null pointer constant.
127 * libsupc++/eh_ptr.cc (operator==, operator!=): Remove
129 * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define
130 macro to conditionally add __attribute__((__used__)).
131 (operator==, operator!=, exception_ptr::exception_ptr())
132 (exception_ptr::exception_ptr(const exception_ptr&))
133 (exception_ptr::~exception_ptr())
134 (exception_ptr::operator=(const exception_ptr&))
135 (exception_ptr::swap(exception_ptr&)): Always define as
136 inline. Add macro to be conditionally "used".
138 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
141 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports.
142 * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate
143 private constructor taking __xfer_bufptrs.
145 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
147 * include/std/sstream (basic_stringbuf(const allocator_type&):
149 (basic_stringbuf(const basic_string<C,T,SA>&, openmode, const A&)):
150 Call _M_stringbuf_init. Construct _M_string from pointer and length
151 to avoid constraint checks for string view.
152 (basic_stringbuf::view()): Make __sv_type alias local to the
154 (basic_istringstream(const basic_string<C,T,SA>&, openmode, const A&)):
155 Pass string to _M_streambuf instead of constructing a temporary
156 with the wrong allocator.
157 (basic_ostringstream(const basic_string<C,T,SA>&, openmode, const A&)):
159 (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)):
161 * src/c++20/sstream-inst.cc: Use string_view and wstring_view
162 typedefs in explicit instantiations.
163 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Add more
164 tests for constructors.
165 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
166 * testsuite/27_io/basic_stringbuf/cons/char/1.cc: Likewise.
167 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
168 * testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.
169 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
170 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
172 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
174 * include/std/sstream: Adjust whitespace.
176 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
179 * include/std/sstream (basic_stringstream(string_type&&, openmode)):
180 Fix default argument.
181 * testsuite/27_io/basic_stringstream/cons/char/97719.cc: New test.
183 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
185 * testsuite/18_support/96817.cc: Fail fast if the library is
186 configured to not use futexes.
188 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
191 * include/bits/stl_algo.h (search(FIter, FIter, const Searcher):
192 Adjust #if condition.
193 * include/parallel/algo.h (search(FIter, FIter, const Searcher&):
194 Define new overload for C++17.
196 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
199 * doc/xml/manual/evolution.xml: Document change to base class.
200 * doc/html/manual/api.html: Regenerate.
202 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
204 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
205 Use qualified-id to refer to static member functions.
207 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
209 * include/std/syncstream: Include <bits/std_mutex.h>
212 2020-11-03 François Dumont <fdumont@gcc.gnu.org>
214 * config/abi/pre/gnu-versioned-namespace.ver:
215 Add __istream_extract and _Safe_local_iterator_base::_M_attach_single
218 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
220 * src/c++11/mutex.cc [_GLIBCXX_HAVE_TLS] (__once_proxy): Define
221 separately for TLS targets.
222 [!_GLIBCXX_HAVE_TLS] (__get_once_functor_lock_ptr): Replace with ...
223 (set_lock_ptr): ... this. Set new value and return previous
225 [!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
227 [!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
229 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
234 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add new symbols.
235 * include/std/mutex [!_GLIBCXX_HAS_GTHREADS] (once_flag): Define
236 even when gthreads is not supported.
237 (once_flag::_M_once) [_GLIBCXX_HAVE_LINUX_FUTEX]: Change type
238 from __gthread_once_t to int.
239 (once_flag::_M_passive(), once_flag::_M_activate())
240 (once_flag::_M_finish(bool), once_flag::_Active_execution):
241 Define new members for futex and non-threaded implementation.
242 [_GLIBCXX_HAS_GTHREADS] (once_flag::_Prepare_execution): New
244 (call_once): Use new members of once_flag.
245 * src/c++11/mutex.cc (std::once_flag::_M_activate): Define.
246 (std::once_flag::_M_finish): Define.
247 * testsuite/30_threads/call_once/39909.cc: Do not require
249 * testsuite/30_threads/call_once/49668.cc: Likewise.
250 * testsuite/30_threads/call_once/60497.cc: Likewise.
251 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
252 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
253 * testsuite/30_threads/call_once/once_flag.cc: Add test for
254 constexpr constructor.
255 * testsuite/30_threads/call_once/66146.cc: New test.
256 * testsuite/30_threads/call_once/constexpr.cc: Removed.
257 * testsuite/30_threads/once_flag/cons/constexpr.cc: Removed.
259 2020-11-03 Jonathan Yong <10walls@gmail.com>
261 * src/Makefile.am (libstdc___la_LINK): Add lt_host_flags.
262 * src/Makefile.in: Regenerate.
264 2020-11-02 Thomas Rodgers <trodgers@redhat.com>
266 * doc/doxygen/user.cfg.in (INPUT): Add new header.
267 * include/Makefile.am (std_headers): Add new header.
268 * include/Makefile.in: Regenerate.
269 * include/precompiled/stdc++.h: Include new header.
270 * include/std/syncstream: New header.
271 * include/std/version: Add __cpp_lib_syncbuf.
272 * testsuite/27_io/basic_syncbuf/1.cc: New test.
273 * testsuite/27_io/basic_syncbuf/2.cc: Likewise.
274 * testsuite/27_io/basic_syncbuf/basic_ops/1.cc:
276 * testsuite/27_io/basic_syncbuf/requirements/types.cc:
278 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
280 * testsuite/27_io/basic_syncstream/1.cc: Likewise.
281 * testsuite/27_io/basic_syncstream/2.cc: Likewise.
282 * testsuite/27_io/basic_syncstream/basic_ops/1.cc:
284 * testsuite/27_io/basic_syncstream/requirements/types.cc:
287 2020-11-01 Jonathan Wakely <jwakely@redhat.com>
289 * include/std/type_traits (is_integral<wchar_t>)
290 (make_unsigned<wchar_t>, make_signed<wchar_t>): Define based
291 on #ifdef __WCHAR_TYPE__ instead of _GLIBCXX_USE_WCHAR_T.
292 * include/bits/cpp_type_traits.h (__is_integer<wchar_t>)
293 (__is_char<wchar_t>): Likewise.
295 2020-10-31 François Dumont <fdumont@gcc.gnu.org>
297 * src/c++17/floating_from_chars.cc (_GLIBCXX_USE_CX11_ABI): Add define.
298 (buffering_string): New.
299 [!_GLIBCXX_USE_CXX11_ABI](reserve_string): New.
301 * src/c++20/sstream-inst.cc: Limit instantiations to
302 _GLIBCXX_USE_CXX11_ABI.
304 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
306 * include/bits/random.h (independent_bit_engine): Fix typo
308 (shuffle_order_engine): Fix incorrect description in comment.
309 * include/bits/random.tcc (__representable_as_double
310 (__p1_representable_as_double): New helper functions.
311 (shuffle_order_engine::operator()): Use double for calculation
312 if (max() - min() + 1) is representable as double.
313 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
316 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
319 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
320 (_Power2_rehash_policy): Use ceil and floor instead of ceill and
322 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy): Likewise.
323 Use double instead of long double.
325 2020-10-31 Patrick Palka <ppalka@redhat.com>
328 * include/std/ranges (basic_istream_view::begin): Initialize
329 _Iterator from 'this' instead of '*this'.
330 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
332 (filter_view::_Iterator::_Iterator): Take a filter_view*
333 argument instead of a filter_view& argument.
334 (filter_view::_Sentinel::_Sentinel): Likewise.
335 (filter_view::begin): Initialize _Iterator from 'this' instead
337 (filter_view::end): Likewise.
338 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
340 (filter_view::_Iterator::operator+): Adjust accordingly.
341 (filter_view::_Iterator::operator-): Likewise.
342 (filter_view::begin): Initialize _Iterator from 'this' instead
344 (filter_view::end): Likewise.
345 (join_view::_Iterator): Take a _Parent* instead of a _Parent&.
346 (join_view::_Sentinel): Likewise.
347 (join_view::begin): Initialize _Iterator from 'this' instead of
349 (join_view::end): Initialize _Sentinel from 'this' instead of
351 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
352 (split_view::begin): Initialize _OuterIter from 'this' instead
354 (split_view::end): Likewise.
355 * testsuite/std/ranges/97600.cc: New test.
357 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
359 * include/std/ranges (enable_borrowed_view<take_view<T>>)
360 (enable_borrowed_view<drop_view<T>>)
361 (enable_borrowed_view<drop_while_view<T>>)
362 (enable_borrowed_view<reverse_view<T>>)
363 (enable_borrowed_view<common_view<T>>)
364 (enable_borrowed_view<elements_view<T>>): Add partial
365 specializations as per P2017R1.
366 * testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
369 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
372 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
373 (_Power2_rehash_policy): Use double instead of long double.
375 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
377 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
378 Avoid -Wcatch-value warnings.
380 2020-10-30 Patrick Palka <ppalka@redhat.com>
382 * include/std/ranges (__detail::__box): For the partial
383 specialization used by types that are already semiregular,
384 make the default constructor value-initialize the underlying
385 object instead of default-initializing it. Make its in place
386 constructor explicit.
387 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
390 2020-10-30 David Edelsohn <dje.gcc@gmail.com>
392 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: XFAIL on AIX.
394 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
396 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
397 for old <sstream> symbols some more.
399 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
401 * include/bits/ranges_util.h (subrange::subrange(R&&)): Use
402 direct-initialization instead of list-initialization, so a
403 potential narrowing conversion from ranges::size(r) to the
404 stored size isn't ill-formed.
406 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
408 * include/bits/parse_numbers.h (_Select_int_base): Avoid
409 narrowing conversion in constant expression.
410 * include/experimental/buffer (buffer_copy): Avoid narrowing
412 * include/experimental/internet (hash<>::operator()): Do not
413 use deprecated 'argument_type' member.
414 * include/std/variant (variant::emplace): Use cast instead
415 of implicit conversion from size_t to narrower unsigned type.
417 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
419 * include/tr1/shared_ptr.h (__shared_count, __shared_ptr)
420 (shared_ptr): Add diagnostic pragmas around uses of auto_ptr.
421 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
422 Adust dg-error line numbers.
424 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
426 * testsuite/18_support/96817.cc: Avoid -Wunused warnings.
427 * testsuite/20_util/any/assign/2.cc: Likewise.
428 * testsuite/20_util/any/cons/2.cc: Likewise.
429 * testsuite/20_util/align/1.cc: Avoid -Wsign-compare warning.
430 * testsuite/20_util/function/65760.cc: Avoid -Wunused warning.
431 * testsuite/20_util/function/1.cc: Avoid -Wcatch-value warning.
432 * testsuite/20_util/function/cons/move_target.cc: Avoid -Wunused
434 * testsuite/20_util/headers/memory/synopsis.cc: Add exception
436 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
437 -Wsign-compare warning.
438 * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
440 * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590-cxx11.cc:
441 Avoid -Wdeprecated-copy warning.
442 * testsuite/21_strings/basic_string/56166.cc: Avoid
443 -Wcatch-value warning.
444 * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
445 Avoid -Wcatch-value warnings.
446 * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
448 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
450 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
452 * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
454 * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
456 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
458 * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
460 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
462 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
464 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
466 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
468 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
470 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
472 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
474 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
476 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
477 Prune additional diagnostics.
478 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
480 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
482 * testsuite/21_strings/headers/string/synopsis.cc: Add exception
484 * testsuite/22_locale/locale/cons/12352.cc: Define sized
485 delete operators to avoid warnings.
486 * testsuite/23_containers/deque/modifiers/swap/1.cc: Add
487 exception specification.
488 * testsuite/23_containers/forward_list/cons/11.cc: Avoid
489 -Wdeprecated-copy warning.
490 * testsuite/23_containers/headers/bitset/synopsis.cc: Add
491 exception specification.
492 * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
493 * testsuite/23_containers/headers/forward_list/synopsis.cc:
495 * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
496 * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
497 * testsuite/23_containers/headers/queue/synopsis.cc: Likewise.
498 * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
499 * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
500 * testsuite/23_containers/list/modifiers/swap/1.cc: Likewise.
501 * testsuite/23_containers/map/modifiers/swap/1.cc: Likewise.
502 * testsuite/23_containers/multimap/modifiers/swap/1.cc:
504 * testsuite/23_containers/multiset/modifiers/swap/1.cc:
506 * testsuite/23_containers/set/modifiers/swap/1.cc: Likewise.
507 * testsuite/23_containers/unordered_set/56267-2.cc: Avoid
508 -Wdeprecated-copy warning.
509 * testsuite/23_containers/vector/bool/23632.cc: Avoid
510 -Wempty-body warning.
511 * testsuite/23_containers/vector/modifiers/swap/1.cc: Add
512 exception specification.
513 * testsuite/25_algorithms/heap/moveable2.cc: Fix misplaced
514 parentheses around arguments.
515 * testsuite/25_algorithms/sample/1.cc: Use return value.
516 * testsuite/25_algorithms/search/searcher.cc: Avoid -Wunused
518 * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
520 * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
522 * testsuite/27_io/filesystem/operations/remove_all.cc: Avoid
523 -Wsign-compare warning.
524 * testsuite/experimental/any/assign/2.cc: Avoid -Wunused warnings.
525 * testsuite/experimental/any/cons/2.cc: Likewise.
526 * testsuite/experimental/filesystem/operations/remove_all.cc:
527 Avoid -Wign-compare warning.
528 * testsuite/experimental/memory/observer_ptr/cons/cons.cc:
530 * testsuite/experimental/memory_resource/null_memory_resource.cc:
532 * testsuite/experimental/source_location/1.cc: Avoid -Waddress
534 * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
535 * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
537 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
538 Avoid -Wunused warning.
539 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
541 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
542 Prune additional warnings.
543 * testsuite/tr1/3_function_objects/function/1.cc: Avoid
544 -Wcatch-value warning.
545 * testsuite/util/replacement_memory_operators.h: Define sized
546 delete to avoid warnings.
547 * testsuite/util/testsuite_api.h (_NonDefaultConstructible): Add
548 user-declared assignment operator to stop -Wdeprecated-copy
550 * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
551 * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
553 * testsuite/util/testsuite_new_operators.h: Define sized deleted.
555 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
557 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
559 * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
560 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
561 * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
562 * testsuite/25_algorithms/count/constexpr.cc: Likewise.
563 * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
564 * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
565 * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
566 * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
567 * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
568 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
569 * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
570 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
572 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
574 * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
575 * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
576 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
577 * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
578 * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
579 * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
580 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
581 * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
582 * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
583 * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
584 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
585 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
586 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
587 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
588 * testsuite/25_algorithms/set_intersection/constexpr.cc:
590 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
592 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
593 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
594 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
596 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
598 * include/bits/uniform_int_dist.h (_Power_of_two): Add
600 (uniform_int_distribution::_S_nd): Add static_assert to ensure
601 the wider type is twice as wide as the result type.
602 (uniform_int_distribution::__generate_impl): Add static_assert
603 and declare variables as constexpr where appropriate.
604 (uniform_int_distribution:operator()): Likewise. Only consider
605 the uniform random bit generator's range of possible results
606 when deciding whether _S_nd can be used, not the __uctype type.
608 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
610 * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
612 (_Refcount_Base::_M_decr()): Likewise.
614 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
616 * include/bits/std_function.h (_Function_handler<void, void>):
617 Define explicit specialization used for invalid target types.
618 (_Base_manager::_M_manager) [!__cpp_rtti]: Return null.
619 (function::target_type()): Check for null pointer.
620 (function::target()): Define unconditionall. Fix bug with
621 const_cast of function pointer type.
622 (function::target() const): Define unconditionally, but
623 only use RTTI if enabled.
624 * testsuite/20_util/function/target_no_rtti.cc: New test.
626 2020-10-29 Patrick Palka <ppalka@redhat.com>
628 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
629 (test03): Fix initializing the vector vy with the array y of size 4.
631 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
633 * include/bits/hashtable_policy.h (_Local_iterator_base): Cast
634 value to avoid -Wsign-compare warnings.
635 * include/bits/regex.h (sub_match::_M_str): Avoid narrowing
637 * include/bits/regex_compiler.tcc (_Compiler::_M_quantifier):
638 Initialize variable to avoid -Wmaybe-uninitialized warning.
639 * include/bits/shared_ptr_base.h (_Sp_counted_deleter::_Impl):
640 Reorder mem-initializer-list to avoid -Wreorder warning.
641 * include/bits/stl_tree.h (_Rb_tree_impl): Explicitly
642 initialize base class in copy constructor.
643 * include/debug/safe_iterator.h (_Safe_iterator): Likewise.
644 * include/ext/debug_allocator.h: Reorder mem-initializer-list
645 to avoid -Wreorder warning.
646 * include/ext/throw_allocator.h (throw_allocator_limit)
647 (throw_allocator_random): Add user-declared assignment operators
648 to avoid -Wdeprecated-copy warnings.
650 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
652 * include/bits/uniform_int_dist.h (uniform_int_distribution):
653 Rename _UniformRandomNumberGenerator template parameters to
654 _UniformRandomBitGenerator, as per P0346R1.
656 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
658 * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
659 Call _M_init_syncbuf to set up get/put areas. Also qualify
662 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
664 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
666 (CXXABI_1.3.13): Restore missing piece.
668 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
670 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
671 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
672 * configure: Regenerate.
673 * include/std/sstream:
674 (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
675 (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
676 (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
677 (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
679 (basic_stringbuf::get_allocator()): New method.
680 (basic_stringbuf::view()): Likewise.
681 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
683 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
685 (basic_istringstream::view()): New method.
686 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
688 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
690 (basic_ostringstream::view()): New method.
691 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
693 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
695 (basic_stringstream::view()): New method.
696 * src/Makefile.in: Add c++20 directory.
697 * src/Makefile.am: Regenerate.
698 * src/c++20/Makefile.am: Add makefile for new sub-directory.
699 * src/c++20/Makefile.in: Generate.
700 * src/c++20/sstream-inst.cc: New file defining explicit
701 instantiations for basic_stringbuf, basic_istringstream,
702 basic_ostringstream, and basic_stringstream member functions
704 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
705 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
706 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
707 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
708 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
709 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
710 * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
711 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
712 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
713 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
714 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
715 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
716 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
717 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
718 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
719 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
721 2020-10-28 Patrick Palka <ppalka@redhat.com>
724 * include/std/chrono (year_month_weekday::operator sys_days):
725 Cast the result of index() to int so that the initializer for
726 days{} is sign-extended when it's converted to the underlying
728 * testsuite/std/time/year_month_weekday/3.cc: New test.
730 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
732 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
735 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
738 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
740 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
742 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
744 * include/ext/stdio_filebuf.h: Likewise.
745 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
747 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
750 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
751 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
752 Use elaborated-type-specifier and qualified-id to avoid
753 ambiguities with QNX system headers.
754 * testsuite/26_numerics/valarray/95592.cc: New test.
756 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
759 * include/std/span (span): Reorder data members to match common
760 implementations of struct iovec.
761 * testsuite/23_containers/span/layout_compat.cc: New test.
763 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
765 * include/std/functional (std::_Placeholder): Define for C++98
766 as well as later standards.
767 * include/tr1/functional (std::placeholders::_1 etc): Declare
769 (tr1::_Placeholder): Replace with using-declaration for
771 (tr1::placeholders::_1 etc.): Replace with using-directive for
774 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
776 * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
777 (__ellint_rc, __ellint_rj): Remove unused variables.
778 * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
780 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
782 * include/bits/locale_conv.h (__str_codecvt_out_all):
783 Add cast to compare operands of the same signedness.
784 * include/bits/locale_facets_nonio.tcc
785 (time_get::_M_extract_wday_or_month): Likewise.
786 * include/bits/sstream.tcc (basic_stringbuf::overflow):
788 * include/tr1/legendre_function.tcc (__sph_legendre): Use
789 unsigned for loop variable.
791 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
793 * include/std/charconv (from_chars): Add noexcept to match
794 definitions in src/c++17/floating_from_chars.cc
796 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
798 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
799 Add noexcept. Do not throw on precondition violation.
801 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
803 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
804 Add noexcept to match definitions in src/c++17/fs_path.cc.
806 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
808 * testsuite/experimental/memory_resource/new_delete_resource.cc:
809 Add missing <cstdint> header.
810 * testsuite/experimental/memory_resource/resource_adaptor.cc:
813 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
815 * include/experimental/executor (strand::_State): Fix thinko.
817 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
819 * include/std/type_traits (__is_nt_constructible_impl): Remove.
820 (__is_nothrow_constructible_impl): Adjust.
821 (is_nothrow_default_constructible): Likewise.
822 (__is_nt_assignable_impl): Remove.
823 (__is_nothrow_assignable_impl): Adjust.
825 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
828 * libsupc++/new_opa.cc: Declare size_t in global namespace.
829 Remove unused header.
831 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
833 * include/bits/shared_ptr_base.h
834 (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
835 definitions to match declaration.
836 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
837 to declaration to match definition.
839 2020-10-23 Patrick Palka <ppalka@redhat.com>
841 * include/std/ranges (single_view::single_view): Mark the
842 in place constructor explicit as per LWG 3428.
843 (take_view): Remove the constraint on the deduction guide's
844 template parameter as per LWG 3447.
846 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
848 * include/experimental/memory_resource: Include <tuple>.
849 (polymorphic_allocator::construct): Qualify forward_as_tuple.
850 * include/std/memory_resource: Likewise.
852 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
854 * testsuite/30_threads/condition_variable/members/68519.cc:
855 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
858 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
860 * include/std/shared_mutex: Only include <condition_variable>
861 when pthread_rwlock_t and POSIX timers are not available.
862 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
863 value to be type 'long'.
864 * include/std/version (__cpp_lib_shared_mutex)
865 (__cpp_lib_shared_timed_mutex): Likewise.
867 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
869 * include/Makefile.am: Add new header.
870 * include/Makefile.in: Regenerate.
871 * include/bits/shared_ptr.h: Include <iosfwd>.
872 * include/bits/shared_ptr_base.h: Include required headers here
873 directly, instead of in <memory>.
874 * include/bits/uses_allocator_args.h: New file. Move utility
875 functions for uses-allocator construction from <memory> to here.
876 Only define the utility functions when concepts are available.
877 (__cpp_lib_make_obj_using_allocator): Define non-standard
879 * include/std/condition_variable: Remove unused headers.
880 * include/std/future: Likewise.
881 * include/std/memory: Remove headers that are not needed
882 directly, and are now inclkuded where they're needed. Include
883 new <bits/uses_allocator_args.h> header.
884 * include/std/memory_resource: Include only the necessary
885 headers. Use new feature test macro to detect support for the
887 * include/std/scoped_allocator: Likewise.
888 * include/std/version (__cpp_lib_make_obj_using_allocator):
891 2020-10-22 Olivier Hainque <hainque@adacore.com>
893 * crossconfig.m4: Turn vxworks matcher into vxworks*.
894 * configure.host: Likewise.
895 * configure: Regenerate.
897 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
899 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
901 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
902 Remove specializations and just call _M_add_ref_lock_nothrow.
903 (__shared_count, __shared_ptr): Use nullptr for null pointer
905 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
906 instead of _M_add_ref_lock.
907 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
908 (__shared_ptr::operator bool()): Add noexcept.
909 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
911 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
914 * include/bits/ranges_util.h (tuple_size<subrange>)
915 (tuple_element<I, cv subrange>): Move here from ...
916 * include/std/ranges: ... here.
917 * testsuite/std/ranges/subrange/97512.cc: New test.
919 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
921 * include/pstl/algorithm_impl.h: Update file.
922 * include/pstl/execution_impl.h: Likewise.
923 * include/pstl/glue_algorithm_impl.h: Likewise.
924 * include/pstl/glue_memory_impl.h: Likewise.
925 * include/pstl/glue_numeric_impl.h: Likewise.
926 * include/pstl/memory_impl.h: Likewise.
927 * include/pstl/numeric_impl.h: Likewise.
928 * include/pstl/parallel_backend.h: Likewise.
929 * include/pstl/parallel_backend_serial.h: Likewise.
930 * include/pstl/parallel_backend_tbb.h: Likewise.
931 * include/pstl/parallel_backend_utils.h: Likewise.
932 * include/pstl/pstl_config.h: Likewise.
933 * include/pstl/unseq_backend_simd.h: Likewise.
935 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
937 * include/bits/hashtable_policy.h
938 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
939 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
940 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
941 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
942 (_Map_base<>::__node_type): Remove.
943 (_Map_base<>::iterator): Remove.
944 (_Insert_base<>::__hash_cached): New.
945 (_Insert_base<>::__constant_iterators): New.
946 (_Insert_base<>::__hashtable_alloc): New.
947 (_Insert_base<>::__node_type): Remove.
948 (_Insert_base<>::__node_ptr): New.
949 (_Hash_code_base<>): Remove specializations.
950 (_Hash_code_base<>::__node_type): Remove.
951 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
953 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
955 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
957 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
959 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
961 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
962 const _Hash_node_code_base<>&)): ...this.
963 (_Hashtable_base<>::__constant_iterators): Remove.
964 (_Hashtable_base<>::__unique_keys): Remove.
965 (_Hashtable_base<>::__node_type): Remove.
966 (_Hashtable_base<>::iterator): Remove.
967 (_Hashtable_base<>::const_iterator): Remove.
968 (_Hashtable_base<>::local_iterator): Remove.
969 (_Hashtable_base<>::const_local_iterator): Remove.
970 (_Hashtable_base<>::__ireturn_type): Remove.
971 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
972 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
974 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
975 (_Hashtable_base<>::_S_node_equals(__hash_code,
976 const _Hash_node_code_hash<>&)): ...this.
977 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
978 (_Hashtable_base<>::_M_equals): Adapt.
979 (_Hashtable_baxe<>::_M_node_equals): Adapt.
980 (_Equality<>::_M_equal): Adapt.
981 (_Hashtable_alloc<>::__node_ptr): New.
982 (_Hashtable_alloc<>::__bucket_type): Rename into...
983 (_Hashtable_alloc<>::__node_base_ptr): ...this.
984 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
985 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
986 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
987 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
988 (_Hashtable_alloc<>::__buckets_ptr): New.
989 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
990 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
991 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
992 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
993 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
994 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
995 * include/bits/hashtable.h (_Hashtable<>): Adapt.
997 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
999 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
1000 -Wno-stringop-overflow to test.
1002 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
1005 * include/std/coroutine (__noop_coro_frame): Replace with
1006 noop_coroutine_handle::__frame.
1007 (__dummy_resume_destroy): Define inline in __frame.
1008 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
1009 and define as inline.
1010 * testsuite/18_support/coroutines/95917.cc: New test.
1012 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
1014 * include/std/coroutine (coroutine_handle<_Promise>): Remove
1015 base class. Add constructors, conversions, accessors etc. as
1016 proposed for LWG 3460.
1017 (coroutine_handle<noop_coroutine_promise>): Likewise.
1018 * testsuite/18_support/coroutines/lwg3460.cc: New test.
1020 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1022 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
1024 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
1025 unused header. Adjust standard reference.
1026 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
1027 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
1029 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1031 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
1032 form of __no_unique_address__ attribute because
1033 no_unique_address is not reserved prior to C++20.
1035 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1037 * include/bits/node_handle.h (_Node_handle_common): Replace
1038 std::optional with custom type.
1039 * testsuite/20_util/variant/exception_safety.cc: Add missing
1042 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1044 * include/precompiled/expc++.h: Removed.
1046 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1049 * include/std/variant
1050 (__gen_vtable_impl<>::_S_apply_single_alt):
1051 Diagnose visitor return type mismatches here..
1052 (__gen_vtable_impl</*base case*/>::_S_apply):
1055 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
1057 * include/std/concepts: Fix typos in copyright notice.
1058 * include/std/ranges: Likewise.
1060 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1063 * include/std/sstream (basic_stringbuf::str()): Check for
1064 null egptr() before comparing to non-null pptr().
1066 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1068 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
1069 Do not generate debug info.
1070 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
1073 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1075 * include/bits/basic_string.h (basic_string(const Alloc&))
1076 (basic_string(const basic_string&)
1077 (basic_string(const CharT*, size_type, const Alloc&))
1078 (basic_string(const CharT*, const Alloc&))
1079 (basic_string(size_type, CharT, const Alloc&))
1080 (basic_string(initializer_list<CharT>, const Alloc&))
1081 (basic_string(InputIterator, InputIterator, const Alloc&)):
1082 Define inline in class body.
1083 * include/bits/basic_string.tcc (basic_string(const Alloc&))
1084 (basic_string(const basic_string&)
1085 (basic_string(const CharT*, size_type, const Alloc&))
1086 (basic_string(const CharT*, const Alloc&))
1087 (basic_string(size_type, CharT, const Alloc&))
1088 (basic_string(initializer_list<CharT>, const Alloc&))
1089 (basic_string(InputIterator, InputIterator, const Alloc&)):
1090 Move definitions into class body.
1092 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1094 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
1095 Add comments about which test flags get used by the check.
1097 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1099 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
1100 comment more precise about what isn't supported by COW strings.
1101 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1103 * testsuite/21_strings/basic_string/allocator/char/move.cc:
1105 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
1107 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
1109 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1111 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
1113 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
1115 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1117 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
1119 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
1121 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
1123 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1125 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
1128 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1130 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
1131 Do not require cxx11-abi effective target.
1132 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
1134 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
1136 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1138 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1139 (basic_string(const _CharT*, const _Alloc&)): Constrain to
1140 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
1141 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1143 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
1146 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
1148 * include/bits/stl_algo.h (any_of): Fix incorrect description
1151 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
1153 * doc/xml/manual/evolution.xml: Document some API changes
1155 * doc/xml/manual/intro.xml: Document LWG 2499.
1156 * doc/xml/manual/status_cxx2020.xml: Update status.
1157 * doc/html/*: Regenerate.
1159 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
1161 * doc/xml/book.txml: Remove trailing whitespace.
1162 * doc/xml/chapter.txml: Likewise.
1163 * doc/xml/class.txml: Likewise.
1164 * doc/xml/gnu/fdl-1.3.xml: Likewise.
1165 * doc/xml/gnu/gpl-3.0.xml: Likewise.
1166 * doc/xml/manual/abi.xml: Likewise.
1167 * doc/xml/manual/algorithms.xml: Likewise.
1168 * doc/xml/manual/allocator.xml: Likewise.
1169 * doc/xml/manual/appendix_contributing.xml: Likewise.
1170 * doc/xml/manual/appendix_free.xml: Likewise.
1171 * doc/xml/manual/appendix_porting.xml: Likewise.
1172 * doc/xml/manual/atomics.xml: Likewise.
1173 * doc/xml/manual/auto_ptr.xml: Likewise.
1174 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1175 * doc/xml/manual/bitmap_allocator.xml: Likewise.
1176 * doc/xml/manual/build_hacking.xml: Likewise.
1177 * doc/xml/manual/codecvt.xml: Likewise.
1178 * doc/xml/manual/concurrency.xml: Likewise.
1179 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1180 * doc/xml/manual/configure.xml: Likewise.
1181 * doc/xml/manual/containers.xml: Likewise.
1182 * doc/xml/manual/ctype.xml: Likewise.
1183 * doc/xml/manual/debug.xml: Likewise.
1184 * doc/xml/manual/debug_mode.xml: Likewise.
1185 * doc/xml/manual/diagnostics.xml: Likewise.
1186 * doc/xml/manual/documentation_hacking.xml: Likewise.
1187 * doc/xml/manual/evolution.xml: Likewise.
1188 * doc/xml/manual/internals.xml: Likewise.
1189 * doc/xml/manual/intro.xml: Likewise.
1190 * doc/xml/manual/io.xml: Likewise.
1191 * doc/xml/manual/iterators.xml: Likewise.
1192 * doc/xml/manual/locale.xml: Likewise.
1193 * doc/xml/manual/localization.xml: Likewise.
1194 * doc/xml/manual/messages.xml: Likewise.
1195 * doc/xml/manual/mt_allocator.xml: Likewise.
1196 * doc/xml/manual/numerics.xml: Likewise.
1197 * doc/xml/manual/parallel_mode.xml: Likewise.
1198 * doc/xml/manual/policy_data_structures.xml: Likewise.
1199 * doc/xml/manual/prerequisites.xml: Likewise.
1200 * doc/xml/manual/shared_ptr.xml: Likewise.
1201 * doc/xml/manual/spine.xml: Likewise.
1202 * doc/xml/manual/status_cxxtr1.xml: Likewise.
1203 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
1204 * doc/xml/manual/strings.xml: Likewise.
1205 * doc/xml/manual/support.xml: Likewise.
1206 * doc/xml/manual/test.xml: Likewise.
1207 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
1208 * doc/xml/manual/using.xml: Likewise.
1209 * doc/xml/manual/using_exceptions.xml: Likewise.
1210 * doc/xml/manual/utilities.xml: Likewise.
1211 * doc/html/*: Regenerate.
1213 2020-10-12 Patrick Palka <ppalka@redhat.com>
1215 * include/std/ranges (take_while_view::begin): Constrain the
1216 const overload further as per LWG 3450.
1217 (take_while_view::end): Likewise.
1218 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
1221 2020-10-12 Patrick Palka <ppalka@redhat.com>
1224 * include/std/ranges (take_view::_CI): Define this alias
1225 template as per LWG 3449 and remove ...
1226 (take_view::_Sentinel::_CI): ... this type alias.
1227 (take_view::_Sentinel::operator==): Adjust use of _CI
1228 accordingly. Define a second overload that accepts an iterator
1229 of the opposite constness as per LWG 3449.
1230 (take_while_view::_Sentinel::operator==): Likewise.
1231 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
1233 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1235 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
1237 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1239 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
1240 so that C++17 features are documented.
1242 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1244 * include/bits/stl_algobase.h (copy, move, copy_backward)
1245 (move_backward): Fix documentation for returned iterator.
1247 2020-10-12 Martin Sebor <msebor@redhat.com>
1250 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
1252 2020-10-11 Clement Chigot <clement.chigot@atos.net>
1254 * config/os/aix/t-aix: Add complementary mode object file to
1257 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
1260 * doc/html/manual/source_code_style.html: Regenerate.
1261 * doc/xml/manual/appendix_contributing.xml: Add __deref to
1263 * include/debug/functions.h (_Irreflexive_checker::__deref):
1265 * testsuite/17_intro/badnames.cc: Check __deref.
1267 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1269 * include/std/variant (__check_visitor_result):
1270 Use size_t for indexes.
1271 (__check_visitor_results): Likewise.
1273 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
1276 * include/std/variant (__deduce_visit_result): Add a nested ::type.
1277 (__gen_vtable_impl</*base case*/>::_S_apply):
1278 Check the visitor return type.
1279 (__same_types): New.
1280 (__check_visitor_result): Likewise.
1281 (__check_visitor_results): Likewise.
1282 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
1283 in case we're visiting just one variant.
1284 * testsuite/20_util/variant/visit_neg.cc: Adjust.
1286 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1289 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
1290 calculations. Also split the first loop into three loops to
1291 avoid branching on k on every iteration, resolving PR 94823.
1292 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
1293 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
1296 2020-10-09 Daniel Lemire <lemire@gmail.com>
1298 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
1299 New member function implementing Lemire's "nearly divisionless"
1301 (uniform_int_distribution::operator()): Use _S_nd when the range
1302 of the URBG is the full width of the result type.
1304 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1306 * testsuite/Makefile.am: Set and export variable separately.
1307 * testsuite/Makefile.in: Regenerate.
1309 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1311 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
1312 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
1314 * testsuite/Makefile.in: Regenerate.
1316 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1318 * testsuite/performance/26_numerics/random_dist.cc: New test.
1320 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1322 * testsuite/util/testsuite_performance.h (report_header): Remove
1325 2020-10-08 Patrick Palka <ppalka@redhat.com>
1328 * include/bits/ranges_uninitialized.h:
1329 (__construct_at_fn::operator()): Rewrite in terms of
1330 std::construct_at. Declare it conditionally noexcept. Qualify
1331 calls to declval in its requires-clause.
1332 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
1335 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1338 * include/bits/random.tcc
1339 (discrete_distribution::param_type::_M_initialize)
1340 (piecewise_constant_distribution::param_type::_M_initialize)
1341 (piecewise_linear_distribution::param_type::_M_initialize):
1342 Add assertions for positive sums..
1343 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1346 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1348 * include/bits/ios_base.h (ios_base::failure): Add constructors
1349 takeing error_code argument. Add code() member function.
1350 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
1351 run for the old ABI but do not check for derivation from
1353 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
1355 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1357 * include/bits/random.h (__detail::_Mod): Revert last change.
1358 (__detail::__mod): Do not use _Mod for a==0 case.
1359 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1360 Check other cases with a==0. Also check runtime results.
1361 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1364 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
1366 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
1367 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1370 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
1372 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
1373 parameter to use reserved name.
1374 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
1375 template parameters to use reserved name.
1376 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
1377 parameters and local variables.
1378 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
1381 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1384 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
1385 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
1387 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
1388 Remove out-of-line definition.
1389 (exception_ptr::exception_ptr(const exception_ptr&)):
1391 (exception_ptr::~exception_ptr()): Likewise.
1392 (exception_ptr::operator=(const exception_ptr&)):
1394 (exception_ptr::swap(exception_ptr&)): Likewise.
1395 (exception_ptr::_M_addref()): Add branch prediction.
1396 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
1398 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
1399 inline as hidden friends. Remove declarations at namespace
1401 (exception_ptr::exception_ptr()): Define inline.
1402 (exception_ptr::exception_ptr(const exception_ptr&)):
1404 (exception_ptr::~exception_ptr()): Likewise.
1405 (exception_ptr::operator=(const exception_ptr&)):
1407 (exception_ptr::swap(exception_ptr&)): Likewise.
1408 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
1409 * testsuite/18_support/exception_ptr/90295.cc: New test.
1411 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1413 * include/std/ranges (join_view): Remove deduction guide.
1414 (views::join): Add explicit template argument list to prevent
1415 deducing the wrong type.
1416 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
1418 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
1420 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1422 * include/bits/regex.h: Use __int_traits<int> instead of
1423 std::numeric_limits<int>.
1424 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
1425 instead of std::numeric_limits<T>::max().
1426 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
1427 std::numeric_limits<size_t>::max().
1428 * include/std/regex: Include <ext/numeric_traits.h>.
1429 * include/std/string_view: Use typedef for __int_traits<int>.
1430 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
1431 std::numeric_limits<size_t>::max().
1432 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
1433 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
1434 * testsuite/std/ranges/subrange/96042.cc: Likewise.
1436 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1438 * include/std/numeric: Move all #include directives to the top
1440 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
1442 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1444 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1446 * config/abi/pre/gnu.ver: Add new symbol.
1447 * include/bits/functexcept.h (__throw_bad_array_new_length):
1448 Declare new function.
1449 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
1450 Throw bad_array_new_length for impossible sizes (LWG 3190).
1451 * include/ext/new_allocator.h (new_allocator::allocate):
1453 * include/std/memory_resource (polymorphic_allocator::allocate)
1454 (polymorphic_allocator::allocate_object): Use new function,
1455 __throw_bad_array_new_length.
1456 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
1458 * testsuite/20_util/allocator/lwg3190.cc: New test.
1460 2020-10-05 Mike Crowe <mac@mcrowe.com>
1463 * include/bits/atomic_futex.h:
1464 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
1465 clock duration type when rounding.
1466 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
1467 Rename from test_pr91486.
1468 (float_steady_clock): New class for test.
1469 (test_pr91486_wait_until): New test.
1471 2020-10-05 Mike Crowe <mac@mcrowe.com>
1473 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
1474 rounding.cc and alter to support compilation for C++11 and to
1475 test std::chrono::__detail::ceil.
1477 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1479 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
1480 instead of double so that __atomic_load_8 isn't needed.
1482 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1484 * testsuite/18_support/96817.cc: Use terminate handler that
1487 2020-10-02 Patrick Palka <ppalka@redhat.com>
1489 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
1490 Define for C++20 as per P0896.
1491 (reverse_iterator::iter_swap): Likewise.
1492 (move_iterator::operator*): Apply P0896 changes for C++20.
1493 (move_iterator::operator[]): Likewise.
1494 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
1496 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
1498 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1499 Do not try to dereference return value of __atomic_load_n.
1501 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1503 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1504 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
1506 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1508 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
1509 Define for GCC 11 or when !__is_identifier(__is_same).
1510 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
1511 * include/std/type_traits (is_same, is_same_v): Replace uses
1512 of _GLIBCXX_BUILTIN_IS_SAME_AS.
1514 2020-09-28 Patrick Palka <ppalka@redhat.com>
1516 * include/std/ranges (filter_view): Declare the data member
1517 _M_base last instead of first, and adjust constructors' member
1518 initializer lists accordingly.
1519 (transform_view): Likewise.
1520 (take_view): Likewise.
1521 (take_while_view): Likewise.
1522 (drop_view): Likewise.
1523 (drop_while_view): Likewise.
1524 (join_view): Likewise.
1525 (split_view): Likewise (and tweak nearby formatting).
1526 (reverse_view): Likewise.
1527 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
1530 2020-09-28 Patrick Palka <ppalka@redhat.com>
1532 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
1534 2020-09-28 Patrick Palka <ppalka@redhat.com>
1536 * include/bits/ranges_util.h (subrange::_M_end): Give it
1537 [[no_unique_address]].
1538 * testsuite/std/ranges/subrange/sizeof.cc: New test.
1540 2020-09-28 Patrick Palka <ppalka@redhat.com>
1542 * include/std/ranges (iota_view::_M_bound): Give it
1543 [[no_unique_address]].
1544 * testsuite/std/ranges/iota/iota_view.cc: Check that an
1545 unbounded iota_view has minimal size.
1547 2020-09-27 Clement Chigot <clement.chigot@atos.net>
1549 * config/os/aix/t-aix: Use $(AR) without -X32_64.
1551 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
1554 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
1555 New function wrapping __libc_single_threaded if available.
1556 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
1557 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
1558 (__cxa_guard_release): Likewise.
1559 * testsuite/18_support/96817.cc: New test.
1561 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
1563 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
1564 * libsupc++/Makefile.in: Regenerate.
1566 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
1569 * include/std/type_traits (invoke_result, is_invocable)
1570 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
1571 Add static_asserts to make sure that the arguments of the type
1572 traits are not misused with incomplete types.
1573 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
1574 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
1575 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
1576 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
1578 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
1579 for error on incomplete type usage in trait.
1581 2020-09-24 Patrick Palka <ppalka@redhat.com>
1583 * include/std/ranges (__detail::__boxable): Split out the
1584 associated constraints of __box into here.
1585 (__detail::__box): Use the __boxable concept. Define a leaner
1586 partial specialization for semiregular types.
1587 (single_view::_M_value): Give it [[no_unique_address]].
1588 (filter_view::_M_pred): Likewise.
1589 (transform_view::_M_fun): Likewise.
1590 (take_while_view::_M_pred): Likewise.
1591 (drop_while_view::_M_pred):: Likewise.
1592 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
1595 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
1597 * doc/xml/manual/configure.xml: Correct name of option.
1598 * doc/html/*: Regenerate.
1600 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1603 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
1604 for empty string before inspecting the first character.
1605 * testsuite/27_io/filesystem/path/append/source.cc: Append
1606 empty string_view to path.
1608 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
1610 * include/bits/align.h (align): Fix overflow handling.
1611 * testsuite/20_util/align/3.cc: New test.
1613 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1615 * include/Makefile.am: Add new headers and adjust for renamed
1617 * include/Makefile.in: Regenerate.
1618 * include/bits/iterator_concepts.h: Adjust for renamed header.
1619 * include/bits/range_access.h (ranges::*): Move to new
1620 <bits/ranges_base.h> header.
1621 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
1622 header instead of <ranges>.
1623 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
1625 * include/bits/range_cmp.h: Moved to...
1626 * include/bits/ranges_cmp.h: ...here.
1627 * include/bits/ranges_base.h: New header.
1628 * include/bits/ranges_util.h: New header.
1629 * include/experimental/string_view: Include new
1630 <bits/ranges_base.h> header.
1631 * include/std/functional: Adjust for renamed header.
1632 * include/std/ranges (ranges::view_base, ranges::enable_view)
1633 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
1634 <bits/ranges_base.h> header.
1635 (ranges::view_interface, ranges::subrange)
1636 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
1638 * include/std/span: Include new <bits/ranges_base.h> header.
1639 * include/std/string_view: Likewise.
1640 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
1641 missing <ranges> header.
1642 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
1645 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1649 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1650 Use correct value category in __use_alloc call.
1651 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
1652 that require correct value category to be used.
1654 2020-09-22 Patrick Palka <ppalka@redhat.com>
1656 * include/std/span (span::front): Remove static_assert.
1657 (span::back): Likewise.
1658 (span::operator[]): Likewise.
1659 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
1660 that we check the preconditions of back() only when it's called.
1661 * testsuite/23_containers/span/front_neg.cc: Likewise for
1663 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
1666 2020-09-22 Patrick Palka <ppalka@redhat.com>
1668 * include/bits/stl_algo.h (__sample): Exit early when the
1669 input range is empty.
1670 * testsuite/25_algorithms/sample/3.cc: New test.
1672 2020-09-22 Patrick Palka <ppalka@redhat.com>
1674 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
1675 (search): Likewise for the overload that takes a searcher.
1676 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
1678 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
1679 std::search overload that takes a searcher.
1681 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1683 * include/bits/c++config (__replacement_assert): Add noreturn
1685 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
1686 assertion is expected to pass.
1688 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1690 * include/std/ranges (drop_view::begin()): Adjust constraints
1691 to match the correct condition for O(1) ranges::next (LWG 3482).
1692 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
1693 cached for non-sized_range.
1695 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1697 * include/std/ranges (transform_view, elements_view): Relax
1698 constraints on operator- for iterators, as per LWG 3483.
1699 * testsuite/std/ranges/adaptors/elements.cc: Check that we
1700 can take the difference of two iterators from a non-random
1702 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
1704 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1707 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
1709 (assume_aligned): Do not use __builtin_assume_aligned during
1710 constant evaluation.
1711 * testsuite/20_util/assume_aligned/1.cc: Improve test.
1712 * testsuite/20_util/assume_aligned/97132.cc: New test.
1714 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
1717 * include/std/functional (bind_front): Fix order of parameters
1718 in is_nothrow_constructible_v specialization.
1719 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
1721 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1723 * include/std/memory: Move #include <bits/align.h> inside C++11
1724 conditional includes.
1726 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1728 * include/Makefile.am (bits_headers): Add new header.
1729 * include/Makefile.in: Regenerate.
1730 * include/bits/align.h: New file.
1731 * include/std/memory (align): Move definition to bits/align.h.
1732 (assume_aligned): Likewise.
1734 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1736 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
1737 using declaration to make chrono::ceil available for internal
1738 use with a consistent name.
1739 (chrono::__detail::__ceil_impl): New function template.
1740 (chrono::__detail::ceil): Use __ceil_impl to compare and
1741 increment the value. Remove SFINAE constraint.
1743 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1745 * include/bits/regex_error.h (__throw_regex_error): Fix
1746 parameter declaration and use reserved attribute names.
1748 2020-09-11 Mike Crowe <mac@mcrowe.com>
1750 * include/std/condition_variable (condition_variable::wait_until):
1751 Convert delta to steady_clock duration before adding to current
1752 steady_clock time to avoid rounding errors described in PR68519.
1753 (condition_variable::wait_for): Simplify calculation of absolute
1754 time by using chrono::__detail::ceil in both overloads.
1755 * testsuite/30_threads/condition_variable/members/68519.cc:
1756 (test_wait_for): Renamed from test01. Replace unassigned val
1757 variable with constant false. Reduce scope of mx and cv
1758 variables to just test_wait_for function.
1759 (test_wait_until): Add new test case.
1761 2020-09-11 Mike Crowe <mac@mcrowe.com>
1764 * include/bits/atomic_futex.h
1765 (__atomic_futex_unsigned::_M_load_when_equal_for)
1766 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
1767 __detail::ceil to convert delta to the reference clock
1768 duration type to avoid resolution problems.
1769 * include/std/chrono (__detail::ceil): Move implementation
1770 of std::chrono::ceil into private namespace so that it's
1771 available to pre-C++17 code.
1772 * testsuite/30_threads/async/async.cc (test_pr91486):
1773 Test __atomic_futex_unsigned::_M_load_when_equal_for.
1775 2020-09-11 Mike Crowe <mac@mcrowe.com>
1777 * include/bits/atomic_futex.h
1778 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
1779 loop on generic _Clock to check the timeout against _Clock
1780 again after _M_load_when_equal_until returns indicating a
1782 * testsuite/30_threads/async/async.cc: Invent slow_clock
1783 that runs at an eleventh of steady_clock's speed. Use it
1784 to test the user-supplied-clock variant of
1785 __atomic_futex_unsigned::_M_load_when_equal_until works
1786 generally with test03 and loops correctly when the timeout
1787 time hasn't been reached in test04.
1789 2020-09-11 Mike Crowe <mac@mcrowe.com>
1792 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
1793 __clock_t typedef to use steady_clock so that unknown clocks are
1794 synced to it rather than system_clock. Change existing __clock_t
1795 overloads of _M_load_and_text_until_impl and
1796 _M_load_when_equal_until to use system_clock explicitly. Remove
1797 comment about DR 887 since these changes address that problem as
1798 best as we currently able.
1800 2020-09-11 Mike Crowe <mac@mcrowe.com>
1803 * config/abi/pre/gnu.ver: Update for addition of
1804 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
1805 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
1806 Add comments to clarify that _M_futex_wait_until and
1807 _M_load_and_test_until use CLOCK_REALTIME.
1808 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
1809 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
1810 New member functions that use CLOCK_MONOTONIC.
1811 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
1812 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
1813 overloads that accept a steady_clock time_point and use the
1814 new member functions.
1815 * src/c++11/futex.cc: Include headers required for
1817 (futex_clock_monotonic_flag): New constant to tell futex to
1818 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
1819 (futex_clock_monotonic_unavailable): New global to store the
1820 result of trying to use CLOCK_MONOTONIC.
1821 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
1822 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
1823 support waiting using steady_clock.
1825 2020-09-11 Mike Crowe <mac@mcrowe.com>
1827 * src/c++11/futex.cc: Add new constants for required futex
1828 flags. Add futex_clock_realtime_unavailable flag to store
1829 result of trying to use FUTEX_CLOCK_REALTIME.
1830 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
1831 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
1832 fall back to using gettimeofday and FUTEX_WAIT if that's not
1835 2020-09-11 Mike Crowe <mac@mcrowe.com>
1837 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
1838 with std::future::wait_until.
1839 (test03): Add new test templated on clock type waiting for future
1840 associated with async to resolve.
1841 (main): Call test03 to test both system_clock and steady_clock.
1843 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1844 Christophe Lyon <christophe.lyon@linaro.org>
1846 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1848 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1849 Christophe Lyon <christophe.lyon@linaro.org>
1851 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1853 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
1855 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
1857 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1859 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
1860 Add casts to compare types of the same signedness.
1862 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1864 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
1867 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1869 * include/std/version (__cpp_lib_array_constexpr):
1870 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
1873 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1875 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
1876 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
1877 warnings for uses of std::auto_ptr.
1878 * include/experimental/type_traits (is_literal_type_v):
1879 Likewise, for use of std::is_literal_type.
1880 * include/std/condition_variable (condition_variable_any::_Unlock):
1881 Likewise, for use of std::uncaught_exception.
1883 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1885 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
1887 * include/std/chrono (operator+(const year&, const years&)):
1890 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1892 * include/bits/codecvt.h (codecvt_byname): Remove names of
1895 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1897 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
1899 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1901 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
1903 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1905 * include/bits/atomic_base.h: Fix -Wunused-variable
1907 * include/ext/new_allocator.h: Fix -Wunused-parameter
1910 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1912 * include/bits/stl_iterator.h (counted_iterator): Add assertions
1913 to check preconditions added by LWG 3472.
1915 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1918 * src/c++17/memory_resource.cc (munge_options): Round
1919 max_blocks_per_chunk to a multiple of four.
1920 (__pool_resource::_M_alloc_pools()): Simplify slightly.
1921 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1922 Check that valid pointers are returned when small values are
1923 used for max_blocks_per_chunk.
1925 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1928 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
1929 Use __builtin_expect when checking if a new buffer needs to be
1930 allocated from the upstream resource, and for checks for edge
1931 cases like zero sized buffers and allocations.
1932 * src/c++17/memory_resource.cc (aligned_size): New class template.
1933 (aligned_ceil): New helper function to round up to a given
1935 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
1936 with an aligned_size member. Remove _M_canary member. Change _M_next
1937 to pointer instead of unaligned buffer.
1938 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
1939 of 64 instead of to power of two. Check for size overflow. Remove
1940 redundant check for minimum required alignment.
1941 (monotonic_buffer_resource::chunk::release): Adjust for changes
1943 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
1944 (big_block): Replace _M_size and _M_align with aligned_size
1946 (big_block::big_block): Check for size overflow.
1947 (big_block::size, big_block::align): Adjust to use aligned_size.
1948 (big_block::alloc_size): Use aligned_ceil.
1949 (munge_options): Use aligned_ceil.
1950 (__pool_resource::allocate): Use big_block::align for alignment.
1951 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
1952 upstream resource gets expected values for impossible sizes.
1953 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1954 Likewise. Adjust checks for expected alignment in existing test.
1956 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1958 * include/std/chrono (duration::_S_gcd): Use invariant that
1959 neither value is zero initially.
1961 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1963 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
1965 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1968 * include/std/tuple (_TupleConstraints<true, T...>): Use
1969 alternative is_constructible instead of std::is_constructible.
1970 * testsuite/20_util/tuple/cons/96592.cc: New test.
1972 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1974 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
1975 for C++14 and later.
1976 * include/std/numeric (__detail::__gcd): Replace recursive
1977 Euclidean algorithm with iterative version of binary GCD algorithm.
1978 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
1979 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1980 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1981 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
1982 * testsuite/26_numerics/gcd/2.cc: New test.
1984 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1987 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
1990 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1993 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
1994 New trait that says if memcmp can be used for ordering.
1995 (__is_memcmp_ordered_with): Likewise, for two types.
1996 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
1997 instead of __is_byte and __numeric_traits.
1998 (__lexicographical_compare_aux1): Likewise.
1999 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
2001 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
2002 (__is_byte_iter): Likewise.
2003 * include/std/array (operator<=>): Likewise. Only use memcmp
2004 when std::is_constant_evaluated() is false.
2005 * testsuite/23_containers/array/comparison_operators/96851.cc:
2007 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
2008 Adjust dg-error line numbers.
2010 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2012 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
2013 for definitions of __try, __catch and __throw_exception_again.
2014 (counted_iterator::operator++(int)): Use __throw_exception_again
2016 * libsupc++/new: Include <bits/exception.h> not <exception>.
2017 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
2018 * testsuite/18_support/destroying_delete.cc: Include
2019 <type_traits> for std::is_same_v definition.
2020 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
2022 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
2025 * include/bits/c++config (__glibcxx_assert_impl): Remove
2026 do-while so that uses of the macro need to add it.
2027 (__glibcxx_assert): Rename macro for runtime assertions
2028 to __glibcxx_assert_2.
2029 (__glibcxx_assert_1): Define macro for constexpr assertions.
2030 (__glibcxx_assert): Define macro for constexpr and runtime
2032 * include/bits/range_access.h (ranges::advance): Remove
2033 redundant precondition checks during constant evaluation.
2034 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
2035 use do-while in macro expansion.
2036 * include/std/ranges (iota_view::iota_view(W, B)): Remove
2039 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
2041 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
2042 New helper function for finding GCD of two positive intmax_t
2044 (duration::__divide): New helper alias for dividing one period
2046 (duration::__is_harmonic): Use __divide not ratio_divide.
2047 (duration(const duration<R2, P2>&)): Require the duration rep
2048 types to be convertible.
2049 * testsuite/20_util/duration/cons/dr2094.cc: New test.
2050 * testsuite/20_util/duration/requirements/reduced_period.cc:
2051 Fix definition of unused member functions in test type.
2052 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
2053 Adjust expected errors.
2055 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
2057 * include/std/numeric (__detail::__absu(bool)): Make deleted
2058 function a function template, so it will be chosen for calls
2059 with an explicit template argument list.
2060 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
2061 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2063 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
2065 * include/std/chrono (common_type): Fix partial specializations
2066 for a single duration type to use the common_type of the rep.
2067 (duration::operator+, duration::operator-): Fix return types
2068 to also use the common_type of the rep.
2069 * testsuite/20_util/duration/requirements/reduced_period.cc:
2070 Check duration using a rep that has common_type specialized.
2072 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
2075 * include/std/numeric (__abs_integral): Replace with ...
2076 (__detail::__absu): New function template that returns an
2077 unsigned type, guaranteeing it can represent the most
2078 negative signed value.
2079 (__detail::__gcd, __detail::__lcm): Require arguments to
2080 be unsigned and therefore already non-negative.
2081 (gcd, lcm): Convert arguments to absolute value as unsigned
2082 type before calling __detail::__gcd or __detail::__lcm.
2083 * include/experimental/numeric (gcd, lcm): Likewise.
2084 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
2086 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2087 * testsuite/26_numerics/gcd/92978.cc: New test.
2088 * testsuite/26_numerics/lcm/92978.cc: New test.
2089 * testsuite/experimental/numeric/92978.cc: New test.
2091 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
2093 * include/std/chrono (__duration_common_type): Ensure the
2094 reduced ratio is used. Remove unused partial specialization
2095 using __failure_type.
2096 (common_type): Pass reduced ratios to __duration_common_type.
2097 Add partial specializations for simple cases involving a single
2098 duration or time_point type.
2099 (duration::period): Use reduced ratio.
2100 (duration::operator+(), duration::operator-()): Return duration
2101 type using the reduced ratio.
2102 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
2103 Adjust expected errors.
2104 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
2106 2020-08-27 Patrick Palka <ppalka@redhat.com>
2108 * include/std/chrono (year_month::operator+): Properly handle a
2109 month value of 0 by casting the month value to int before
2110 subtracting 1 from it so that the difference is sign-extended in
2111 the subsequent addition.
2112 * testsuite/std/time/year_month/1.cc: Test adding months to a
2113 year_month whose month component is below or above the
2114 normalized range of [1,12].
2116 2020-08-27 Patrick Palka <ppalka@redhat.com>
2118 * include/std/chrono
2119 (__detail::__months_years_conversion_disambiguator): Define.
2120 (year_month::operator+=): Templatize the 'months'-based overload
2121 so that the 'years'-based overload is selected in case of
2122 equally-ranked implicit conversion sequences to both 'months'
2123 and 'years' from the supplied argument.
2124 (year_month::operator-=): Likewise.
2125 (year_month::operator+): Likewise.
2126 (year_month::operator-): Likewise.
2127 (year_month_day::operator+=): Likewise.
2128 (year_month_day::operator-=): Likewise.
2129 (year_month_day::operator+): Likewise.
2130 (year_month_day::operator-): Likewise.
2131 (year_month_day_last::operator+=): Likewise.
2132 (year_month_day_last::operator-=): Likewise.
2133 (year_month_day_last::operator+): Likewise
2134 (year_month_day_last::operator-): Likewise.
2135 (year_month_day_weekday::operator+=): Likewise
2136 (year_month_day_weekday::operator-=): Likewise.
2137 (year_month_day_weekday::operator+): Likewise.
2138 (year_month_day_weekday::operator-): Likewise.
2139 (year_month_day_weekday_last::operator+=): Likewise
2140 (year_month_day_weekday_last::operator-=): Likewise.
2141 (year_month_day_weekday_last::operator+): Likewise.
2142 (year_month_day_weekday_last::operator-): Likewise.
2143 (testsuite/std/time/year_month/2.cc): New test.
2144 (testsuite/std/time/year_month_day/2.cc): New test.
2145 (testsuite/std/time/year_month_day_last/2.cc): New test.
2146 (testsuite/std/time/year_month_weekday/2.cc): New test.
2147 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
2148 * testsuite/std/time/year_month/2.cc: New file.
2149 * testsuite/std/time/year_month_day/2.cc: New file.
2150 * testsuite/std/time/year_month_day_last/2.cc: New file.
2151 * testsuite/std/time/year_month_weekday/2.cc: New file.
2152 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
2154 2020-08-27 Patrick Palka <ppalka@redhat.com>
2157 * include/std/ranges (transform_view::sentinel::__distance_from):
2158 Give this a deduced return type.
2159 (transform_view::sentinel::operator-): Adjust the return type so
2160 that it's based on the constness of the iterator rather than
2161 that of the sentinel.
2162 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
2164 2020-08-27 Patrick Palka <ppalka@redhat.com>
2166 * include/std/ranges (elements_view::begin): Adjust constraints.
2167 (elements_view::end): Likewise.
2168 (elements_view::_Sentinel::operator==): Templatize to take both
2169 _Iterator<true> and _Iterator<false>.
2170 (elements_view::_Sentinel::operator-): Likewise.
2171 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
2172 the example from P1994R1.
2173 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
2175 2020-08-27 Patrick Palka <ppalka@redhat.com>
2177 * include/std/ranges (elements_view::end): Replace these two
2178 overloads with four new overloads.
2179 (elements_view::_Iterator::operator==): Remove.
2180 (elements_view::_Iterator::operator-): Likewise.
2181 (elements_view::_Sentinel): Define.
2183 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2185 * include/std/tuple (_Tuple_impl): Whitespaces changes for
2186 consistent indentation. Also use __enable_if_t alias template.
2188 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2192 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
2193 Replace parameter pack with a type parameter and a pack and pass
2194 the first type to __use_alloc.
2195 * testsuite/20_util/tuple/cons/96803.cc: New test.
2197 2020-08-26 Patrick Palka <ppalka@redhat.com>
2199 * include/std/chrono (year_month_weekday::operator==): Compare
2200 weekday_indexed instead of weekday.
2201 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
2203 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2205 * include/bits/hashtable_policy.h (_Hash_code_base): Change
2206 index of _Hashtable_ebo_helper base class.
2207 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
2209 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2212 * include/experimental/string_view (basic_string_view):
2213 Enable debug assertions.
2214 * include/std/string_view (basic_string_view):
2217 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
2219 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
2220 _H2 into _RangeHash and _Hash into _Unused.
2221 (_Hastable_base<>): Likewise.
2222 (_Map_base<>): Likewise.
2223 (_Insert_base<>): Likewise.
2224 (_Insert<>): Likewise.
2225 (_Rehash_base<>): Likewise.
2226 (_Local_iterator_base<>): Likewise.
2227 (_Hash_code_base<>): Likewise.
2228 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
2230 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
2232 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
2233 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
2234 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
2236 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
2237 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
2238 (_Local_const_iterator<>): Likewise.
2239 (_Equality<>): Likewise.
2240 (_Map_base<>::operator[](const key_type&): Adapt.
2241 (_Map_base<>::operator[](key_type&&): Adapt.
2242 (_Identity::operator()): Add noexcept.
2243 (_Select1st::operator()): Likewise.
2244 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
2246 (_Hash_code_base::_M_extract): Remove.
2247 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
2248 parameters. Remove _ExtractKey from constructors.
2249 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
2250 __hash_code, __node_type*, size_t)): Replace by...
2251 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
2252 __node_type*, size_t)): ...this.
2253 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
2254 __hash_code, __node_type*)): Replace by...
2255 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
2256 __node_type*)): ...this.
2257 (_Hashtable<>::__key_extract): Remove.
2258 * include/bits/node_handle.h: Adapt.
2260 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
2262 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
2263 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
2264 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
2265 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
2266 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
2267 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
2268 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
2269 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
2270 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
2271 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
2272 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
2273 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
2274 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
2275 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
2276 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
2277 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
2278 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
2279 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
2280 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
2282 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
2283 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
2285 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
2286 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
2287 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
2288 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
2289 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
2291 2020-08-25 Patrick Palka <ppalka@redhat.com>
2293 * include/std/chrono (year_month_weekday::ok): Fix assert.
2295 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
2297 * include/std/future (future, shared_future. promise): Add
2298 is_destructible assertion (LWG 3466). Adjust string-literal for
2299 !is_array and !is_function assertions.
2300 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
2301 types with no accessible destructor. Adjust expected errors.
2302 * testsuite/30_threads/promise/requirements/lwg3466.cc:
2304 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
2307 2020-08-25 Patrick Palka <ppalka@redhat.com>
2308 Ed Smith-Rowland <3dw4rd@verizon.net>
2309 Jonathan Wakely <jwakely@redhat.com>
2311 * include/std/chrono (time_point::operator++)
2312 (time_point::operator--): Define.
2313 (utc_clock, tai_clock, gps_clock): Forward declare.
2314 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
2315 (gps_seconds): Define.
2316 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
2317 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
2318 (is_clock_v<gps_clock>): Define these specializations.
2319 (leap_second_info): Define.
2320 (day, month, year, weekday, weekday_indexed)
2321 (weekday_last, month_day, month_day_last, month_weekday)
2322 (month_weekday_last, year_month, year_month_day)
2323 (year_month_day_last, year_month_weekday, year_month_weekday_last):
2324 Declare and later define.
2325 (last_spec, last, __detail::__days_per_month)
2326 (__detail::__days_per_month, __detail::__last_day): Define.
2327 (January, February, March, April, May, June, July, August)
2328 (September, October, November, December, Sunday, Monday, Tuesday)
2329 (Wednesday, Thursday, Friday, Saturday): Define.
2330 (weekday::operator[]): Define out-of-line.
2331 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
2333 (year_month_day::year_month_day, year_month_day::ok): Likewise.
2334 (__detail::__pow10, hh_mm_ss): Define.
2335 (literals::chrono_literals::operator""d)
2336 (literals::chrono_literals::operator""y): Define.
2337 (is_am, is_pm, make12, make24): Define.
2338 * testsuite/20_util/time_point/4.cc: New test.
2339 * testsuite/std/time/day/1.cc: New test.
2340 * testsuite/std/time/hh_mm_ss/1.cc: New test.
2341 * testsuite/std/time/is_am/1.cc: New test.
2342 * testsuite/std/time/is_pm/1.cc: New test.
2343 * testsuite/std/time/make12/1.cc: New test.
2344 * testsuite/std/time/make24/1.cc: New test.
2345 * testsuite/std/time/month/1.cc: New test.
2346 * testsuite/std/time/month_day/1.cc: New test.
2347 * testsuite/std/time/month_day_last/1.cc: New test.
2348 * testsuite/std/time/month_weekday/1.cc: New test.
2349 * testsuite/std/time/month_weekday_last/1.cc: New test.
2350 * testsuite/std/time/weekday/1.cc: New test.
2351 * testsuite/std/time/weekday_indexed/1.cc: New test.
2352 * testsuite/std/time/weekday_last/1.cc: New test.
2353 * testsuite/std/time/year/1.cc: New test.
2354 * testsuite/std/time/year_month/1.cc: New test.
2355 * testsuite/std/time/year_month_day/1.cc: New test.
2356 * testsuite/std/time/year_month_day_last/1.cc: New test.
2357 * testsuite/std/time/year_month_weekday/1.cc: New test.
2358 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
2360 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2362 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
2363 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
2365 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2367 * include/bits/iterator_concepts.h (indirectly_readable): Add
2368 partial specializations to resolve ambiguities (LWG 3446).
2369 * testsuite/24_iterators/associated_types/readable.traits.cc:
2370 Check types with both value_type and element_type.
2372 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2374 * include/std/ranges (ranges::iota_view::size()): Perform all
2375 calculations in the right unsigned types.
2376 * testsuite/std/ranges/iota/size.cc: New test.
2378 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2381 * include/std/variant (_Variant_storage): Replace implicit
2382 conversions from size_t to __index_type with explicit casts.
2384 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2386 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
2387 C++11 and skip for C++17 or later.
2389 2020-08-24 Corentin Gay <gay@adacore.com>
2391 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
2392 threads and add -pthread only on targets supporting them.
2393 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
2395 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
2397 * testsuite/30_threads/async/42819.cc: Likewise.
2398 * testsuite/30_threads/async/49668.cc: Likewise.
2399 * testsuite/30_threads/async/54297.cc: Likewise.
2400 * testsuite/30_threads/async/any.cc: Likewise.
2401 * testsuite/30_threads/async/async.cc: Likewise.
2402 * testsuite/30_threads/async/except.cc: Likewise.
2403 * testsuite/30_threads/async/launch.cc: Likewise.
2404 * testsuite/30_threads/async/lwg2021.cc: Likewise.
2405 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
2406 * testsuite/30_threads/call_once/39909.cc: Likewise.
2407 * testsuite/30_threads/call_once/49668.cc: Likewise.
2408 * testsuite/30_threads/call_once/60497.cc: Likewise.
2409 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
2410 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
2411 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
2412 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
2413 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
2414 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
2415 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
2416 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
2417 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
2418 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
2420 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
2421 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
2422 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
2423 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
2424 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
2425 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
2426 * testsuite/30_threads/future/cons/move.cc: Likewise.
2427 * testsuite/30_threads/future/members/45133.cc: Likewise.
2428 * testsuite/30_threads/future/members/get.cc: Likewise.
2429 * testsuite/30_threads/future/members/get2.cc: Likewise.
2430 * testsuite/30_threads/future/members/share.cc: Likewise.
2431 * testsuite/30_threads/future/members/valid.cc: Likewise.
2432 * testsuite/30_threads/future/members/wait.cc: Likewise.
2433 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
2434 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
2435 * testsuite/30_threads/lock/1.cc: Likewise.
2436 * testsuite/30_threads/lock/2.cc: Likewise.
2437 * testsuite/30_threads/lock/3.cc: Likewise.
2438 * testsuite/30_threads/lock/4.cc: Likewise.
2439 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
2440 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
2441 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
2442 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
2443 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
2444 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
2445 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
2446 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
2447 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
2448 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
2449 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
2450 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
2451 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
2452 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
2453 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
2454 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
2455 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
2456 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
2457 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
2459 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
2460 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
2461 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
2462 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
2463 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
2464 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
2465 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
2466 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
2467 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
2468 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
2469 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
2470 * testsuite/30_threads/promise/60966.cc: Likewise.
2471 * testsuite/30_threads/promise/cons/1.cc: Likewise.
2472 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
2473 * testsuite/30_threads/promise/cons/move.cc: Likewise.
2474 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
2475 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
2476 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
2477 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
2478 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
2479 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
2480 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
2481 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
2482 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
2483 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
2484 * testsuite/30_threads/promise/members/swap.cc: Likewise.
2485 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
2486 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
2488 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
2489 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
2490 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
2492 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
2493 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
2494 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
2495 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
2496 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
2497 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
2499 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
2500 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
2501 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
2503 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
2505 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
2506 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
2507 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
2509 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
2511 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
2513 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
2515 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
2517 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
2518 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
2519 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
2520 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
2521 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
2522 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
2523 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
2524 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
2525 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
2526 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
2527 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
2528 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
2529 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
2530 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
2531 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
2532 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
2533 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
2534 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
2535 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
2536 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
2537 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
2538 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2539 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2540 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2541 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2542 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
2543 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
2544 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
2545 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
2546 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
2547 * testsuite/30_threads/this_thread/1.cc: Likewise.
2548 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
2549 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
2550 * testsuite/30_threads/thread/cons/1.cc: Likewise.
2551 * testsuite/30_threads/thread/cons/2.cc: Likewise.
2552 * testsuite/30_threads/thread/cons/3.cc: Likewise.
2553 * testsuite/30_threads/thread/cons/4.cc: Likewise.
2554 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
2555 * testsuite/30_threads/thread/cons/5.cc: Likewise.
2556 * testsuite/30_threads/thread/cons/6.cc: Likewise.
2557 * testsuite/30_threads/thread/cons/7.cc: Likewise.
2558 * testsuite/30_threads/thread/cons/8.cc: Likewise.
2559 * testsuite/30_threads/thread/cons/9.cc: Likewise.
2560 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
2561 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
2562 * testsuite/30_threads/thread/members/1.cc: Likewise.
2563 * testsuite/30_threads/thread/members/2.cc: Likewise.
2564 * testsuite/30_threads/thread/members/3.cc: Likewise.
2565 * testsuite/30_threads/thread/members/4.cc: Likewise.
2566 * testsuite/30_threads/thread/members/5.cc: Likewise.
2567 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
2569 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
2570 * testsuite/30_threads/thread/swap/1.cc: Likewise.
2571 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
2572 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
2574 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
2575 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
2576 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
2578 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
2579 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
2580 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
2581 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
2582 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
2583 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
2584 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
2585 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
2586 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
2587 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
2588 * testsuite/30_threads/try_lock/1.cc: Likewise.
2589 * testsuite/30_threads/try_lock/2.cc: Likewise.
2590 * testsuite/30_threads/try_lock/3.cc: Likewise.
2591 * testsuite/30_threads/try_lock/4.cc: Likewise.
2592 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
2593 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
2594 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
2595 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
2596 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
2597 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
2598 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
2599 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
2600 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
2601 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
2602 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
2604 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2607 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
2608 test "cold" on darwin.
2609 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2611 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2613 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2615 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2618 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2621 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
2622 tbb-backend effective target.
2623 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
2624 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
2625 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
2627 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
2629 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
2630 (incrementable_traits<__int128>): Define specialization.
2631 (incrementable_traits<unsigned __int128>): Likewise.
2632 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
2635 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2636 Patrick Palka <ppalka@redhat.com>
2639 * include/bits/range_access.h (__detail::__to_unsigned_like):
2640 Do not use make_unsigned_t<T> in the return type, as it can
2641 result in an error before the integral<T> constraint is checked.
2642 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
2643 (__detail::__make_unsigned_like_t): Define as the return type
2644 of __to_unsigned_like.
2645 * testsuite/std/ranges/subrange/96042.cc: New test.
2647 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2649 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
2650 (operator>=): Remove deprecated functions.
2652 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2655 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
2656 trait which is true for 128-bit integers even in strict modes.
2657 (__numeric_traits_integer, __numeric_traits): Use
2658 __is_integer_nonstrict instead of __is_integer.
2659 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
2660 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
2662 * testsuite/std/ranges/iota/96042.cc: New test.
2664 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2666 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
2667 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
2668 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2669 Add new macros to comment.
2671 2020-08-19 Patrick Palka <ppalka@redhat.com>
2673 * include/Makefile.am (bits_headers): Add new header
2674 <bits/max_size_type.h>.
2675 * include/Makefile.in: Regenerate.
2676 * include/bits/iterator_concepts.h
2677 (ranges::__detail::__max_diff_type): Remove definition, replace
2678 with forward declaration of class __max_diff_type.
2679 (__detail::__max_size_type): Remove definition, replace with
2680 forward declaration of class __max_size_type.
2681 (__detail::__is_unsigned_int128, __is_signed_int128)
2682 (__is_int128): New concepts.
2683 (__detail::__is_integer_like): Accept __int128 and unsigned
2685 (__detail::__is_signed_integer_like): Accept __int128.
2686 * include/bits/max_size_type.h: New header.
2687 * include/bits/range_access.h: Include <bits/max_size_type.h>.
2688 (__detail::__to_unsigned_like): Two new overloads.
2689 * testsuite/std/ranges/iota/difference_type.cc: New test.
2690 * testsuite/std/ranges/iota/max_size_type.cc: New test.
2692 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2694 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
2696 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
2697 message in deprecated warnings.
2698 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
2699 macros for marking features deprecated in C++11.
2700 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2702 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
2703 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
2704 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
2705 * include/backward/binders.h (binder1st, binder2nd): Likewise.
2706 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
2707 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
2708 * include/std/streambuf (stossc): Replace C++11 attribute
2709 with _GLIBCXX_DEPRECATED_SUGGEST.
2710 * include/std/type_traits (__is_nullptr_t): Use
2711 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
2712 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
2713 Also check for io_state, open_mode and seek_dir typedefs.
2715 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
2718 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
2719 Add static_asserts to make sure that the argument of the type
2720 trait is not misused with incomplete types.
2721 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
2722 to make sure that the first and second arguments of the type trait
2723 are not misused with incomplete types.
2724 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
2725 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
2726 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
2727 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
2729 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
2731 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
2732 Clement Chigot <clement.chigot@atos.net>
2734 * config/os/aix/t-aix: Add complementary mode object files to
2737 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2739 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
2740 "cold" isn't used in the library. Also check <cxxabi.h>.
2741 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2743 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2745 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2747 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2750 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2753 * include/std/future (__future_base::_S_make_deferred_state)
2754 (__future_base::_S_make_async_state): Remove.
2755 (__future_base::_Deferred_state): Change constructor to accept a
2756 parameter pack of arguments and forward them to the call
2758 (__future_base::_Async_state_impl): Likewise. Replace lambda
2759 expression with a named member function.
2760 (async): Construct state object directly from the arguments,
2761 instead of using thread::__make_invoker, _S_make_deferred_state
2762 and _S_make_async_state. Move shared state into the returned
2764 * include/std/thread (thread::_Call_wrapper): New alias
2765 template for use by constructor and std::async.
2766 (thread::thread(Callable&&, Args&&...)): Create state object
2767 directly instead of using _S_make_state.
2768 (thread::__make_invoker, thread::__decayed_tuple)
2769 (thread::_S_make_state): Remove.
2770 * testsuite/30_threads/async/69724.cc: New test.
2772 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
2777 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
2778 (_Head_base<Idx, Head, true>): New definition of the partial
2779 specialization, using [[no_unique_address]] instead of
2781 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
2783 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
2784 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
2785 * testsuite/20_util/tuple/element_access/71096.cc: New test.
2787 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
2789 * testsuite/lib/libstdc++.exp: Use the new option
2790 -fdiagnostics-plain-output.
2792 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
2794 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
2795 option is used and fail unless --enable-cheaders-obsolete is
2797 * configure: Regenerate.
2799 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
2802 * include/bits/basic_string.h (operator=(basic_string&&)): Check
2803 for self-move before copying with char_traits::copy.
2804 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
2806 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
2807 Check for equal allocators.
2808 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
2809 Call clear() instead of _M_clear().
2810 * include/debug/formatter.h (__msg_self_move_assign): Change
2812 * include/debug/macros.h (__glibcxx_check_self_move_assign):
2813 (_GLIBCXX_DEBUG_VERIFY): Remove.
2814 * include/debug/safe_container.h (operator=(_Safe_container&&)):
2815 Remove assertion check for safe move and make it well-defined.
2816 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
2817 Remove assertion check for self-move.
2818 * include/debug/safe_local_iterator.h
2819 (operator=(_Safe_local_iterator&&)): Likewise.
2820 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
2821 * testsuite/23_containers/deque/cons/self_move.cc: New test.
2822 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
2823 * testsuite/23_containers/list/cons/self_move.cc: New test.
2824 * testsuite/23_containers/set/cons/self_move.cc: New test.
2825 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
2826 * testsuite/23_containers/vector/cons/self_move.cc: New test.
2828 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
2831 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
2832 to destroy in an intermediate forward_list.
2833 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
2834 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
2835 (list<>::remove_if): Likewise.
2836 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
2837 (forward_list<>::erase_after): Adapt.
2838 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
2839 destroy in an intermediate forward_list.
2840 (forward_list<>::unique): Likewise.
2841 * include/debug/list (list<>::remove, list<>::unique): Likewise.
2842 (list<>::remove_if): Likewise.
2843 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
2844 * testsuite/23_containers/list/operations/91620.cc: New test.
2846 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2848 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
2850 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2852 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2855 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
2856 (execution_context::mutex_type): Define dummy mutex type.
2857 (system_context): Use execution_context::mutex_type.
2858 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
2859 thread and condition variable types.
2860 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
2862 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
2863 an exception when threads aren't available.
2864 (strand::running_in_this_thread()): Defer to _M_state.
2865 (strand::_State::running_in_this_thread()): New function.
2866 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
2867 * include/experimental/io_context (io_context): Use the
2868 execution_context::mutex_type alias. Replace stack of thread
2870 * testsuite/experimental/net/execution_context/use_service.cc:
2871 Enable test for non-pthread targets.
2873 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2875 * include/experimental/executor (system_context::a__tag): Make
2876 default constructor explicit.
2878 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2880 * include/experimental/executor (system_context::_M_run()):
2882 * testsuite/experimental/net/system_context/1.cc: New test.
2884 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2886 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
2887 #ifdef instead of #if.
2888 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
2889 using __gthread_yield.
2891 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2893 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
2894 (this_thread::sleep_until): Define.
2895 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
2896 use of __gthread_time_t typedef with timespec.
2897 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
2899 * testsuite/30_threads/this_thread/2.cc: Moved to...
2900 * testsuite/30_threads/this_thread/yield.cc: ...here.
2901 * testsuite/30_threads/this_thread/3.cc: Moved to...
2902 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
2903 * testsuite/30_threads/this_thread/4.cc: Moved to...
2904 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
2905 * testsuite/30_threads/this_thread/58038.cc: Add
2907 * testsuite/30_threads/this_thread/60421.cc: Likewise.
2908 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
2909 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
2911 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2914 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
2915 of calling ::lstat directly.
2916 * src/filesystem/ops.cc (read_symlink): Likewise.
2918 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2920 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2921 Use gdb.Type.strip_typedefs().
2922 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
2923 the emulated old type.
2925 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2928 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
2929 $enable_libstdcxx_filesystem_ts.
2930 * configure: Regenerate.
2932 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2935 * include/bits/stl_iterator.h (inserter): Do not deduce
2936 iterator type (LWG 561).
2937 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
2939 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2941 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
2942 (basic_string::reserve()): Do nothing if exceptions are not
2945 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2948 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2949 (stat_type): Change to __stat64.
2950 (stat): Use _wstat64.
2952 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2955 * include/debug/bitset (bitset::operator==): Call _M_base() on
2957 (bitset::operator!=): Likewise, but don't define it at all when
2958 default comparisons are supported by the compiler.
2959 * testsuite/23_containers/bitset/operations/96303.cc: New test.
2961 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2963 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
2964 Replace VERIFY with static_assert where the compiler now
2966 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
2969 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2971 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
2973 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
2974 Jonathan Wakely <jwakely@redhat.com>
2976 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
2977 patterns for basic_string members.
2978 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
2979 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
2980 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
2981 (reserve(size_type)): Remove default argument.
2982 (reserve()): Declare new overload.
2983 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
2984 * include/bits/basic_string.tcc (reserve(size_type)): Remove
2985 support for shrinking capacity.
2986 (reserve()): Perform shrink-to-fit operation.
2987 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
2988 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
2989 reflect new behavior.
2990 * testsuite/21_strings/basic_string/capacity/char/1.cc:
2992 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
2994 * testsuite/21_strings/basic_string/capacity/char/2.cc:
2996 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
2998 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
3000 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
3003 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3005 * include/bits/basic_string.tcc
3006 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
3007 if extraction stopped after in.width() characters.
3008 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
3010 * include/bits/istream.tcc (__istream_extract): Do not set
3011 eofbit if extraction stopped after n-1 characters.
3012 * src/c++98/istream.cc (__istream_extract): Likewise.
3013 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
3014 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
3015 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
3016 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
3018 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3021 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
3022 immediately for non-symlinks.
3023 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
3025 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3027 * include/std/istream (operator>>(istream&, char*)): Add
3028 attributes to get warnings for pointers that are null or known
3029 to point to the end of a buffer. Request upper bound from
3030 __builtin_object_size check and handle zero-sized buffer case.
3031 (operator>>(istream&, signed char))
3032 (operator>>(istream&, unsigned char*)): Add attributes.
3033 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
3034 Check extracting into the middle of a buffer.
3035 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
3037 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3039 * include/std/atomic (atomic<T>::store): Reformat.
3041 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3043 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
3044 with LLVM repo for PSTL.
3045 * doc/html/manual/status.html: Regenerate.
3047 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3049 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
3050 * include/bits/istream.tcc (__istream_extract): New function
3051 template implementing both of operator>>(istream&, char*) and
3052 operator>>(istream&, char(&)[N]). Add explicit instantiation
3053 declaration for it. Remove explicit instantiation declarations
3054 for old function templates.
3055 * include/std/istream (__istream_extract): Declare.
3056 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
3057 call __istream_extract.
3058 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
3059 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
3060 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
3061 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
3063 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
3065 * include/std/streambuf (basic_streambuf): Declare char overload
3066 of __istream_extract as a friend.
3067 * src/c++11/istream-inst.cc: Add explicit instantiation
3068 definition for wchar_t overload of __istream_extract. Remove
3069 explicit instantiation definitions of old operator>> overloads
3070 for versioned-namespace build.
3071 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
3072 with __istream_extract(istream&, char*, streamsize).
3073 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
3074 Do not use variable-length array.
3075 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
3076 Do not run test for C++20.
3077 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
3078 Do not test writing to pointers for C++20.
3079 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
3080 Use array instead of pointer.
3081 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
3082 Do not use variable-length array.
3083 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
3084 Do not run test for C++20.
3085 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
3086 Do not test writing to pointers for C++20.
3087 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
3089 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
3091 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
3093 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
3095 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
3098 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
3100 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
3102 * doc/html/manual/using_exceptions.html: Regenerate.
3104 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
3106 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
3107 of oneAPI DPC++ Library on Github.
3108 * doc/html/manual/status.html: Regenerate.
3110 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
3112 * include/bits/stl_bvector.h
3113 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
3115 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
3116 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
3117 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
3118 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
3119 (_Bvector_impl_data::_M_reset()): Likewise.
3120 (_Bvector_impl_data::_M_swap_data): New.
3121 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
3122 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
3123 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
3125 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
3127 (vector::vector(vector&&, const allocator_type&, false_type)): New.
3128 (vector::vector(vector&&, const allocator_type&)): Use latters.
3129 (vector::vector(const vector&, const allocator_type&)): Adapt.
3130 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
3131 const allocator_type&)): Use _M_initialize_range.
3132 (vector::operator[](size_type)): Use iterator operator[].
3133 (vector::operator[](size_type) const): Use const_iterator operator[].
3134 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
3135 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
3136 _InputIt)): Use _M_insert_range.
3137 (vector::_M_initialize(size_type)): Adapt.
3138 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
3139 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
3140 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
3141 using start _M_offset.
3142 (StdVectorPrinter.to_string): Likewise.
3143 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
3144 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
3147 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3149 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
3151 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3154 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3156 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3157 Move struct to namespace scope.
3159 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3161 * testsuite/26_numerics/numbers/float128.cc: Check
3162 __STRICT_ANSI__ before using __float128.
3163 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
3166 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3168 * testsuite/18_support/set_terminate.cc: Require C++11 or
3170 * testsuite/28_regex/simple_c++11.cc: Likewise.
3171 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
3172 * testsuite/24_iterators/headers/iterator/synopsis.cc:
3173 Require C++14 or lower.
3175 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3177 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
3178 effective-target from xfail selector.
3179 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
3180 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
3181 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
3182 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
3183 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
3184 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
3185 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
3187 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
3189 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
3191 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
3193 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
3195 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
3197 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3199 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
3200 effective-target to specific language mode only.
3201 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
3203 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
3205 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
3207 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
3209 * testsuite/26_numerics/valarray/69116.cc:
3211 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
3212 Remove whitespace at end of file.
3213 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
3216 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3218 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
3219 c++17 effective-target.
3220 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
3222 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
3223 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
3225 * testsuite/17_intro/headers/c++2017/operator_names.cc:
3227 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
3228 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
3230 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
3232 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
3234 * testsuite/20_util/any/assign/1.cc: Likewise.
3235 * testsuite/20_util/any/assign/2.cc: Likewise.
3236 * testsuite/20_util/any/assign/emplace.cc: Likewise.
3237 * testsuite/20_util/any/assign/exception.cc: Likewise.
3238 * testsuite/20_util/any/assign/self.cc: Likewise.
3239 * testsuite/20_util/any/cons/1.cc: Likewise.
3240 * testsuite/20_util/any/cons/2.cc: Likewise.
3241 * testsuite/20_util/any/cons/aligned.cc: Likewise.
3242 * testsuite/20_util/any/cons/explicit.cc: Likewise.
3243 * testsuite/20_util/any/cons/in_place.cc: Likewise.
3244 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
3245 * testsuite/20_util/any/make_any.cc: Likewise.
3246 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
3247 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
3248 * testsuite/20_util/any/misc/swap.cc: Likewise.
3249 * testsuite/20_util/any/modifiers/1.cc: Likewise.
3250 * testsuite/20_util/any/observers/type.cc: Likewise.
3251 * testsuite/20_util/any/requirements.cc: Likewise.
3252 * testsuite/20_util/any/typedefs.cc: Likewise.
3253 * testsuite/20_util/as_const/1.cc: Likewise.
3254 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
3255 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
3256 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
3257 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
3259 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
3260 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
3262 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
3263 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
3264 * testsuite/20_util/function_objects/searchers.cc: Likewise.
3265 * testsuite/20_util/in_place/requirements.cc: Likewise.
3266 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
3268 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
3270 * testsuite/20_util/is_invocable/value.cc: Likewise.
3271 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
3273 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
3275 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
3277 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
3279 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
3280 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
3282 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
3284 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
3286 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
3288 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
3290 * testsuite/20_util/is_swappable/value.cc: Likewise.
3291 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
3293 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
3295 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
3296 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
3298 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
3300 * testsuite/20_util/logical_traits/value.cc: Likewise.
3301 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
3302 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
3303 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
3304 * testsuite/20_util/optional/hash.cc: Likewise.
3305 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
3306 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
3307 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
3309 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
3311 * testsuite/20_util/tuple/apply/1.cc: Likewise.
3312 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
3313 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
3314 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
3315 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
3317 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
3319 * testsuite/20_util/variant/any.cc: Likewise.
3320 * testsuite/20_util/variant/compile.cc: Likewise.
3321 * testsuite/20_util/variant/hash.cc: Likewise.
3322 * testsuite/20_util/variant/index_type.cc: Likewise.
3323 * testsuite/20_util/variant/run.cc: Likewise.
3324 * testsuite/20_util/void_t/1.cc: Likewise.
3325 * testsuite/21_strings/basic_string/79162.cc: Likewise.
3326 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
3327 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
3328 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
3329 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
3330 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
3332 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
3334 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
3336 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
3338 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
3340 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
3342 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
3344 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
3346 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
3348 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
3350 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
3352 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
3354 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
3356 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
3358 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
3359 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
3361 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
3362 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
3363 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
3364 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
3365 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
3367 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
3369 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
3371 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
3373 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
3375 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3377 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
3379 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
3381 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
3383 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
3385 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
3387 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
3388 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
3390 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
3392 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
3394 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
3396 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
3398 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
3400 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
3402 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3404 * testsuite/21_strings/basic_string_view/literals/types.cc:
3406 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
3408 * testsuite/21_strings/basic_string_view/literals/values.cc:
3410 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
3412 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
3414 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
3416 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
3418 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
3420 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
3422 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
3424 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
3426 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
3428 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
3430 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
3432 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
3434 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
3436 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
3438 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
3440 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
3442 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
3444 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
3446 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
3448 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
3450 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
3452 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
3454 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
3456 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
3458 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
3460 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
3462 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
3464 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
3466 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
3468 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
3470 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
3472 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
3474 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
3476 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
3478 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
3480 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
3482 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
3484 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3486 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
3487 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
3488 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3490 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
3491 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3493 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
3494 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3495 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3496 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
3497 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3498 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
3499 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3500 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
3501 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3503 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
3505 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
3507 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
3509 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3511 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
3513 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3515 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
3517 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3519 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
3521 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
3523 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
3525 * testsuite/25_algorithms/clamp/1.cc: Likewise.
3526 * testsuite/25_algorithms/clamp/2.cc: Likewise.
3527 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
3528 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
3530 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
3532 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
3534 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3536 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
3538 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
3539 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3541 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
3542 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
3543 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
3545 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
3547 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
3549 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
3550 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
3551 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
3553 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3556 * include/bits/stl_iterator.h (reverse_iterator): Friend
3557 declaration should not depend on __cplusplus.
3559 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3561 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
3562 Remove -std=gnu++17 option.
3564 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3566 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
3567 definition of aggregates in C++20.
3568 * testsuite/20_util/optional/requirements.cc: Adjust for
3569 defaulted comparisons in C++20.
3571 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3573 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
3574 deprecation of volatile-qualified structured bindings in C++20.
3575 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
3576 for deprecation of is_pod in C++20
3578 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3580 * testsuite/20_util/time_point_cast/rounding.cc: Remove
3581 duplicate dg-do directive and add c++17 effective target.
3583 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3585 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
3586 LC_ALL_MASK not LC_ALL.
3588 2020-07-31 Richard Biener <rguenther@suse.de>
3591 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
3593 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3595 * include/bits/basic_string.h (size_type, difference_type):
3596 Use allocator_traits to obtain the allocator's size_type and
3599 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3602 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
3604 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
3607 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3609 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3610 Use allocator with the correct value type.
3611 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3614 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3616 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
3619 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3621 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
3623 (__detail::__integral_nonbool): Likewise.
3624 (__detail::__is_integer_like): Use __integral_nonbool.
3625 * testsuite/std/ranges/access/lwg3467.cc: New test.
3627 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3629 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
3630 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
3632 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3634 * testsuite/23_containers/vector/bool/72847.cc: Use the
3635 exceptions_enabled effective-target keyword instead of
3636 checking for an explicit -fno-exceptions option.
3637 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
3638 redundant try-catch.
3639 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
3640 Do not define check_allocate_max_size and memory_resource.
3641 * testsuite/util/testsuite_containers.h: Replace comment with
3642 #error if wrong standard dialect used.
3643 * testsuite/util/testsuite_shared.cc: Likewise.
3645 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3647 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
3648 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
3650 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
3652 (_Local_iterator_base<>): Inherits _Node_iterator_base.
3653 (_Local_iterator_base<>::_M_cur): Remove.
3654 (_Local_iterator_base<>::_M_curr()): Remove.
3655 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
3657 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
3659 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
3660 (unordered_multimap<>::_M_invalidate): Adapt.
3661 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
3662 (unordered_multiset<>::_M_invalidate): Adapt.
3664 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
3665 Jonathan Wakely <jwakely@redhat.com>
3666 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3668 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
3669 target powerpc-ibm-aix* and powerpc*-*-darwin*.
3670 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
3673 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3675 * include/bits/hashtable.h
3676 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
3677 Add noexcept qualification.
3678 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
3679 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
3681 * include/bits/unordered_map.h
3682 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
3684 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3686 * include/bits/unordered_set.h
3687 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3688 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3690 * include/debug/unordered_map
3691 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
3692 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3694 * include/debug/unordered_set
3695 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3696 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3698 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
3700 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
3702 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
3704 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
3706 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
3708 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
3710 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3712 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
3714 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
3716 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3718 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
3721 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
3723 * include/bits/hashtable.h
3724 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3725 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3726 const allocator_type&, true_type)): New.
3727 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3728 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3729 const allocator_type&, false_type)): New.
3730 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3731 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3732 const allocator_type&)): Delegate to latters.
3733 (operator=(initializer_list<value_type>)): Rehash if too small.
3734 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
3735 size_t len parameter.
3736 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
3737 Do not try to get input range distance.
3738 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
3739 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
3741 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
3743 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
3745 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
3746 (_Hashtable_base<>::_M_node_equals): New, use latter.
3747 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
3748 _RehashPolicy, false>::_M_equal): Adapt to use latter.
3749 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
3750 (_Hashtable<>::_M_assign): Use latter.
3751 (_Hashtable<>::_M_move_assign): Likewise.
3752 (_Hashtable<>(_Hashtable<>&&)): Likewise.
3753 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
3754 (_Hashtable<>::swap): Likewise.
3755 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
3756 (_Hashtable<>::count): Use _Hashtable<>::find.
3757 (_Hashtable<>::equal_range): Likewise.
3758 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
3761 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
3763 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
3764 that FE_NEAREST is used.
3765 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
3766 a { target c++14 } test.
3767 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
3768 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
3770 * testsuite/20_util/from_chars/6.cc: New test.
3772 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3774 * include/std/future (future, shared_future, promise): Add
3775 static assertions to the primary template to reject array and
3777 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
3778 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
3779 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
3781 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3783 * include/bits/stl_iterator.h (reverse_iterator): Constrain
3784 converting constructor and converting assignment operator.
3785 Access source iterator's data member directly instead of
3787 (move_iterator): Likewise.
3788 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
3789 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
3791 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3793 * acinclude.m4 (libtool_VERSION): Bump version.
3794 * config.h.in: Regenerate.
3795 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
3797 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
3798 version and new export.
3799 * configure: Regenerate.
3800 * configure.ac: Check for <xlocale.h> and uselocale.
3801 * crossconfig.m4: Add macro or checks for uselocale.
3802 * include/std/charconv (from_chars): Declare overloads for
3803 float, double, and long double.
3804 * src/c++17/Makefile.am: Add new file.
3805 * src/c++17/Makefile.in: Regenerate.
3806 * src/c++17/floating_from_chars.cc: New file.
3807 (from_chars): Define for float, double, and long double.
3808 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
3809 diagnostics caused by new overloads.
3810 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
3811 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
3812 * testsuite/20_util/from_chars/4.cc: New test.
3813 * testsuite/20_util/from_chars/5.cc: New test.
3814 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
3816 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3818 * include/bits/istream.tcc
3819 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
3820 long long for counter and check if it would overflow _M_gcount.
3821 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
3822 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
3824 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
3826 * include/std/coroutine: Mark the methods of the
3827 trivial awaitables as constexpr.
3829 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
3831 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
3833 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
3837 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
3838 [n == max]: Check overflow conditions on _M_gcount. Rely on
3839 the fact that either EOF or the delimiter was reached.
3840 [n < max]: Check _M_gcount < n before checking for EOF or
3842 (basic_istream::ignore(streamsize, char_type): Likewise.
3843 * src/c++98/compatibility.cc (istream::ignore(streamsize))
3844 (wistream::ignore(streamsize)): Likewise.
3845 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
3846 (wistream::ignore(streamsize, char_type)): Likewise.
3847 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
3848 delimiter is discarded if the number of characters ignored
3849 doesn't fit in streamsize.
3850 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3852 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
3853 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
3855 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
3857 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
3858 qualification based only on _Compare one.
3859 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
3861 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
3863 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
3865 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
3867 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3869 * include/std/limits: Whitespace changes.
3871 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3873 * include/Makefile.am: Remove bits/int_limits.h.
3874 * include/Makefile.in: Regenerate.
3875 * include/bits/int_limits.h: Removed.
3876 * include/bits/parse_numbers.h (_Select_int_base): Replace
3877 __int_limits with __int_traits.
3878 * include/bits/range_access.h (_SSize::operator()): Likewise.
3879 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
3881 (__int_traits): New alias template.
3882 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
3883 (__countr_zero, __countr_one, __popcount, __bit_ceil)
3884 (__bit_floor, __bit_width) Replace __int_limits with
3886 * include/std/charconv (__to_chars_8, __from_chars_binary)
3887 (__from_chars_alpha_to_num, from_chars): Likewise.
3888 * include/std/memory_resource (polymorphic_allocator::allocate)
3889 (polymorphic_allocator::allocate_object): Likewise.
3890 * include/std/string_view (basic_string_view::_S_compare):
3892 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
3894 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3896 * include/std/limits: Whitespace changes.
3898 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3900 * include/std/optional (_Optional_payload_base, _Optional_base)
3901 (optional, __optional_hash_call_base): Adjust whitespace and
3902 other formatting. Remove redundant && tokens on template
3903 arguments to type traits.
3905 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3907 * include/std/optional (make_optional): Add enable_if
3908 constraints and noexcept-specifier to each overload.
3909 * testsuite/20_util/optional/make_optional-2.cc: New test.
3911 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3914 * include/std/optional (optional): Add noexcept-specifier to
3915 every constructor, assignment operator, emplace function and
3916 dereference operator.
3917 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
3918 * testsuite/20_util/optional/cons/noexcept.cc: New test.
3920 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3923 * include/bits/fs_dir.h: Use consistent tag in class-head.
3924 * include/bits/localefwd.h: Likewise.
3925 * include/bits/regex.h: Likewise.
3926 * include/bits/stl_map.h: Likewise.
3927 * include/bits/stl_multimap.h: Likewise.
3928 * include/bits/stl_multiset.h: Likewise.
3929 * include/bits/stl_set.h: Likewise.
3930 * include/std/complex: Likewise.
3931 * include/std/functional: Likewise.
3932 * include/std/future: Likewise.
3933 * include/std/system_error: Likewise.
3934 * include/std/thread: Likewise.
3935 * include/std/tuple: Likewise.
3936 * include/std/type_traits: Likewise.
3937 * include/std/valarray: Likewise.
3939 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3941 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
3944 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3946 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
3947 c++98_only target selector.
3948 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
3950 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
3952 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
3953 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
3955 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
3957 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
3959 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
3961 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
3963 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
3965 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
3967 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
3969 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
3971 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
3973 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
3975 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
3976 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
3977 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
3979 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
3981 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
3983 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
3984 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
3987 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3990 * include/std/variant
3991 (_Copy_assign_base::operator=(const _Copy_assign_base&):
3992 Do the move-assignment from a temporary so that the temporary
3993 is constructed with an explicit index.
3994 * testsuite/20_util/variant/91807.cc: New.
3996 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4000 * testsuite/29_atomics/atomic_float/1.cc: Use different values
4002 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
4004 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
4007 * include/bits/regex.h (operator==, operator!=): Remove noexcept
4008 equality comparisons for match_results.
4009 * testsuite/28_regex/match_results/94627.cc: New test.
4011 2020-07-01 Martin Sebor <msebor@redhat.com>
4013 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
4014 text of expected warning.
4015 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
4016 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
4017 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
4018 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
4020 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
4023 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4025 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
4026 Add a __nonnull__ attribute.
4027 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
4028 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
4030 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4032 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
4033 Add a __nonnull__ attribute.
4034 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
4035 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
4037 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4040 * include/std/type_traits (is_literal_type, is_literal_type_v):
4042 * include/std/variant (_Uninitialized):
4043 Adjust the condition and the comment.
4044 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
4045 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
4047 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
4048 * testsuite/20_util/is_literal_type/value.cc: Likewise.
4049 * testsuite/20_util/optional/constexpr/nullopt.cc:
4050 Use __is_literal_type directly.
4051 * testsuite/20_util/optional/nullopt.cc: Likewise.
4052 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
4053 * testsuite/20_util/variant/95915.cc: New.
4054 * testsuite/20_util/variant/compile.cc: Add new test.
4055 * testsuite/experimental/optional/constexpr/nullopt.cc:
4056 Use __is_literal_type directly.
4057 * testsuite/experimental/optional/nullopt.cc: Likewise.
4058 * testsuite/experimental/type_traits/value.cc: Adjust.
4059 * testsuite/util/testsuite_common_types.h:
4060 Use __is_literal_type directly.
4062 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4064 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
4065 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
4067 * testsuite/20_util/from_chars/3.cc: New test.
4069 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4071 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
4072 * include/std/charconv (__detail::__to_chars): Avoid
4073 -Wsign-compare warning.
4075 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4078 * include/std/charconv (__to_chars_i): Check for zero-sized
4079 buffer unconditionally.
4080 * testsuite/20_util/to_chars/95851.cc: New test.
4082 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4084 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
4086 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
4087 directives outside preprocessor condition.
4089 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4092 * include/std/variant (__detail::__variant::_Build_FUN): Remove
4093 partial specialization to prevent narrowing conversions to bool.
4094 * testsuite/20_util/variant/compile.cc: Test non-narrowing
4095 conversions to bool.
4096 * testsuite/20_util/variant/run.cc: Likewise.
4098 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4100 * doc/Makefile.in: Regenerate.
4101 * include/Makefile.in: Regenerate.
4102 * libsupc++/Makefile.in: Regenerate.
4103 * po/Makefile.in: Regenerate.
4104 * python/Makefile.in: Regenerate.
4105 * src/Makefile.in: Regenerate.
4106 * src/c++11/Makefile.in: Regenerate.
4107 * src/c++17/Makefile.in: Regenerate.
4108 * src/c++98/Makefile.in: Regenerate.
4109 * src/filesystem/Makefile.in: Regenerate.
4110 * testsuite/Makefile.in: Regenerate.
4112 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
4114 * Makefile.am: Use -include.
4115 * Makefile.in: Regenerate.
4117 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
4119 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
4120 * Makefile.in: Regenerate.
4121 * configure.ac (tmake_file): Substitute.
4122 * configure: Regenerate.
4123 * configure.host (aix*): Define tmake_file.
4124 * config/os/aix/t-aix: New file.
4126 2020-06-20 Jason Merrill <jason@redhat.com>
4128 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
4129 Remove greedy_ops tests.
4130 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
4131 Remove greedy_ops tests.
4133 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4136 * include/bits/stl_algobase.h (__size_to_integer(float))
4137 (__size_to_integer(double), __size_to_integer(long double))
4138 (__size_to_integer(__float128)): Cast return type explicitly.
4139 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
4140 Remove unused typedef.
4142 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4144 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
4145 namespace qualification.
4146 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
4148 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
4149 (tuple_element, __get_helper, get, __make_tuple_impl)
4150 (__make_1st_indices, __tuple_concater)
4151 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
4153 * include/std/utility (tuple_element, __is_tuple_like_impl)
4154 (tuple_size, __pair_get, get): Likewise.
4156 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4158 * include/bits/std_function.h (function): Define all member
4161 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
4163 * include/bits/stl_algo.h (__includes): Simplify the code.
4165 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
4167 * include/std/optional (optional()): Explicitly define it.
4169 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
4172 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
4173 Construct the first value at *__first instead of on the stack.
4174 (__uninitialized_default_n_1<true>): Likewise.
4175 Improve comments on several of the non-standard algorithms.
4176 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
4178 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
4180 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
4182 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
4184 * testsuite/23_containers/vector/cons/94540.cc: New test.
4186 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
4188 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
4189 Replace Value type with int so trivial code path is used.
4190 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
4193 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
4195 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
4196 use std::fill_n when the size is an integral type.
4197 (__uninitialized_default_n): Likewise.
4198 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
4200 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
4202 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
4205 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
4208 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
4209 alias instead of deducing _Tp as an unqualified type.
4210 (__atomic_impl::exchange): Use the _Val alias to remove volatile
4211 from the reinterpret_cast result type.
4213 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
4215 * include/std/atomic (atomic): Add static assertions.
4216 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
4218 2020-06-16 Patrick Palka <ppalka@redhat.com>
4221 * testsuite/20_util/is_constructible/94003.cc: New test.
4223 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
4225 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
4226 Update value for C++20.
4227 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
4228 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
4229 Update expected value.
4230 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
4233 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
4235 * include/bits/char_traits.h (char_traits::move): constexpr move with
4236 overlap was using copy_backward incorrectly.
4237 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
4240 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
4242 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
4243 when the value is currently set.
4244 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
4245 Actually check the return value.
4246 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
4249 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
4251 * include/bits/atomic_base.h (atomic_flag::test): Add missing
4253 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
4254 dg-options and verify results of test function.
4255 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
4257 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
4260 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
4261 Only discard an extra character if we didn't already reach the
4263 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
4264 (wistream::ignore(streamsize, wchar_t)): Likewise.
4265 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
4266 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
4268 2020-06-10 Patrick Palka <ppalka@redhat.com>
4271 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
4272 Also check that the iterator and sentinel have the same type before
4273 applying the unwrapping optimization for __normal_iterator.
4274 Split the check into two, one for the first iterator/sentinel
4275 pair and another for second iterator/sentinel pair. Remove uses
4276 of __niter_base, and remove uses of std::move on a
4278 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
4279 (__copy_or_move): Likewise. Perform similar adjustments for
4280 the reverse_iterator and move_iterator optimizations. Inline
4281 the checks into the if-constexprs, and use using-declarations to
4282 make them less visually noisy. Remove uses of __niter_wrap.
4283 (__copy_or_move_backward): Likewise.
4284 * testsuite/25_algorithms/copy/95578.cc: New test.
4285 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
4286 * testsuite/25_algorithms/equal/95578.cc: New test.
4287 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
4288 * testsuite/25_algorithms/move/95578.cc: New test.
4289 * testsuite/25_algorithms/move_backward/95578.cc: New test.
4291 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
4292 Jonathan Wakely <jwakely@redhat.com>
4294 * include/bits/deque.tcc (__lex_cmp_dit): New.
4295 (__lexicographical_compare_aux1): Define overloads for deque
4297 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
4298 New static member function.
4299 (__lexicographical_compare<true>::__3way): Likewise.
4300 (__lexicographical_compare<true>::__lc): Use __3way.
4301 (__lexicographical_compare_aux): Rename to
4302 __lexicographical_compare_aux1 and declare overloads for deque
4304 (__lexicographical_compare_aux): Define new forwarding function
4305 that calls __lexicographical_compare_aux1 and declare new overloads
4307 (lexicographical_compare): Do not use __niter_base on
4309 * include/debug/safe_iterator.tcc
4310 (__lexicographical_compare_aux): Define overloads for safe
4312 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
4313 checks with random access iterators.
4314 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
4317 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
4319 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
4320 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
4322 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
4324 * include/std/optional (bad_optional_access): Define default
4325 constructor and destructor as defaulted.
4326 * testsuite/20_util/optional/bad_access.cc: New test.
4328 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
4330 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
4332 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4334 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
4336 * include/bits/unique_ptr.h (operator<<): Define for C++20.
4337 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
4339 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
4341 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
4342 (__detail::__cat, __detail::__diff): Move to class scope in the
4343 relevant __iterator_traits specializations.
4344 (__iterator_traits<>): Use nested class templates instead of ones from
4346 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
4347 class scope in iterator_traits<common_iterator<I, S>>.
4348 (iterator_traits<common_iterator<I, S>>): Use nested class template
4349 instead of __detail::__common_iter_ptr.
4351 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
4353 * include/bits/stl_algo.h (__copy_n_a): Move to ...
4354 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
4356 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
4358 (__niter_base(const _Safe_iterator<_Ite, _Seq,
4359 random_access_iterator_tag>&)): Declare.
4360 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
4361 _Deque_iterator<>)): Declare.
4362 * include/bits/deque.tcc
4363 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
4364 _Deque_iterator<>)): New.
4365 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
4367 * include/bits/streambuf_iterator.h
4368 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
4369 * include/debug/safe_iterator.tcc (__niter_base): New.
4370 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
4372 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
4374 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
4376 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
4377 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
4380 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
4382 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
4383 ranges::copy for positive values.
4384 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
4385 integral type and only call __copy_n for positive values.
4386 * testsuite/util/testsuite_iterators.h
4387 (random_access_iterator_wrapper::operator+=): Fix range check for
4389 (output_container, input_container, forward_container)
4390 (bidirectional_container, random_access_container): New alias
4392 * testsuite/25_algorithms/copy_n/5.cc: New test.
4394 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
4397 * include/debug/deque (deque(const _Base&)): Replace parameter
4398 with a struct that wraps a const _Base&.
4399 * include/debug/forward_list (forward_list(_Base_ref)): New
4401 * include/debug/list (list(const _Base&)): Replace parameter
4402 with a struct that wraps a const _Base&.
4403 * include/debug/map.h (map(const _Base&)): Likewise.
4404 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
4405 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
4406 * include/debug/set.h (set(const _Base&)): Likewise.
4407 * include/debug/unordered_map (unordered_map(const _Base&))
4408 (unordered_multimap(const _Base&)): Likewise.
4409 * include/debug/unordered_set (unordered_set(const _Base&))
4410 (unordered_multiset(const _Base&)): Likewise.
4411 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
4412 Adjust dg-error line number.
4413 * include/debug/vector (vector(const _Base&)): Likewise.
4414 * testsuite/23_containers/deque/debug/90102.cc: New test.
4415 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
4416 * testsuite/23_containers/list/debug/90102.cc: New test.
4417 * testsuite/23_containers/map/debug/90102.cc: New test.
4418 * testsuite/23_containers/multimap/debug/90102.cc: New test.
4419 * testsuite/23_containers/multiset/debug/90102.cc: New test.
4420 * testsuite/23_containers/set/debug/90102.cc: New test.
4421 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
4422 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
4423 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
4424 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
4425 * testsuite/23_containers/vector/debug/90102.cc: New test.
4427 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4430 * include/bits/fs_path.h (path::_S_to_string): Move to
4431 namespace-scope and rename to ...
4432 (__detail::__string_from_range): ... this.
4433 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
4434 convert a char sequence containing UTF-8 to wstring.
4435 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
4436 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
4437 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
4438 __string_from_range to obtain a contiguous range and
4439 __wstr_from_utf8 to obtain a wide string.
4440 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
4441 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
4443 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
4444 Use __wstr_from_utf8.
4446 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4448 * testsuite/util/testsuite_iterators.h:
4449 (input_iterator_wrapper::operator++(int)): Return proxy object.
4451 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4453 * doc/xml/manual/evolution.xml: Document deprecation of
4454 __is_nullptr_t and removal of std::allocator members.
4455 * doc/html/manual/api.html: Regenerate.
4457 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4459 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
4460 * doc/xml/manual/evolution.xml: Likewise.
4461 * doc/html/manual/api.html: Regenerate.
4462 * doc/html/manual/containers.html: Regenerate.
4464 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4466 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
4467 * doc/html/faq.html: Regenerate.
4469 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4471 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
4474 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4476 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
4477 www.cs.princeton.edu to https.
4478 * doc/html/manual/policy_data_structures.html: Regenerate.
4480 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
4482 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
4483 * configure: Rebuild.
4485 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
4488 * configure: Regenerated.
4490 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
4493 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
4494 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
4495 (unordered_map<>::insert_or_assign): Adapt.
4497 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4500 * include/bits/atomic_base.h (__atomic_impl::load): Add
4501 cv-qualifiers to parameter so that _Tp is deduced as the
4503 * testsuite/29_atomics/atomic_float/95282.cc: New test.
4505 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4508 * include/std/ranges (transform_view::_Sentinel): Allow hidden
4509 friends to work with _Iterator<true> and _Iterator<false>.
4510 (join_view::_Sentinel): Likewise.
4511 * testsuite/std/ranges/adaptors/95322.cc: New test.
4513 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4516 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
4517 operators to use the correct operations on the underlying
4519 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
4521 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4523 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
4525 2020-05-26 Patrick Palka <ppalka@redhat.com>
4528 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
4529 Remove and instead define it ...
4530 (common_iterator::_Proxy): ... here.
4531 (common_iterator::operator->): Use it.
4532 * testsuite/24_iterators/common_iterator/2.cc: New test.
4533 * testsuite/std/ranges/adaptors/95322.cc: New test.
4535 2020-05-23 Patrick Palka <ppalka@redhat.com>
4538 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
4539 dg-additional-options. Avoid unused-but-set-variable warning.
4541 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
4544 * include/debug/helper_functions.h (__get_distance): Only declare
4545 as a constexpr function for C++14 and up.
4546 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
4548 * include/bits/fs_path.h (__detail::_S_range_begin)
4549 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
4550 overloaded function template __detail::__effective_range.
4551 (__detail::__effective_range): New overloaded function template to
4552 create a basic_string or basic_string_view for an effective range.
4553 (__detail::__value_type_is_char): Use __detail::__effective_range.
4554 Do not use remove_const on value type.
4555 (__detail::__value_type_is_char_or_char8_t): Likewise.
4556 (path::path(const Source&, format))
4557 (path::path(const Source&, const locale&))
4558 (path::operator/=(const Source&), path::append(const Source&))
4559 (path::concat(const Source&)): Use __detail::__effective_range.
4560 (path::_S_to_string(InputIterator, InputIterator)): New function
4561 template to create a string view if possible, or string otherwise.
4562 (path::_S_convert): Add overloads that convert a string returned
4563 by __detail::__effective_range. Use if-constexpr to inline conversion
4564 logic from all overloads of _Cvt::_S_convert.
4565 (path::_S_convert_loc): Add overload that converts a string. Use
4566 _S_to_string to avoid allocation when possible.
4567 (path::_Cvt): Remove.
4568 (path::operator+=(CharT)): Remove indirection through path::concat.
4569 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
4570 overload for non-const pointers, to avoid constructing a std::string.
4571 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
4572 compilation with call to _S_convert.
4574 * include/bits/fs_path.h (__detail::_S_range_begin)
4575 (__detail::_S_range_end): Remove unintentional static specifiers.
4576 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
4577 (__detail::_S_range_end): Likewise.
4579 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
4580 Replace alias template with variable template. Don't remove const.
4581 (filesystem::__detail::__is_path_src): Replace overloaded function
4582 template with variable template and specializations.
4583 (filesystem::__detail::__is_path_iter_src): Replace alias template
4584 with class template.
4585 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
4587 (filesystem::__detail::_Path2): New alias template for checking
4588 InputIterator requirements.
4589 (filesystem::__detail::__constructible_from): Remove.
4590 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
4591 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
4592 constructor arguments of void and void* types.
4594 2020-05-21 Matthias Kretz <kretz@kde.org>
4596 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
4597 allowing runtest to work without arguments.
4598 * testsuite/Makefile.in: Regenerate.
4600 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
4603 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
4604 Reorder constraints to avoid recursion when constructors use
4605 iterator_traits (LWG 3420).
4606 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
4608 * include/experimental/socket (basic_socket::is_open()
4609 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
4611 * include/experimental/bits/net.h (__endpoint, __protocol)
4612 (__acceptable_protocol, __inet_protocol): New concepts.
4613 (__detail::__is_endpoint): Move trait from <experimental/socket>.
4614 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
4616 (__endpoint, __protocol, __acceptable_protocol): New variable
4618 * include/experimental/socket (__is_endpoint): Move to net.h header.
4619 (basic_socket, basic_socket_acceptor): Check requirements.
4621 * include/experimental/executor (use_future_t::use_future_t()): Fix
4622 incorrect noexcept-specifier.
4623 * include/experimental/internet (basic_resolver_results): Adjust
4625 * include/experimental/socket (__basic_socket_impl::release): Add
4627 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
4629 (basic_socket::release(), basic_socket::release(error_code&)): Add
4630 missing member functions.
4631 (basic_socket::is_open()): Add nodiscard attribute.
4632 (basic_socket::close(error_code&)): Pass argument to base function.
4633 (basic_socket_acceptor::release())
4634 (basic_socket_acceptor::release(error_code&)): Add missing member
4636 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
4637 (basic_socket_streambuf::error()): Add noexcept.
4638 (basic_socket_iostream::error()): Likewise.
4639 * testsuite/experimental/net/socket/basic_socket.cc: New test.
4641 * include/experimental/buffer: Replace typedefs with
4643 * include/experimental/executor: Likewise.
4644 * include/experimental/internet: Likewise.
4645 * include/experimental/socket: Likewise.
4646 * include/experimental/timer: Likewise.
4648 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
4651 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
4653 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
4655 (random_device::_M_init): Use __x86_rdseed_rdrand when both
4656 instructions are available.
4657 * testsuite/26_numerics/random/random_device/94087.cc: New test.
4659 2020-05-19 Patrick Palka <ppalka@redhat.com>
4662 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
4664 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
4666 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
4669 * configure: Regenerated.
4671 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
4673 * configure: Regenerated.
4675 2020-05-13 Alexandre Oliva <oliva@adacore.com>
4678 * include/experimental/memory_resource
4679 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
4680 x86-vxworks as on x86-solaris.
4681 (__resource_adaptor_imp::do_deallocate): Likewise.
4682 * testsuite/experimental/memory_resource/new_delete_resource.cc:
4684 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
4685 (test03): Drop max-align test for char-aligned alloc.
4687 2020-05-08 Ulrich Drepper <drepper@redhat.com>
4689 * include/bits/atomic_base.h (atomic_flag): Implement test member
4691 * include/std/version: Define __cpp_lib_atomic_flag_test.
4692 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
4693 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
4695 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
4697 PR libstdc++/94971 (partial)
4698 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
4699 std::sample using macro to work in parallel mode.
4700 (__sort_fn): Likewise for std::sort.
4701 (ranges::__nth_element_fn): Likewise for std::nth_element.
4702 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
4703 Likewise for std::__min_cmp.
4704 * include/parallel/algobase.h (lexicographical_compare_three_way):
4705 Add to namespace std::__parallel.
4708 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
4709 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
4710 (_UnguardedIterator::operator _RAIter): Add const qualifier.
4711 (operator<(_GuardedIterator&, _GuardedIterator&)
4712 (operator<=(_GuardedIterator&, _GuardedIterator&)
4713 (operator<(_UnguardedIterator&, _UnguardedIterator&)
4714 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
4715 parameters to const references.
4717 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
4719 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
4720 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4722 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
4724 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
4725 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
4726 * include/bits/stl_bvector.h (__fill_bvector): Move outside
4727 _GLIBCXX_STD_C namespace.
4728 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
4730 (__fill_a1): ...this.
4731 * testsuite/25_algorithms/fill/bvector/1.cc: New.
4733 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
4735 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4737 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4739 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
4740 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
4742 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
4743 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
4746 2020-05-06 Martin Liska <mliska@suse.cz>
4749 2020-05-05 Martin Liska <mliska@suse.cz>
4751 * include/parallel/multiway_merge.h:
4752 Use const for _Compare template argument.
4754 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
4756 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
4757 versions for GCC 9.[123] and 10.1 releases.
4758 * doc/html/*: Regenerate.
4760 2020-05-06 Jakub Jelinek <jakub@redhat.com>
4762 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
4763 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
4764 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4765 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
4766 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
4767 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
4768 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
4770 2020-05-05 Martin Liska <mliska@suse.cz>
4773 * include/parallel/multiway_merge.h:
4774 Use const for _Compare template argument.
4776 2020-05-04 Fangrui Song <maskray@google.com>
4778 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
4780 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4782 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
4783 * doc/html/*: Regenerate.
4786 * src/c++17/memory_resource.cc
4787 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
4790 2020-05-04 Nathan Sidwell <nathan@acm.org>
4793 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
4794 ptrdiff_t before negation, to show intent more clearly.
4796 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4799 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
4800 Add comment about single-threaded behaviour.
4801 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
4802 class member access out of loop.
4803 (synchronized_pool_resource::synchronized_pool_resource())
4804 (synchronized_pool_resource::~synchronized_pool_resource())
4805 (synchronized_pool_resource::release()): Check __gthread_active_p
4806 before creating and/or deleting the thread-specific data key.
4807 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
4809 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
4810 path for single-threaded case.
4811 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
4812 Likewise. Return if unable to find a pool that owns the allocation.
4813 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
4815 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
4817 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
4820 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
4823 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
4824 usable in constant expressions.
4825 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
4828 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4831 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
4833 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4834 Patrick Palka <ppalka@redhat.com>
4837 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
4838 Add trait to determine return type and an alias for it.
4839 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
4840 deduced return type.
4841 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
4842 the result of ranges::iter_move.
4843 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
4844 instead of checking the result of ranges::iter_move.
4845 * testsuite/24_iterators/customization_points/92894.cc: New test.
4846 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
4848 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4851 * include/std/type_traits (__is_complete_or_unbounded): Replace
4852 BADNAME _T with _Tp.
4853 * testsuite/17_intro/badnames.cc: New test.
4855 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
4858 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
4859 (allocator_traits::_S_destroy)
4860 (allocator_traits<allocator<T>>::construct): Use traits in
4861 noexcept-specifiers.
4862 * include/bits/allocator.h (allocator<void>::construct)
4863 (allocator<void>::destroy): Likewise.
4864 * include/ext/malloc_allocator.h (malloc_allocator::construct)
4865 (malloc_allocator::destroy): Likewise.
4866 * include/ext/new_allocator.h (new_allocator::construct)
4867 (new_allocator::destroy): Likewise.
4868 * testsuite/20_util/allocator/89510.cc: New test.
4869 * testsuite/ext/malloc_allocator/89510.cc: New test.
4870 * testsuite/ext/new_allocator/89510.cc: New test.
4872 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
4875 * include/bits/basic_string.tcc: Update comment about explicit
4878 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4881 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
4882 Remove non-standard macro.
4883 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
4884 to indicate P1032R1 support.
4885 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
4886 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
4887 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
4888 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
4889 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
4890 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
4891 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
4893 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
4894 * testsuite/21_strings/basic_string_view/operations/copy/char/
4895 constexpr.cc: Likewise.
4896 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
4899 * include/bits/alloc_traits.h (_S_construct): Restore placement
4900 new-expression for C++11/14/17 and call std::construct_at directly
4902 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
4903 function returning void.
4904 * testsuite/20_util/specialized_algorithms/
4905 uninitialized_value_construct/94831.cc: New test.
4906 * testsuite/23_containers/vector/cons/94831.cc: New test.
4908 2020-04-28 Patrick Palka <ppalka@redhat.com>
4910 LWG 3433 subrange::advance(n) has UB when n < 0
4911 * include/std/ranges (subrange::prev): Fix typo.
4912 (subrange::advance): Handle a negative argument as per the proposed
4913 resolution of LWG 3433.
4914 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
4916 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4917 Iain Sandoe <iain@sandoe.co.uk>
4920 * include/std/coroutine: Implement handing for non-
4921 class coroutine return types.
4923 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
4925 * include/experimental/executor (service_already_exists): Make default
4926 constructor public (LWG 3414).
4927 * testsuite/experimental/net/execution_context/make_service.cc: Check
4928 the service_already_exists can be default constructed.
4930 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
4931 Jonathan Wakely <jwakely@redhat.com>
4935 * include/std/any (any): Rename template parameters for consistency
4937 (any::_Decay): Rename to _Decay_if_not_any.
4938 (any::any(T&&):: Remove is_constructible from constraints. Remove
4939 non-standard overload.
4940 (any::any(in_place_type_t<T>, Args&&...))
4941 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
4942 (any::emplace(Args&&...))
4943 (any::emplace(initializer_list<U>, Args&&...)):
4944 Use decay_t instead of _Decay.
4945 * testsuite/20_util/any/cons/90415.cc: New test.
4946 * testsuite/20_util/any/cons/92156.cc: New Test.
4947 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
4949 * testsuite/20_util/any/modifiers/92156.cc: New test.
4951 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
4953 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
4954 * doc/html/*: Regenerate.
4956 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
4957 value for C++17 to 201803L because P0858R0 is supported for C++17.
4958 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4959 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4960 Check for value corresponding to P0031R0 features being tested.
4961 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
4962 Check for value corresponding to P0858R0 features being tested.
4964 * include/std/version (__cpp_lib_three_way_comparison): Define for
4965 freestanding builds.
4967 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
4969 * include/experimental/net/executor (system_context): Mark
4970 system_context::system_context() = delete.
4971 * testsuite/experimental/net/executor/1.cc: Add new
4972 test to check system_context is not default constructible.
4974 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
4976 * include/std/coroutine: Update the inline namespace to __n4861.
4977 Add the __cpp_lib_coroutine define, set to 201902L.
4978 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
4980 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
4982 * include/std/execution (__cpp_lib_execution): Define to indicate
4983 support for P0024R2 and P1001R2.
4984 * include/std/version (__cpp_lib_execution): Define.
4985 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
4986 defined by <algorithm>, move other tests to new tests ...
4987 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
4988 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
4989 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
4990 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
4992 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
4993 different values for C++17 and C++20, to indicate different feature
4994 sets. Update value for C++20 to indicate P1032R1 support.
4995 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4996 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
4997 Check feature test macro.
4998 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5000 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
5002 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
5003 in C++17 mode and check feature test macro.
5005 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
5007 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
5008 defined by <utility>.
5010 * include/std/functional (__cpp_lib_concepts): Update macro value to
5011 indicate P1964R2 support.
5012 * include/std/version (__cpp_lib_concepts): Likewise.
5013 * testsuite/std/concepts/1.cc: Adjust expected value.
5014 * testsuite/std/concepts/2.cc: Likewise.
5016 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
5017 __cpp_lib_constexpr_functional.
5018 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
5019 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
5021 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
5022 indicate P1006R1 support.
5023 (__cpp_lib_to_address): Define to indicate P0653R2 support.
5024 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
5026 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
5028 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
5030 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
5032 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
5033 Define to indicate P0339R6 support.
5034 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
5035 indicate P0457R2 support.
5036 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
5037 to indicate P0758R1 support.
5038 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
5039 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
5040 * include/std/version (__cpp_lib_atomic_float)
5041 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
5042 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
5043 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
5044 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
5045 (__cpp_lib_to_address): Define.
5046 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
5048 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
5050 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
5052 * include/std/version (__cpp_lib_map_insertion)
5053 (__cpp_lib_unordered_map_insertion): Remove.
5055 * include/std/condition_variable (__cpp_lib_jthread): Remove
5056 redundant definition.
5057 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
5058 indicate P1869R1 support.
5059 * include/std/version (__cpp_lib_jthread): Update value.
5060 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
5061 for updated macro value.
5062 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
5064 * testsuite/30_threads/jthread/1.cc: Likewise.
5065 * testsuite/30_threads/jthread/2.cc: Likewise.
5066 * testsuite/30_threads/stop_token/1.cc: Likewise.
5067 * testsuite/30_threads/stop_token/2.cc: Likewise.
5069 * testsuite/21_strings/basic_string/erasure.cc: Check for
5070 __cpp_lib_erase_if macro.
5071 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
5073 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5074 * testsuite/23_containers/list/erasure.cc: Likewise.
5075 * testsuite/23_containers/map/erasure.cc: Likewise.
5076 * testsuite/23_containers/set/erasure.cc: Likewise.
5077 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5078 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5079 * testsuite/23_containers/vector/erasure.cc: Likewise.
5081 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
5083 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
5084 to define operator<=>.
5085 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
5087 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
5088 * doc/Makefile.in: Regenerate.
5089 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
5091 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
5092 to the C++11 status table.
5093 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
5094 proposals with table matching contents of the C++14 standard.
5095 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
5097 * doc/html/*: Regenerate.
5100 * include/std/type_traits (__is_nt_constructible_impl): Add partial
5101 specializations for bounded arrays with non-empty initializers.
5102 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
5104 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
5106 * testsuite/lib/libstdc++.exp: Add additional_flags=
5107 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
5108 compiling with a newer Thread Building Blocks.
5110 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
5112 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
5114 * testsuite/20_util/is_constructible/51185.cc: Make test class a
5115 non-aggregate so that the test verifies the same thing in all -std
5117 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
5118 results for some types when paren-init for aggregates is supported.
5120 * include/std/version (__cpp_lib_three_way_comparison): Update value.
5121 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
5122 (__detail::__synth3way): Add noexcept-specifier.
5124 * include/bits/stl_map.h (map): Define operator<=> and remove
5125 operator< for C++20.
5126 * include/bits/stl_multimap.h (multimap): Likewise.
5127 * include/bits/stl_multiset.h (multiset): Likewise.
5128 * include/bits/stl_set.h (set): Likewise.
5129 * include/bits/stl_tree.h (_Rb_tree): Likewise.
5130 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
5131 operator!= for C++20.
5132 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
5133 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
5134 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
5135 * include/debug/set.h (__gnu_debug::set): Likewise.
5136 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
5137 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
5138 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
5139 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
5141 2020-04-20 Matthias Kretz <kretz@kde.org>
5143 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
5145 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
5147 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
5148 * include/bits/stl_stack.h (stack): Likewise.
5149 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
5150 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
5152 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
5153 Remove redundant operator!= for C++20.
5154 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
5156 * include/debug/unordered_map (unordered_map, unordered_multimap):
5158 * include/debug/unordered_set (unordered_set, unordered_multiset):
5162 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
5163 redundant assignment in constructor.
5165 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
5167 * include/std/chrono (duration, time_point): Define operator<=> and
5168 remove redundant operator!= for C++20.
5169 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
5171 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
5174 * testsuite/util/native_type/native_priority_queue.hpp: Use
5175 allocator_traits to rebind allocator.
5177 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
5179 * include/bits/forward_list.h (forward_list): Define operator<=> and
5180 remove redundant comparison operators for C++20.
5181 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
5182 * include/bits/stl_deque.h (deque): Likewise.
5183 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
5184 * include/bits/stl_list.h (list): Likewise.
5185 * include/bits/stl_vector.h (vector): Likewise.
5186 * include/debug/deque (__gnu_debug::deque): Likewise.
5187 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
5188 * include/debug/list (__gnu_debug::list): Likewise.
5189 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
5191 * include/debug/vector (__gnu_debug::vector): Likewise.
5192 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
5193 operator<=> for C++20.
5194 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
5195 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
5196 * testsuite/23_containers/list/cmp_c++20.cc: New test.
5197 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
5198 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
5200 * include/bits/basic_string.h (basic_string): Define operator<=> and
5201 remove redundant comparison operators for C++20.
5202 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
5203 Add comparison_category members.
5204 (__detail::__char_traits_cmp_cat): New helper to get comparison
5205 category from char traits class.
5206 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
5208 (sub_match): Define operator<=> and remove redundant comparison
5209 operators for C++20.
5210 (match_results): Remove redundant operator!= for C++20.
5211 * include/std/string_view (basic_string_view): Define operator<=> and
5212 remove redundant comparison operators for C++20.
5213 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
5215 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
5217 * testsuite/21_strings/basic_string_view/operations/copy/char/
5218 constexpr.cc: Initialize variable.
5219 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
5220 constexpr.cc: Likewise.
5221 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
5222 dg-do directive and remove comments showing incorrect signatures.
5223 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
5225 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
5227 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
5229 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
5231 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
5233 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
5234 name of unused parameter.
5236 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
5238 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
5239 (directory_entry): Define operator<=> and remove redundant comparison
5240 operators for C++20.
5241 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
5242 * include/bits/fs_path.h (path): Define operator<=> and remove
5243 redundant comparison operators for C++20.
5244 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
5245 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5246 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5247 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5249 * include/bits/allocator.h (operator!=): Do not define for C++20.
5250 * include/bits/locale_classes.h (operator!=): Likewise.
5251 * include/bits/std_function.h (operator==(nullptr_t, const function&))
5252 (operator!=(const function&, nullptr_t))
5253 (operator!=(nullptr_t, const function&)): Likewise.
5254 * include/ext/bitmap_allocator.h (operator!=): Likewise.
5255 * include/ext/debug_allocator.h (operator!=): Likewise.
5256 * include/ext/extptr_allocator.h (operator!=): Likewise.
5257 * include/ext/malloc_allocator.h (operator!=): Likewise.
5258 * include/ext/mt_allocator.h (operator!=): Likewise.
5259 * include/ext/new_allocator.h (operator!=): Likewise.
5260 * include/ext/pool_allocator.h (operator!=): Likewise.
5261 * include/ext/throw_allocator.h (operator!=): Likewise.
5262 * include/std/bitset (bitset::operator!=): Likewise.
5263 * include/std/memory_resource (operator!=): Likewise.
5264 * include/std/scoped_allocator (operator!=): Likewise.
5266 * include/std/typeindex (operator<=>): Define for C++20.
5267 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
5269 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
5271 * libsupc++/compare (compare_three_way): Fix constraint so that
5272 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
5273 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
5277 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
5278 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
5279 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
5280 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
5281 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
5282 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
5286 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
5287 * testsuite/18_support/comparisons/categories/94565.cc: New test.
5289 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
5291 * include/std/coroutine: Update coroutines builtin define,
5294 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
5296 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
5297 (strong_order, weak_order, partial_order): Replace uses of <=> with
5298 compare_three_way function object (LWG 3324).
5299 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
5300 equality operator so that X satisfies three_way_comparable.
5301 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
5303 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
5305 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
5306 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
5307 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
5308 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
5309 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
5311 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
5313 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
5315 * include/std/complex (operator==(const T&, const complex<T>&))
5316 (operator!=(const complex<T>&, const complex<T>&))
5317 (operator!=(const complex<T>&, const T&))
5318 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
5319 * testsuite/26_numerics/slice/compare.cc: New test.
5321 * include/std/charconv (to_chars_result, from_chars_result): Add
5322 defaulted equality comparisons for C++20.
5323 * testsuite/20_util/from_chars/compare.cc: New test.
5324 * testsuite/20_util/to_chars/compare.cc: New test.
5326 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
5329 * include/std/charconv (__integer_to_chars_result_type)
5330 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
5332 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
5333 use of std::string_view with std::string.
5334 * testsuite/20_util/from_chars/2.cc: Likewise.
5335 * testsuite/20_util/to_chars/1.cc: Likewise.
5336 * testsuite/20_util/to_chars/2.cc: Likewise.
5338 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
5341 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
5342 usable in constant expressions for C++20.
5343 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
5344 _GLIBCXX20_CONSTEXPR.
5345 (std::char_traits<char>, std::char_traits<wchar_t>)
5346 (std::char_traits<char8_t>): Make move, copy and assign usable in
5347 constant expressions for C++20.
5348 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
5349 and copy usable in constant expressions for C++20.
5350 * include/std/string_view (basic_string_view::copy): Add
5351 _GLIBCXX20_CONSTEXPR.
5352 * testsuite/21_strings/basic_string_view/operations/copy/char/
5353 constexpr.cc: New test.
5354 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
5355 constexpr.cc: New test.
5357 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
5359 * doc/xml/manual/appendix_contributing.xml: Refer to Git
5360 documentation instead of Subversion. Switch to https.
5361 * doc/html/manual/appendix_contributing.html: Regenerate.
5363 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
5366 * include/bits/ptr_traits.h (__to_address): Add special case for debug
5367 iterators, to avoid dereferenceable check.
5368 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
5369 * testsuite/20_util/to_address/debug.cc: New test.
5371 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
5373 * testsuite/experimental/net/execution_context/use_service.cc:
5374 Require pthread and gthreads.
5376 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
5378 * doc/xml/manual/appendix_free.xml: Move "free books" list from
5380 * doc/html/manual/appendix_free.html: Regenerate.
5382 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
5384 Library-side tests for parenthesized aggregate init
5389 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
5390 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
5391 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
5392 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
5393 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
5394 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
5395 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
5396 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
5397 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
5399 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
5400 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
5401 * testsuite/20_util/variant/92878_92947.cc: Likewise.
5402 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
5404 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
5406 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
5408 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
5410 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
5412 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
5414 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
5415 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
5416 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
5418 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
5419 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
5421 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
5423 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
5425 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
5427 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
5430 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
5432 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
5433 for changes due to parenthesized aggregate-initialization in C++20.
5434 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
5435 with std::chrono::sys_time in C++20.
5437 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
5438 to constrain C++20 versions of comparison operators. Fix backwards
5439 logic of relational operators.
5440 (move_iterator): Use requires-clause to constrain comparison operators
5441 in C++20. Do not declare non-standard same-type overloads for C++20.
5442 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
5443 of comparisons and check using greedy_ops type.
5444 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
5445 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
5446 main function from compile-only test.
5447 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
5449 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
5451 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
5452 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
5453 C++20 concepts are required.
5454 * include/bits/stl_iterator_base_types.h: Likewise.
5455 * include/std/concepts: Likewise.
5456 * include/std/version: Likewise.
5457 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
5460 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
5461 (reverse_iterator::iterator_category): Define for C++20.
5462 (reverse_iterator): Define comparison operators correctly for C++20.
5463 (__normal_iterator): Add constraints to comparison operators for C++20.
5464 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
5465 overload for input iterators.
5466 (move_iterator): Add constraints to comparison operators for C++20.
5467 Define operator<=> for C++20.
5468 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
5469 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
5470 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
5471 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
5473 * include/bits/iterator_concepts.h (__detail::__decay_copy)
5474 (__detail::__member_begin, __detail::__adl_begin): Move here from
5475 <bits/range_access.h>.
5476 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
5477 * bits/range_access.h (__cust_access::__decay_copy)
5478 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
5479 <bits/iterator_concepts.h>.
5480 (ranges::iterator_t): Use __detail::__range_iter_t.
5481 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
5482 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
5483 (front_insert_iterator): Likewise.
5484 (insert_iterator): Implement changes from P0896R4 for C++20.
5485 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
5486 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
5487 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
5488 for inclusion in synopsis_c++20.cc which expects different signatures
5489 for some function templates.
5490 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
5492 * include/std/type_traits (__is_array_convertible): Move definition
5493 to immediately after is_convertible.
5495 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
5497 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
5498 (chrono::months, chrono::sys_days, chrono::local_t)
5499 (chrono::local_time, chrono::local_seconds, chrono::local_days):
5501 (chrono::time_point): Add missing static assert.
5502 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
5503 * testsuite/std/time/clock/file/overview.cc: New test.
5504 * testsuite/std/time/clock/file/members.cc: New test.
5505 * testsuite/std/time/syn_c++20.cc: New test.
5507 2020-03-25 Mike Crowe <mac@mcrowe.com>
5509 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
5511 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
5514 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
5516 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
5517 * include/std/chrono (filesystem::__file_clock): Here.
5518 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
5519 Define public member functions for C++20.
5520 (is_clock, is_clock_v): Define traits for C++20.
5521 * include/std/condition_variable (condition_variable::wait_until): Add
5522 check for valid clock.
5523 * include/std/future (_State_baseV2::wait_until): Likewise.
5524 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
5525 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
5527 * include/std/thread (this_thread::sleep_until): Likewise.
5528 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
5529 slow_clock with new namespace.
5530 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
5532 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
5534 * testsuite/30_threads/future/members/clock_neg.cc: New test.
5535 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
5536 Qualify slow_clock with new namespace.
5537 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
5538 clock_neg.cc: New test.
5539 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
5541 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
5542 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
5544 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
5545 slow_clock with new namespace.
5546 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
5547 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
5549 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
5550 * testsuite/std/time/traits/is_clock.cc: New test.
5551 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
5554 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
5557 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
5558 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
5559 Improve test coverage.
5562 * include/bits/fs_path.h (path::_S_str_convert): Replace first
5563 parameter with basic_string_view so that strings with different
5564 allocators can be accepted.
5565 (path::generic_string<C,T,A>()): Use basic_string object that uses the
5566 right allocator type.
5567 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
5568 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
5571 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
5574 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
5575 (__is_nt_default_constructible_impl): Remove.
5576 (__is_nothrow_default_constructible_impl): Remove.
5577 (__is_nt_constructible_impl): Add bool template parameter. Adjust
5578 partial specializations.
5579 (__is_nothrow_constructible_impl): Replace class template with alias
5581 (is_nothrow_default_constructible): Derive from alias template
5582 __is_nothrow_constructible_impl instead of
5583 __is_nothrow_default_constructible_impl.
5584 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
5586 * include/std/stop_token (stop_token::_Stop_state_ref): Define
5587 comparison operators explicitly if the compiler won't synthesize them.
5589 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
5590 __cpp_lib_concepts before using iter_reference_t.
5591 * include/bits/stream_iterator.h (istream_iterator): Check
5592 __cpp_lib_concepts before using default_sentinel_t.
5593 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
5596 * include/experimental/executor (executor::executor(Executor)): Call
5597 make_shared directly instead of _M_create. Create _Tgt1 object.
5598 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
5599 Call allocate_shared directly instead of _M_create. Create _Tgt2
5601 (executor::target_type): Add cast needed for new _Tgt interface.
5602 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
5603 (executor::_Tgt): Define the same interface whether RTTI is enabled or
5605 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
5606 std::type_info in the interface.
5607 (executor::_Tgt::_M_func): Add data member.
5608 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
5609 (executor::_Tgt1::_S_func): Define function to access target without
5611 (executor::_M_create): Remove.
5612 (operator==, operator!=): Simplify comparisons for executor.
5613 * include/experimental/socket (is_error_code_enum<socket_errc>):
5614 Define specialization before use.
5615 * testsuite/experimental/net/executor/1.cc: New test.
5617 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
5620 * include/experimental/executor (service_already_exists): Add default
5621 constructor. Declare make_service to be a friend.
5622 * testsuite/experimental/net/execution_context/make_service.cc: New
5625 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
5627 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
5628 a null pointer to functions with nonnull(1) attribute.
5630 2020-03-11 Patrick Palka <ppalka@redhat.com>
5632 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
5633 'address' -> 'std::__addressof'.
5634 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
5635 a non-forward input_range.
5636 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
5637 default constructor protected instead of deleted, like with
5638 input_iterator_wrapper.
5639 (test_range::iterator): Add comment explaining that this type is used
5640 only when the underlying wrapper is input_iterator_wrapper or
5641 output_iterator_wrapper. Remove delegating defaulted constructor so
5642 that the inherited default constructor is used instead.
5644 LWG 3286 ranges::size is not required to be valid after a call to
5645 ranges::begin on an input range
5646 * include/std/ranges (subrange::subrange): Split single-argument
5647 constructor into two, one constrained by _S_store_size and another by
5649 (take_view::begin): Call size() before calling ranges::begin(_M_base).
5650 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
5651 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
5653 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
5655 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
5656 instead of _M_current.
5657 (split_view::_OuterIter::operator++): Likewise.
5659 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
5660 (transform_view::_Iterator::operator*): Add noexcept-specifier.
5661 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
5662 (split_view::_OuterIter::__current): Add noexcept.
5663 (split_view::_InnerIter::__iter_swap): Remove.
5664 (split_view::_InnerIter::__iter_move): Remove.
5665 (split_view::_InnerIter::_M_i_current): New accessors.
5666 (split_view::_InnerIter::__at_end): Use _M_i_current().
5667 (split_view::_InnerIter::operator*): Likewise.
5668 (split_view::_InnerIter::operator++): Likewise.
5669 (iter_move(const _InnerIter&)): Likewise.
5670 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
5671 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
5672 for iter_move and iter_swap on split_view's inner iterator.
5675 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
5676 Change expression in noexcept-specifier to match function body.
5678 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
5679 comment explaining multiple dg-do directives.
5680 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
5681 so test is run as well as compiled.
5683 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
5686 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
5687 handle concatenations that change the type of the first component.
5688 (path::operator+=(basic_string_view<value_type>)): Likewise.
5689 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
5691 2020-03-06 Patrick Palka <ppalka@redhat.com>
5693 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
5694 join_view::_Sentinel<!_Const>.
5695 * testsuite/std/ranges/adaptors/join.cc: Augment test.
5698 * include/bits/range_access.h (__cust_access::_Empty::operator()):
5699 Declare return type to be bool instead of auto.
5700 * testsuite/std/ranges/adaptors/93978.cc: New test.
5702 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
5705 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
5706 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
5707 second argument to __glibcxx_rwlock_init.
5708 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
5711 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
5712 test to not fail due to PR 94063.
5713 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
5714 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
5716 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
5718 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
5721 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
5723 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
5724 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
5725 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5726 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
5727 for return value, and in comparison.
5728 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
5731 * include/std/string_view: Include <bits/ostream_insert.h>.
5732 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
5734 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
5736 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
5738 2020-03-04 Patrick Palka <ppalka@redhat.com>
5741 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
5742 condition for when to use memset, making sure to additionally check that
5743 the output pointer's value type is a non-volatile byte type. Instead of
5744 requiring that the fill type is a byte type, just require that it's an
5746 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
5748 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
5750 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
5751 blocked by PR 94017.
5752 * testsuite/25_algorithms/fill/94017.cc: New test.
5753 * testsuite/25_algorithms/fill_n/94017.cc: New test.
5755 LWG 3355 The memory algorithms should support move-only input iterators
5757 * include/bits/ranges_uninitialized.h
5758 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
5759 to copy __ifirst, which could be a move-only input iterator. Use
5760 operator- instead of ranges::distance to compute distance from a sized
5762 (__uninitialized_copy_n_fn::operator()): Likewise.
5763 (__uninitialized_move_fn::operator()): Likewise.
5764 (__uninitialized_move_n_fn::operator()): Likewise.
5765 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
5766 attempting to copy __first.
5767 (__uninitialized_destroy_n_fn::operator()): Likewise.
5768 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5770 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
5772 * .../specialized_algorithms/uninitialized_move/constrained.cc:
5775 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
5776 protected instead of private.
5777 (test_sized_range_sized_sent): New.
5779 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
5780 New testsuite iterator.
5781 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
5782 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
5784 * include/bits/ranges_uninitialized.h
5785 (uninitialized_copy_fn::operator()): Pass a reference type as the first
5786 argument to is_nothrow_assignable_v.
5787 (uninitialized_copy_fn::operator()): Likewise.
5788 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
5789 with the input iterator stripped of its move_iterator.
5790 (uninitialized_move_n_fn::operator()): Likewise.
5791 (uninitialized_fill_fn::operator()): Pass a reference type as the first
5792 argument to is_nothrow_assignable_v.
5793 (uninitialized_fill_n_fn::operator()): Likewise.
5795 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
5798 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
5799 traits to control when to use memmove and memcmp optimizations.
5800 (__is_nonvolatile_trivially_copyable): New helper trait.
5801 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
5802 use memcmp optimization with volatile data.
5803 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
5804 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
5805 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
5806 (__copy_move_backward_a2): Likewise.
5807 (__equal_aux1): Use __memcmpable.
5808 (__lexicographical_compare_aux): Do not use memcmp optimization with
5810 * testsuite/25_algorithms/copy/94013.cc: New test.
5811 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
5812 * testsuite/25_algorithms/equal/94013.cc: New test.
5813 * testsuite/25_algorithms/fill/94013.cc: New test.
5814 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
5815 * testsuite/25_algorithms/move/94013.cc: New test.
5816 * testsuite/25_algorithms/move_backward/94013.cc: New test.
5818 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5819 Avoid redundant iterator comparisons (LWG 3410).
5821 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
5824 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
5826 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
5828 * include/std/ranges (__detail::__maybe_empty_t): Rename to
5830 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
5832 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
5835 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
5837 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5839 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5841 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
5842 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
5843 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
5844 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
5845 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
5847 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5848 Add libatomic option.
5849 * testsuite/30_threads/jthread/jthread.cc: Likewise.
5851 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
5853 * include/bits/stl_algo.h
5854 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
5855 * include/bits/stl_algobase.h: ...here.
5856 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
5858 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5860 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
5862 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
5864 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
5865 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
5866 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
5867 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
5868 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
5869 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
5870 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
5874 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5876 2020-02-28 Patrick Palka <ppalka@redhat.com>
5879 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5880 Fix condition for when to use memcmp, making it consistent with the
5881 corresponding condition used in std::lexicographical_compare.
5882 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
5884 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
5885 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
5886 existing signatures for C++2a.
5888 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5890 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
5891 test instead of just compiling it.
5893 2020-02-28 Patrick Palka <ppalka@redhat.com>
5895 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
5896 whenever the underlying range models common_range.
5898 * include/std/ranges (__detail::_CachedPosition): New struct.
5899 (views::filter_view::_S_needs_cached_begin): New member variable.
5900 (views::filter_view::_M_cached_begin): New member variable.
5901 (views::filter_view::begin): Use _M_cached_begin to cache its
5903 (views::drop_view::_S_needs_cached_begin): New static member variable.
5904 (views::drop_view::_M_cached_begin): New member variable.
5905 (views::drop_view::begin): Use _M_cached_begin to cache its result
5906 when _S_needs_cached_begin.
5907 (views::drop_while_view::_M_cached_begin): New member variable.
5908 (views::drop_while_view::begin): Use _M_cached_begin to cache its
5910 (views::reverse_view::_S_needs_cached_begin): New static member
5912 (views::reverse_view::_M_cached_begin): New member variable.
5913 (views::reverse_view::begin): Use _M_cached_begin to cache its result
5914 when _S_needs_cached_begin.
5915 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
5916 drop_view::begin caches its result.
5917 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
5918 that drop_while_view::begin caches its result.
5919 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
5920 filter_view::begin caches its result.
5921 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
5922 reverse_view::begin caches its result.
5924 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5926 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
5927 filesystems that silently truncate timestamps.
5928 * testsuite/experimental/filesystem/operations/last_write_time.cc:
5931 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
5932 -Wstringop-overflow warnings.
5934 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5936 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
5937 -fdiagnostics-urls=never to options.
5939 2020-02-27 Patrick Palka <ppalka@redhat.com>
5941 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
5943 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
5944 (take_view::_Sentinel<_Const>): Likewise.
5945 (take_while_view::_Sentinel<_Const>): Likewise.
5946 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
5947 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5948 * testsuite/std/ranges/adaptors/take.cc: Augment test.
5949 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
5950 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5952 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
5953 base() of a vector<>::iterator is a pointer.
5954 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
5955 * testsuite/25_algorithms/move/constrained.cc: Likewise.
5956 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
5957 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
5959 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
5960 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
5961 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
5962 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
5963 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
5965 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5967 * include/debug/array (operator<=>): Define for C++20.
5968 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
5969 Adjust dg-error line numbers.
5970 * testsuite/23_containers/array/tuple_interface/
5971 tuple_element_debug_neg.cc: Likewise.
5973 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
5974 defining _GLIBCXX_ASSERTIONS.
5975 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
5976 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
5977 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
5978 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
5979 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
5980 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
5981 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
5982 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
5983 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
5984 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
5985 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
5986 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
5988 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
5989 C++98 where the member function of the base class returns void.
5991 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
5992 equality comparisons that support value-initialized iterators.
5994 * include/bits/boost_concept_check.h (__function_requires): Add
5995 _GLIBCXX14_CONSTEXPR.
5996 * testsuite/25_algorithms/min/concept_checks.cc: New test.
5998 2020-02-26 Patrick Palka <ppalka@redhat.com>
6001 * include/std/ranges (split_view::_InnerIter::operator==): Compare
6002 the operands' _M_i rather than their _M_i.current().
6003 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6005 P1645R1 constexpr for <numeric> algorithms
6006 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
6007 partial_sum, adjacent_difference): Make conditionally constexpr for
6009 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
6011 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
6012 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
6013 constexpr for C++20.
6014 * include/std/version (__cpp_lib_constexpr_numeric): Define.
6015 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
6016 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
6017 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
6018 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
6019 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
6020 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
6021 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
6022 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
6023 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
6024 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
6025 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
6027 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
6029 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
6030 variables in smaller scope and avoid calling ranges::distance when we
6031 know they are pointers. Remove statically-unreachable use of
6032 __builtin_unreachable().
6033 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
6036 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
6038 (__detail::__maybe_const_t): Likewise.
6039 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
6040 (transform_view, take_view, take_while_view, elements_view): Use
6042 (join_view, split_view): Use both.
6044 2020-02-25 Patrick Palka <ppalka@redhat.com>
6046 LWG 3397 basic_istream_view::iterator should not provide
6048 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
6050 (basic_istream_view:_Iterator::iterator_concept): ... this.
6051 * testsuite/std/ranges/istream_view.cc: Augment test.
6053 LWG 3325 Constrain return type of transformation function for
6055 * include/std/ranges (transform_view): Constrain the return type of the
6056 transformation function as per LWG 3325.
6057 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
6059 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
6060 * include/std/ranges (join_view::_Iterator::operator--): Require that
6061 range_reference_t<_Base> models common_range.
6062 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
6064 LWG 3301 transform_view::_Iterator has incorrect iterator_category
6065 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
6066 determination of iterator_category as per LWG 3301.
6067 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
6069 LWG 3292 iota_view is under-constrained
6070 * include/std/ranges (iota_view): Require that _Winc models semiregular
6072 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
6074 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
6076 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
6077 during constant evaluation. Call __builtin_memmove directly instead of
6079 (__copy_or_move_backward): Likewise.
6080 * include/bits/stl_algobase.h (__memmove): Remove.
6081 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
6082 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
6083 Use __builtin_memmove directly instead of __memmove.
6084 (__copy_move_a2): Do not use memmove during constant evaluation.
6085 (__copy_move_backward_a2): Use _IsMove constant to select correct
6086 __copy_move_backward specialization.
6087 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
6088 begin turned into moves during constant evaluation.
6090 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
6094 * include/bits/stl_algobase.h (__memmove): Cast away const before
6095 doing move assignment.
6096 * testsuite/25_algorithms/move/93872.cc: New test.
6097 * testsuite/25_algorithms/move_backward/93872.cc: New test.
6099 2020-02-24 Patrick Palka <ppalka@redhat.com>
6102 * include/bits/ranges_algobase.h (__copy_or_move,
6103 __copy_or_move_backward): Don't inspect the iter_value_t of the output
6104 iterator, instead inspect its iterator_traits directly.
6105 * include/bits/stl_iterator.h (back_insert_iterator::container):
6106 Conditionally initialize.
6107 (back_insert_iterator::difference_type): Conditionally define.
6108 (back_insert_iterator::back_insert_iterator): Conditionally define this
6109 default constructor.
6110 (front_insert_iterator::container): Conditionally initialize.
6111 (front_insert_iterator::difference_type): Conditionally define.
6112 (front_insert_iterator::front_insert_iterator): Conditionally define
6113 this default constructor.
6114 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
6115 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
6117 P0769R2 Add shift to <algorithm>
6118 * include/bits/ranges_algo.h (shift_left, shift_right): New.
6119 * testsuite/25_algorithms/shift_left/1.cc: New test.
6120 * testsuite/25_algorithms/shift_right/1.cc: New test.
6122 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
6124 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
6125 Make noexcept-specifier conditional.
6126 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
6129 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
6131 (operator==(istream_iterator, default_sentinel_t)): Add operator.
6132 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
6133 * include/bits/streambuf_iterator.h
6134 (istreambuf_iterator(default_sentinel_t)): Add constructor.
6135 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
6136 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
6138 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
6139 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
6141 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
6143 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
6144 (ranges::enable_view): Simplify (LWG 3326).
6145 * include/bits/range_access.h (ranges::enable_view): Declare.
6146 * include/bits/regex.h (__enable_view_impl): Remove partial
6148 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
6149 * include/bits/stl_set.h (__enable_view_impl): Likewise.
6150 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
6151 * include/debug/multiset.h (__enable_view_impl): Likewise.
6152 * include/debug/set.h (__enable_view_impl): Likewise.
6153 * include/debug/unordered_set (__enable_view_impl): Likewise.
6154 * include/experimental/string_view (ranges::enable_view): Define
6155 partial specialization.
6156 * include/std/span (ranges::enable_view): Likewise.
6157 * include/std/string_view (ranges::enable_view): Likewise.
6158 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
6160 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
6162 * include/std/optional (operator<=>(optional<T>, optional<U>))
6163 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
6165 * include/std/tuple (__tuple_cmp): New helper function for <=>.
6166 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
6167 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
6168 (operator<=>(monostate, monostate)): Define for C++20.
6169 * testsuite/20_util/optional/relops/three_way.cc: New test.
6170 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
6171 * testsuite/20_util/variant/89851.cc: Move to ...
6172 * testsuite/20_util/variant/relops/89851.cc: ... here.
6173 * testsuite/20_util/variant/90008.cc: Move to ...
6174 * testsuite/20_util/variant/relops/90008.cc: ... here.
6175 * testsuite/20_util/variant/relops/three_way.cc: New test.
6177 2020-02-20 Patrick Palka <ppalka@redhat.com>
6179 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
6181 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
6182 __maybe_refwrap to capture lvalue references by reference, and then use
6183 unwrap_reference_t to forward the by-reference captures as references.
6184 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6185 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
6187 * include/std/ranges (iota_view): Forward declare _Sentinel.
6188 (iota_view::_Iterator): Befriend _Sentinel.
6189 (iota_view::_Sentinel::_M_equal): New member function.
6190 (iota_view::_Sentinel::operator==): Use it.
6191 (views::_Iota::operator()): Forward __f using the correct type.
6192 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
6193 with integers of different signedness, to appease iota_view's deduction
6195 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
6197 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
6199 * include/bits/range_access.h (ranges::begin): Reject array of
6201 (ranges::end, ranges::size): Require arrays to be bounded.
6202 (ranges::data): Require lvalue or borrowed_range.
6203 (ranges::iterator_t): Remove constraint.
6204 * testsuite/std/ranges/access/begin.cc: Do not check array of
6206 * testsuite/std/ranges/access/begin_neg.cc: New test.
6207 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
6208 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
6209 * testsuite/std/ranges/access/ssize.cc: Do not check array of
6212 * include/std/system_error (error_category::operator<=>)
6213 (operator<=>(const error_code&, const error_code&))
6214 (operator<=>(const error_condition&, const error_condition&)): Define
6216 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
6217 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
6219 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
6221 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
6222 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
6224 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
6225 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
6227 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
6228 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
6229 Remove incorrect comment.
6230 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
6233 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
6235 * include/std/thread (thread::id::operator<=>): Define for C++20.
6236 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
6237 functions in namespace std.
6238 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
6240 2020-02-19 Patrick Palka <ppalka@redhat.com>
6242 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
6243 null terminator of the underlying string as part of the test_range.
6244 (main): Call test03.
6246 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
6248 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
6249 requirement (LWG 3385).
6250 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
6251 expected declaration.
6253 * include/std/ranges (take_while_view, drop_view, drop_while_view)
6254 (elements_view:_Iterator): Initialize data members (LWG 3364).
6256 * libsupc++/compare (three_way_comparable): Remove always-false check
6257 that should have been removed with weak_equality (P1959R0).
6258 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
6260 * include/std/concepts (__detail::__partially_ordered_with): Move here
6262 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
6263 to simplify definition (LWG 3331).
6264 * libsupc++/compare (__detail::__partially_ordered_with): Move to
6267 * include/std/concepts (totally_ordered_with): Remove redundant
6268 requirement (LWG 3329).
6270 * include/std/ranges (__detail::__convertible_to_non_slicing): New
6272 (__detail::__pair_like_convertible_to): Remove.
6273 (__detail::__pair_like_convertible_from): Add requirements for
6274 non-slicing conversions.
6275 (subrange): Constrain constructors with __convertible_to_non_slicing.
6276 Remove constructors from pair-like types. Add new deduction guide.
6277 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
6279 * include/bits/iterator_concepts.h (iter_move): Add declaration to
6280 prevent unqualified lookup finding a suitable declaration (LWG 3247).
6282 * include/std/memory_resource (polymorphic_allocator::allocate)
6283 (polymorphic_allocator::allocate_object): Change type of exception to
6284 bad_array_new_length (LWG 3237).
6285 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
6287 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
6288 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
6289 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
6290 * testsuite/20_util/unwrap_reference/3.cc: New test.
6292 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
6293 type during overload resolution, use static assert instead (LWG 3200).
6294 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
6296 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
6298 * include/std/span (span(T (&)[N])): Use non-deduced context to
6299 prevent first parameter from interfering with class template argument
6300 deduction (LWG 3369).
6301 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
6302 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
6305 * include/std/span (span::const_iterator, span::const_reverse_iterator)
6306 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
6308 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
6310 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
6312 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
6313 constrained.cc: Likewise.
6314 * testsuite/20_util/specialized_algorithms/
6315 uninitialized_default_construct/constrained.cc: Likewise.
6316 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
6317 constrained.cc: Likewise.
6318 * testsuite/20_util/specialized_algorithms/uninitialized_move/
6319 constrained.cc: Likewise.
6320 * testsuite/20_util/specialized_algorithms/
6321 uninitialized_value_construct/constrained.cc: Likewise.
6323 * include/bits/range_access.h (range_size_t): Define alias template.
6324 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
6325 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
6327 * include/std/ranges (filter_view, transform_view, take_view)
6328 (join_view, split_view, reverse_view): Remove commented-out converting
6329 constructors (LWG 3280).
6331 * include/std/memory (uninitialized_construct_using_allocator): Use
6332 std::construct_at (LWG 3321).
6334 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
6335 (polymorphic_allocator::allocate_object)
6336 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
6338 LWG 3379. "safe" in several library names is misleading
6339 * include/bits/range_access.h (enable_safe_range): Rename to
6340 enable_borrowed_range.
6341 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
6342 (safe_range): Rename to borrowed_range.
6343 * include/bits/ranges_algo.h: Adjust to use new names.
6344 * include/bits/ranges_algobase.h: Likewise.
6345 * include/bits/ranges_uninitialized.h: Likewise.
6346 * include/std/ranges: Likewise.
6347 (safe_iterator_t): Rename to borrowed_iterator_t.
6348 (safe_subrange_t): Rename to borrowed_subrange_t.
6349 * include/std/span: Adjust to use new names.
6350 * include/std/string_view: Likewise.
6351 * include/experimental/string_view: Likewise.
6352 * testsuite/std/ranges/access/begin.cc: Likewise.
6353 * testsuite/std/ranges/access/cbegin.cc: Likewise.
6354 * testsuite/std/ranges/access/cdata.cc: Likewise.
6355 * testsuite/std/ranges/access/cend.cc: Likewise.
6356 * testsuite/std/ranges/access/crbegin.cc: Likewise.
6357 * testsuite/std/ranges/access/crend.cc: Likewise.
6358 * testsuite/std/ranges/access/data.cc: Likewise.
6359 * testsuite/std/ranges/access/end.cc: Likewise.
6360 * testsuite/std/ranges/access/rbegin.cc: Likewise.
6361 * testsuite/std/ranges/access/rend.cc: Likewise.
6362 * testsuite/std/ranges/safe_range.cc: Likewise.
6363 * testsuite/std/ranges/safe_range_types.cc: Likewise.
6364 * testsuite/util/testsuite_iterators.h: Likewise.
6366 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
6367 (tuple_element<1, const subrange<I, S, K>>): Add partial
6368 specializations (LWG 3398).
6369 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
6371 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
6372 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
6373 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
6375 2020-02-18 Patrick Palka <ppalka@redhat.com>
6377 P1983R0 Wording for GB301, US296, US292, US291, and US283
6378 * include/std/ranges (filter_view::pred): New member function.
6379 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
6380 P1983R0 fixes the highlighted issue in the same way.
6381 (join_view::_Iterator<_Const>): Add friend
6382 join_view::_Iterator<!_Const>.
6383 (join_view::_M_inner): Remove mutable specifier, effectively reverting
6384 the proposed wording changes of P3278.
6385 (join_view::begin): Refine the condition for when to return a const
6387 (split_view::_OuterIter::_OuterIter): Adjust constraints.
6388 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
6391 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
6394 * include/std/ranges (_RangeAdaptor): Add deduction guide.
6395 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
6397 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
6398 (transform_view::_Iterator): Add alias _Base_iter and use in place of
6400 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
6401 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
6402 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
6403 (split_view::_InnerIter::_S_iter_cat()): Likewise.
6405 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
6406 assumption that long is wider than int.
6407 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
6408 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
6409 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
6410 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
6412 P1976R2 Fixed-size span construction from dynamic range
6413 * include/std/span (__cpp_lib_span): Update value.
6414 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
6416 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
6418 (span::first<Count>(), span::last<Count>()): Use explicit type in
6420 (as_bytes, as_writable_bytes): Likewise.
6421 * include/std/version (__cpp_lib_span): Update value.
6422 * testsuite/23_containers/span/1.cc: Check new value.
6423 * testsuite/23_containers/span/2.cc: Check new value.
6424 * testsuite/23_containers/span/explicit.cc: New test.
6426 * include/std/span (span::__is_compatible_array): Simplify alias
6427 template by using requires-clause.
6428 (span::__is_compatible_ref): New alias template for constraining
6430 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
6431 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
6432 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
6433 redundant parentheses.
6434 (span(R&&)): Add missing constraints.
6436 * include/std/span (span): Reorder members and rename template
6437 parameters to match declarations in the C++2a working paper.
6439 P2116R0 Remove tuple-like protocol support from fixed-extent span
6440 * include/std/span (get, tuple_size, tuple_element): Remove.
6441 * testsuite/23_containers/span/everything.cc: Remove checks for
6443 * testsuite/23_containers/span/get_neg.cc: Remove.
6444 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
6445 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
6446 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
6448 2020-02-17 Patrick Palka <ppalka@redhat.com>
6450 P2106R0 Alternative wording for GB315 and GB316
6451 * include/bits/ranges_algo.h (in_fun_result): New.
6452 (for_each_result, for_each_n_result): Change into an alias of
6454 (in_in_result): New.
6455 (mismatch_result): Change into an alias of in_in_result.
6456 (copy_if_result): Change into an alias of in_out_result.
6457 (swap_ranges_result): Change into an alias of in_in_result.
6458 (unary_transform_result): Change into an alias of in_out_result.
6459 (in_in_out_result): New.
6460 (binary_transform_result): Change into an alias of in_in_out_result.
6461 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
6462 remove_copy_result, unique_copy_result, reverse_copy_result,
6463 rotate_copy_result, partial_sort_copy_result): Change into an alias of
6465 (in_out_out_result): New.
6466 (partition_copy_result, merge_result): Change into an alias of
6468 (set_union_result, set_intersection_result): Change into an alias of
6470 (set_difference_result): Change into an alias of in_out_result.
6471 (set_symmetric_difference): Change into an alias of in_in_out_result.
6472 (min_max_result): New.
6473 (minmax_result, minmax_element_result): Change into an alias of
6475 (in_found_result): New.
6476 (next_permutation_result, prev_permutation_result): Change into an alias
6478 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
6479 Adjust following changes to next_permutation_result and
6480 prev_permutation_result.
6481 * include/bits/ranges_algobase.h (in_out_result): New.
6482 (copy_result, move_result, move_backward_result, copy_backward_result,
6483 copy_n_result): Change into an alias of in_out_result.
6484 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
6485 uninitialized_copy_n_result, uninitialized_move_result,
6486 uninitialized_move_n_result): Likewise.
6487 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
6488 structured bindings.
6489 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
6491 P1243R4 Rangify new algorithms
6492 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
6493 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
6494 * testsuite/25_algorithms/clamp/constrained.cc: New test.
6495 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
6496 * testsuite/25_algorithms/sample/constrained.cc: New test.
6498 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
6500 P1964R2 Wording for boolean-testable
6501 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
6502 (__adjacent_find_fn): Cast result of predicate to bool.
6503 * include/std/concepts (__boolean): Remove.
6504 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
6505 new helper concepts.
6506 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
6507 (predicate): Use __boolean_testable instead of boolean.
6508 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
6511 P1970R2 Consistency for size() functions: Add ranges::ssize
6512 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
6513 * testsuite/std/ranges/access/ssize.cc: New test.
6515 P1956R1 On the names of low-level bit manipulation functions
6516 * include/bits/hashtable_policy.h: Update comment.
6517 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
6518 (ispow2, ceil2, floor2, log2p1): Likewise.
6519 (__cpp_lib_int_pow2): Add feature test macro.
6520 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
6521 * include/std/memory (assume_aligned): Adjust use of ispow2.
6522 * include/std/version (__cpp_lib_int_pow2): Add.
6523 * libsupc++/new_opa.cc: Adjust use of __ispow2.
6524 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
6525 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
6526 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
6527 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
6528 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
6529 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
6530 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
6531 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
6532 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
6533 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
6534 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
6535 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
6537 * include/std/charconv: Add comment.
6539 PR libstdc++/92546 (partial)
6540 * include/bits/random.h (uniform_random_bit_generator): Move definition
6541 to <bits/uniform_int_dist.h>.
6542 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
6544 * include/bits/ranges_algobase.h: Do not include <cmath>.
6545 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
6547 * include/std/ranges: Do not include <limits>.
6548 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6550 PR libstdc++/92546 (partial)
6551 * include/Makefile.am: Add new header.
6552 * include/Makefile.in: Regenerate.
6553 * include/bits/int_limits.h: New header.
6554 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
6555 numeric_limits with __detail::__int_limits.
6556 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
6557 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
6559 * include/std/charconv (__to_chars_8, __from_chars_binary)
6560 (__from_chars_alpha_to_num, from_chars): Likewise.
6561 * include/std/memory_resource (polymorphic_allocator::allocate)
6562 (polymorphic_allocator::allocate_object): Likewise.
6563 * include/std/string_view (basic_string_view::_S_compare): Likewise.
6564 * include/std/utility (in_range): Likewise.
6565 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
6566 extra error about incomplete type __int_limits<bool>.
6567 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
6568 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
6569 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
6570 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
6571 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
6572 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
6573 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
6574 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
6575 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
6576 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
6577 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
6578 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
6580 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
6581 value for partial_ordering::unordered.
6583 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
6584 const-qualified expression variations.
6585 * include/std/concepts (copyable): Likewise.
6587 * include/std/type_traits (__is_standard_integer): New helper trait.
6588 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
6589 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
6590 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
6591 * testsuite/20_util/integer_comparisons/1.cc: New test.
6592 * testsuite/20_util/integer_comparisons/2.cc: New test.
6593 * testsuite/20_util/integer_comparisons/equal.cc: New test.
6594 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
6595 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
6596 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
6597 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
6598 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
6599 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
6600 * testsuite/20_util/integer_comparisons/less.cc: New test.
6601 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
6602 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
6603 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
6604 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
6605 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
6607 2020-02-16 Patrick Palka <ppalka@redhat.com>
6609 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
6610 Move code after an early exit constexpr if to under an else branch.
6611 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
6613 2020-02-15 Patrick Palka <ppalka@redhat.com>
6615 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
6616 * include/bits/ranges_algobase.h: Likewise.
6617 * include/bits/ranges_uninitialized.h: Likewise.
6619 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
6620 binary_search, copy_if, count, count_if, equal_range, find, find_end,
6621 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
6622 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
6623 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
6624 lower_bound, make_heap, max, max_element, merge, min, min_element,
6625 minmax, minmax_element, mismatch, next_permutation, none_of,
6626 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
6627 partition_point, pop_heap, prev_permutation, push_heap, remove,
6628 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
6629 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
6630 search, search_n, set_difference, set_intersection,
6631 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
6632 stable_partition, stable_sort, swap_ranges, transform, unique,
6633 unique_copy, upper_bound): Convert into function objects.
6634 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
6635 fill, move_backward, copy_backward): Likewise.
6636 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
6637 uninitialized_default_construct_n, uninitialized_value_construct,
6638 uninitialized_value_construct_n, uninitialized_copy,
6639 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
6640 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
6641 destroy, destroy_n): Likewise.
6643 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
6644 (ranges::find_end): ... here.
6645 (ranges::__lexicographical_compare): Fold into ...
6646 (ranges::lexicographical_compare): ... here.
6647 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
6648 (ranges::equal): ... here.
6650 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6652 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
6653 * include/std/deque: Likewise.
6654 * include/std/forward_list: Likewise.
6655 * include/std/list: Likewise.
6656 * include/std/string: Likewise.
6657 * include/std/vector: Likewise.
6658 * include/std/version: Likewise.
6659 * testsuite/23_containers/deque/erasure.cc: Test for new value.
6660 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6661 * testsuite/23_containers/list/erasure.cc: Likewise.
6662 * testsuite/23_containers/map/erasure.cc: Likewise.
6663 * testsuite/23_containers/set/erasure.cc: Likewise.
6664 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6665 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6666 * testsuite/23_containers/vector/erasure.cc: Likewise.
6668 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6670 * include/bits/random.h (uniform_random_bit_generator): Require min()
6671 and max() to be constant expressions and min() to be less than max().
6672 * testsuite/26_numerics/random/concept.cc: Check additional cases.
6673 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6675 2020-02-13 Patrick Palka <ppalka@redhat.com>
6677 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
6678 * include/Makefile.in: Regenerate.
6679 * include/bits/ranges_uninitialized.h: New header.
6680 * include/std/memory: Include it.
6681 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
6683 * .../uninitialized_copy/constrained.cc: New test.
6684 * .../uninitialized_default_construct/constrained.cc: New test.
6685 * .../uninitialized_fill/constrained.cc: New test.
6686 * .../uninitialized_move/constrained.cc: New test.
6687 * .../uninitialized_value_construct/constrained.cc: New test.
6689 * include/Makefile.am: Add bits/ranges_algobase.h
6690 * include/Makefile.in: Regenerate.
6691 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
6693 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
6694 __detail::__is_move_iterator, copy_result, move_result,
6695 __equal, equal, copy_result, move_result, move_backward_result,
6696 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
6697 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
6698 fill): Split out into ...
6699 * bits/range_algobase.h: ... this new header.
6701 2020-02-12 Patrick Palka <ppalka@redhat.com>
6703 LWG 3389 and LWG 3390
6704 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
6705 constructing the move_iterator with __i.
6706 (counted_iterator::counted_iterator): Use std::move when initializing
6708 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
6709 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
6711 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
6716 * configure: Regenerated.
6718 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
6720 * include/bits/hashtable.h
6721 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
6722 missing std namespace qualification to forward call.
6724 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
6726 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
6728 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
6730 * include/std/ranges: Fix non-ASCII characters in comment.
6732 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
6733 equality comparison to be valid and return bool.
6734 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
6735 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
6736 type with ambiguous conversion to fundamental types.
6737 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
6739 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6741 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
6743 (readable_traits): Rename to indirectly_readable_traits.
6744 (readable): Rename to indirectly_readable.
6745 (writable): Rename to indirectly_writable.
6746 (__detail::__iter_exchange_move): Do not use remove_reference_t.
6747 (indirectly_swappable): Adjust requires expression parameter types.
6749 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
6750 (ranges::replace_if, ranges::generate_n, ranges::generate)
6751 (ranges::remove): Use new name for writable.
6752 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
6753 Use new name for readable.
6754 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
6755 new name for readable_traits.
6756 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
6757 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
6758 new definition of indirectly_readable.
6760 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
6761 to take parameters of common_iterator, instead of the common_iterator
6762 type itself. Fix argument for __common_iter_has_arrow constraint.
6763 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
6765 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6767 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
6769 (basic_istream_view::_Iterator::operator++()): Add missing return.
6771 2020-02-07 Patrick Palka <ppalka@redhat.com>
6773 * include/bits/ranges_algo.h: Remove extraneous &&.
6775 * include/std/ranges (ranges::__detail::__stream_extractable,
6776 ranges::basic_istream_view, ranges::istream_view): Define.
6777 * testsuite/std/ranges/istream_view: New test.
6779 Implement C++20 range adaptors
6780 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
6781 (subrange::_S_store_size): Mark as const instead of constexpr to
6782 avoid what seems to be a bug in GCC.
6783 (__detail::__box): Give it defaulted copy and move constructors.
6784 (ranges::views::_Single::operator()): Mark constexpr.
6785 (ranges::views::_Iota::operator()): Mark constexpr.
6786 (__detail::Empty): Define.
6787 (ranges::views::__closure::_RangeAdaptor,
6788 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
6789 ranges::views::all, ranges::__detail::find_if,
6790 ranges::__detail::find_if_not, ranges::__detail::mismatch,
6791 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
6792 ranges::views::transform, take_view, ranges::views::take,
6793 take_while_view, ranges::views::take_while, drop_view,
6794 ranges::views::drop, join_view, ranges::views::join,
6795 __detail::require_constant, __detail::tiny_range, split_view,
6796 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
6797 common_view, ranges::views::common, reverse_view,
6798 ranges::views::reverse,
6799 ranges::views::__detail::__is_reversible_subrange,
6800 ranges::views::__detail::__is_reverse_view, reverse_view,
6801 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
6802 ranges::views::elements, ranges::views::keys, ranges::views::values):
6804 (views): Alias for ranges::views.
6805 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
6806 tuple_element<1, ranges::subrange>): New partial specializations.
6807 * testsuite/std/ranges/adaptors/all.cc: New test.
6808 * testsuite/std/ranges/adaptors/common.cc: Likewise.
6809 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
6810 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
6811 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
6812 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
6813 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
6814 * testsuite/std/ranges/adaptors/join.cc: Likewise.
6815 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
6816 * testsuite/std/ranges/adaptors/split.cc: Likewise.
6817 * testsuite/std/ranges/adaptors/take.cc: Likewise.
6818 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
6819 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
6821 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6823 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
6824 type of enumerations and comparison category types.
6825 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
6826 (__cmp_cat::_Ncmp::unordered): Change value to 2.
6827 (partial_ordering::_M_value, weak_ordering::_M_value)
6828 (strong_ordering::_M_value): Change type to __cmp_cat::type.
6829 (partial_ordering::_M_is_ordered): Remove data member.
6830 (partial_ordering): Use second bit of _M_value for unordered. Adjust
6831 comparison operators.
6832 (weak_ordering::operator partial_ordering): Simplify to remove
6834 (operator<=>(unspecified, weak_ordering)): Likewise.
6835 (strong_ordering::operator partial_ordering): Likewise.
6836 (strong_ordering::operator weak_ordering): Likewise.
6837 (operator<=>(unspecified, strong_ordering)): Likewise.
6838 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
6839 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
6840 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
6842 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
6843 __cpp_lib_three_way_comparison macro and use deduced return type for
6845 * testsuite/std/ranges/iota/iterator.cc: New test.
6847 2020-02-07 Patrick Palka <ppalka@redhat.com>
6848 Jonathan Wakely <jwakely@redhat.com>
6850 Implement C++20 constrained algorithms
6851 * include/Makefile.am: Add new header.
6852 * include/Makefile.in: Regenerate.
6853 * include/std/algorithm: Include <bits/ranges_algo.h>.
6854 * include/bits/ranges_algo.h: New file.
6855 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
6856 * testsuite/25_algorithms/all_of/constrained.cc: New test.
6857 * testsuite/25_algorithms/any_of/constrained.cc: New test.
6858 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
6859 * testsuite/25_algorithms/copy/constrained.cc: New test.
6860 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
6861 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
6862 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
6863 * testsuite/25_algorithms/count/constrained.cc: New test.
6864 * testsuite/25_algorithms/count_if/constrained.cc: New test.
6865 * testsuite/25_algorithms/equal/constrained.cc: New test.
6866 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
6867 * testsuite/25_algorithms/fill/constrained.cc: New test.
6868 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
6869 * testsuite/25_algorithms/find/constrained.cc: New test.
6870 * testsuite/25_algorithms/find_end/constrained.cc: New test.
6871 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
6872 * testsuite/25_algorithms/find_if/constrained.cc: New test.
6873 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
6874 * testsuite/25_algorithms/for_each/constrained.cc: New test.
6875 * testsuite/25_algorithms/generate/constrained.cc: New test.
6876 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
6877 * testsuite/25_algorithms/heap/constrained.cc: New test.
6878 * testsuite/25_algorithms/includes/constrained.cc: New test.
6879 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
6880 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
6881 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
6882 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
6883 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
6884 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
6886 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
6887 * testsuite/25_algorithms/max/constrained.cc: New test.
6888 * testsuite/25_algorithms/max_element/constrained.cc: New test.
6889 * testsuite/25_algorithms/merge/constrained.cc: New test.
6890 * testsuite/25_algorithms/min/constrained.cc: New test.
6891 * testsuite/25_algorithms/min_element/constrained.cc: New test.
6892 * testsuite/25_algorithms/minmax/constrained.cc: New test.
6893 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
6894 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
6895 * testsuite/25_algorithms/move/constrained.cc: New test.
6896 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
6897 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
6898 * testsuite/25_algorithms/none_of/constrained.cc: New test.
6899 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
6900 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
6901 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
6902 * testsuite/25_algorithms/partition/constrained.cc: New test.
6903 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
6904 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
6905 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
6906 * testsuite/25_algorithms/remove/constrained.cc: New test.
6907 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
6908 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
6909 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
6910 * testsuite/25_algorithms/replace/constrained.cc: New test.
6911 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
6912 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
6913 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
6914 * testsuite/25_algorithms/reverse/constrained.cc: New test.
6915 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
6916 * testsuite/25_algorithms/rotate/constrained.cc: New test.
6917 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
6918 * testsuite/25_algorithms/search/constrained.cc: New test.
6919 * testsuite/25_algorithms/search_n/constrained.cc: New test.
6920 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
6921 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
6922 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
6924 * testsuite/25_algorithms/set_union/constrained.cc: New test.
6925 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
6926 * testsuite/25_algorithms/sort/constrained.cc: New test.
6927 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
6928 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
6929 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
6930 * testsuite/25_algorithms/transform/constrained.cc: New test.
6931 * testsuite/25_algorithms/unique/constrained.cc: New test.
6932 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
6933 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
6935 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
6937 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
6938 number in comment. Fix indentation.
6940 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
6941 redundant _GLIBCXX20_CONSTEXPR.
6943 * include/std/ranges (viewable_range): Replace decay_t with
6944 remove_cvref_t (LWG 3375).
6946 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
6948 * include/bits/iterator_concepts.h (iter_reference_t)
6949 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
6950 Remove workarounds for PR c++/67704.
6951 * testsuite/24_iterators/aliases.cc: New test.
6953 2020-02-05 Patrick Palka <ppalka@redhat.com>
6955 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
6956 when initializing _M_current.
6957 (move_iterator::base): Split into two overloads differing in
6958 ref-qualifiers as in P1207R4 for C++20.
6960 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
6962 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
6966 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
6967 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
6968 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
6970 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
6972 * configure: Regenerate.
6974 2020-01-31 Patrick Palka <ppalka@redhat.com>
6976 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
6977 test_range::end() returns the same type as test_range::begin().
6978 * testsuite/24_iterators/range_operations/next.cc: Likewise.
6979 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
6980 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
6981 Always return a sentinel<I>.
6983 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
6986 * include/std/stop_token (stop_token::stop_possible()): Call new
6987 _M_stop_possible() function.
6988 (stop_token::stop_requested()): Do not use stop_possible().
6989 (stop_token::binary_semaphore): New class, as temporary stand-in for
6990 std::binary_semaphore.
6991 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
6992 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
6993 New data members for symchronization with stop_callback destruction.
6994 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
6995 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
6997 (stop_token::_Stop_cb::_M_run): New member function.
6998 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
7000 (stop_token::_Stop_state::_M_owners): New data member to track
7001 reference count for ownership.
7002 (stop_token::_Stop_state::_M_value): New data member combining a
7003 spinlock, the stop requested flag, and the reference count for
7004 associated stop_source objects.
7005 (stop_token::_Stop_state::_M_requester): New data member for
7006 synchronization with stop_callback destruction.
7007 (stop_token::_Stop_state::_M_stop_possible()): New member function.
7008 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
7010 (stop_token::_Stop_state::_M_add_owner)
7011 (stop_token::_Stop_state::_M_release_ownership)
7012 (stop_token::_Stop_state::_M_add_ssrc)
7013 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
7014 updating reference counts.
7015 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
7016 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
7017 (stop_token::_Stop_state::_M_try_lock)
7018 (stop_token::_Stop_state::_M_try_lock_and_stop)
7019 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
7021 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
7022 read and update state. Release lock while running callbacks. Use new
7023 data members to synchronize with callback destruction.
7024 (stop_token::_Stop_state::_M_remove_callback): Likewise.
7025 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
7026 to read and update state.
7027 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
7028 replacing shared_ptr.
7029 (stop_source::stop_source(const stop_source&)): Update reference count.
7030 (stop_source::operator=(const stop_source&)): Likewise.
7031 (stop_source::~stop_source()): Likewise.
7032 (stop_source::stop_source(stop_source&&)): Define as defaulted.
7033 (stop_source::operator=(stop_source&&)): Establish postcondition on
7035 (stop_callback): Enforce preconditions on template parameter. Replace
7036 base class with data member of new _Cb_impl type.
7037 (stop_callback::stop_callback(const stop_token&, Cb&&))
7038 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
7039 (stop_callback::_Cb_impl): New type wrapping _Callback member and
7040 defining the _S_execute member function.
7041 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
7043 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
7044 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
7045 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
7047 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
7049 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
7050 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
7051 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
7054 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
7055 three_way_comparable_with.
7056 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
7057 (compare_three_way::operator()): Remove redundant constraint from
7059 (__detail::_Synth3way::operator()): Use three_way_comparable_with
7060 instead of workaround.
7061 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
7062 output due to simplified constraints on compare_three_way::operator().
7065 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
7066 * testsuite/18_support/comparisons/object/93479.cc: New test.
7068 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
7069 returns the same type as test_range::begin(). Add comments.
7070 * testsuite/std/ranges/access/rbegin.cc: Likewise.
7071 * testsuite/std/ranges/access/rend.cc: Likewise.
7072 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
7073 test_range is the same as its iterator type.
7074 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
7075 operator- overloads to satisfy sized_sentinel_for when the iterator
7076 satisfies random_access_iterator.
7078 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
7081 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
7082 static assertion to object types.
7085 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
7086 clock_gettime instead of explicit glibc version check.
7087 * configure: Regenerate.
7089 2020-01-28 Martin Liska <mliska@suse.cz>
7092 * include/std/atomic: Fix typo.
7093 * include/std/optional: Likewise.
7095 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
7097 * configure: Regenerate.
7099 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
7102 * include/std/span (span): Fix deduction guide.
7103 * testsuite/23_containers/span/deduction.cc: New test.
7105 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
7107 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
7108 (__cmp_cat::_Ord::equivalent): Add enumerator.
7109 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
7111 (partial_ordering, weak_ordering, strong_ordering): Remove
7112 constructors taking __cmp_cat::_Eq parameters. Use renamed
7115 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
7117 * acinclude.m4: Handle `--with-toolexeclibdir='.
7118 * Makefile.in: Regenerate.
7119 * aclocal.m4: Regenerate.
7120 * configure: Regenerate.
7121 * doc/Makefile.in: Regenerate.
7122 * include/Makefile.in: Regenerate.
7123 * libsupc++/Makefile.in: Regenerate.
7124 * po/Makefile.in: Regenerate.
7125 * python/Makefile.in: Regenerate.
7126 * src/Makefile.in: Regenerate.
7127 * src/c++11/Makefile.in: Regenerate.
7128 * src/c++17/Makefile.in: Regenerate.
7129 * src/c++98/Makefile.in: Regenerate.
7130 * src/filesystem/Makefile.in: Regenerate.
7131 * testsuite/Makefile.in: Regenerate.
7133 2020-01-23 Alexandre Oliva <oliva@adacore.com>
7135 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
7136 * configure: Rebuild.
7138 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
7140 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
7143 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
7145 * include/Makefile.in: Regenerate.
7147 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
7149 * doc/xml/faq.xml: Fix grammar.
7150 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
7151 * doc/xml/manual/spine.xml: Update copyright years.
7152 * doc/html/*: Regenerate.
7154 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
7156 * doc/xml/faq.xml: Update for SVN -> Git transition.
7157 * doc/xml/manual/appendix_contributing.xml: Likewise.
7158 * doc/xml/manual/status_cxx1998.xml: Likewise.
7159 * doc/xml/manual/status_cxx2011.xml: Likewise.
7160 * doc/xml/manual/status_cxx2014.xml: Likewise.
7161 * doc/xml/manual/status_cxx2017.xml: Likewise.
7162 * doc/xml/manual/status_cxx2020.xml: Likewise.
7163 * doc/xml/manual/status_cxxtr1.xml: Likewise.
7164 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
7166 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
7168 * include/Makefile.am: Add coroutine to the std set.
7169 * include/Makefile.in: Regenerated.
7170 * include/std/coroutine: New file.
7172 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
7175 * include/bits/c++config: Only do PSTL config when the header is
7176 present, to fix freestanding.
7177 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
7178 functions if they were detected by configure.
7180 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
7181 Matthew Bauer <mjbauer95@gmail.com>
7182 Jonathan Wakely <jwakely@redhat.com>
7184 PR bootstrap/64271 (partial)
7185 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
7187 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
7188 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
7189 definitions with NetBSD upstream.
7190 (ctype_base::blank): Use _CTYPE_BL.
7191 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
7193 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
7194 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
7195 parameters to unsigned char.
7196 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
7198 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
7201 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
7202 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
7203 (_Equality_base): Remove.
7204 (_Equality<>::_M_equal): Review implementation. Use
7205 std::is_permutation.
7206 * testsuite/23_containers/unordered_multiset/operators/1.cc
7207 (Hash, Equal, test02, test03): New.
7208 * testsuite/23_containers/unordered_set/operators/1.cc
7209 (Hash, Equal, test02, test03): New.
7211 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
7214 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
7215 Move here from <bits/range_access.h> and define using __int128 when
7217 (__is_integer_like, __is_signed_integer_like): Move here from
7218 <bits/range_access.h>.
7219 (weakly_incrementable): Use __is_signed_integer_like.
7220 * include/bits/range_access.h (__max_diff_type, __max_size_type)
7221 (__is_integer_like, __is_signed_integer_like): Move to
7222 <bits/iterator_concepts.h>.
7223 (__make_unsigned_like_t): Move here from <ranges>.
7224 * include/std/ranges (__make_unsigned_like_t): Move to
7225 <bits/range_access.h>.
7226 (iota_view): Replace using-directive with using-declarations.
7227 * testsuite/std/ranges/iota/93267.cc: New test.
7228 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
7230 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
7233 * include/bits/fs_path.h (path::generic_string<C,A>)
7234 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
7235 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
7236 root-dir is converted to forward slash in generic pathname.
7237 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
7238 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
7241 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
7243 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
7244 (__atomic_float): Add default member initializer for C++20.
7245 * include/std/atomic (atomic): Likewise.
7246 (atomic::atomic()): Remove noexcept-specifier on default constructor.
7247 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
7248 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
7250 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
7251 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
7252 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
7253 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
7254 expected result for is_trivially_default_constructible.
7255 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
7256 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
7257 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
7258 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
7259 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
7260 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
7261 expected results for is_trivially_default_constructible.
7262 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
7265 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
7267 * testsuite/util/testsuite_iterators.h: Improve comment.
7269 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
7270 initialization syntax.
7273 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
7274 of base class independent of __cplusplus value.
7275 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
7276 type defined in the base class
7277 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
7278 * testsuite/24_iterators/istreambuf_iterator/requirements/
7279 base_classes.cc: Adjust expected base class for C++98.
7281 2020-01-09 Olivier Hainque <hainque@adacore.com>
7283 * doc/xml/manual/appendix_contributing.xml: Document _C2
7284 as a reserved identifier, by VxWorks.
7285 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
7286 * include/bits/stl_multimap.h: Likewise.
7288 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
7290 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
7291 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
7292 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
7293 partial specialization to disambiguate the two constrained
7296 * include/experimental/type_traits (experimental::is_pod_v): Disable
7297 -Wdeprecated-declarations warnings around reference to std::is_pod.
7298 * include/std/type_traits (is_pod_v): Likewise.
7299 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
7300 is_standard_layout and is_trivial. Do not check is_pod for C++20.
7301 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
7302 Add -Wno-deprecated for C++20.
7303 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
7304 * testsuite/20_util/is_pod/value.cc: Likewise.
7305 * testsuite/experimental/type_traits/value.cc: Likewise.
7307 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
7309 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
7310 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
7311 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
7313 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
7316 * include/bits/random.h (operator>>): Check stream operation succeeds.
7317 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
7319 (operator>>): Remove redundant __istream_type typedefs. Check stream
7321 (__extract_params): New function to fill a vector from a stream.
7322 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
7325 * config/abi/pre/gnu.ver: Add new exports.
7326 * include/std/memory_resource (memory_resource::~memory_resource()):
7327 Do not define inline.
7328 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
7329 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
7331 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
7332 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
7334 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
7337 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
7339 (_Hashtable<>::__fwd_value_for): New.
7340 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
7342 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
7343 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
7344 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
7346 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
7347 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
7349 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
7351 * testsuite/23_containers/unordered_set/92124.cc: New.
7353 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
7356 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
7357 detailed error reporting for remove_all. Check result of recursive
7358 call before incrementing iterator.
7359 (remove_all(const path&), remove_all(const path&, error_code&)): Use
7361 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
7362 result of recursive call before incrementing iterator.
7363 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
7364 are reported correctly.
7365 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
7367 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
7369 * include/std/condition_variable
7370 (condition_variable_any::wait_on): Rename to match current draft
7372 (condition_variable_any::wait_on_until): Likewise.
7373 (condition_variable_any::wait_on_for): Likewise.
7374 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
7375 Adjust tests to account for renamed methods.
7377 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
7380 * include/bits/stl_tree.h
7381 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
7382 std::move_if_noexcept by std::move.
7383 * testsuite/23_containers/map/92124.cc: New.
7384 * testsuite/23_containers/set/92124.cc: New.
7386 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
7388 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
7389 (stop_source): Likewise (LWG 3362).
7390 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
7393 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
7394 (lexicographical_compare_three_way): Do not depend on
7396 * include/std/version (__cpp_lib_three_way_comparison): Only define
7397 when __cpp_lib_concepts is defined.
7398 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
7400 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
7402 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
7403 Only define four-argument overload when __cpp_lib_concepts is defined.
7405 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
7407 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
7409 2020-01-01 Jakub Jelinek <jakub@redhat.com>
7411 Update copyright years.
7413 Copyright (C) 2020 Free Software Foundation, Inc.
7415 Copying and distribution of this file, with or without modification,
7416 are permitted in any medium without royalty provided the copyright
7417 notice and this notice are preserved.