1 2018-10-19 Jonathan Wakely <jwakely@redhat.com>
3 * include/debug/map.h (map::erase(iterator)): Add abi-tag so that
4 C++11 version mangles differently from incompatible C++98 version.
5 * include/debug/multimap.h (multimap::erase(iterator)): Likewise.
6 * include/debug/multiset.h (multiset::erase(iterator))
7 (multiset::erase(const_iterator, const_iterator)): Likewise.
8 * include/debug/set.h (set::erase(iterator))
9 (multiset::erase(const_iterator, const_iterator)): Likewise.
11 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
13 * testsuite/20_util/duration/cons/2.cc: Add -ffloat-store to fix
14 failure when compiled without optimisation.
15 * testsuite/ext/profile/mutex_extensions_neg.cc: Prune additional
16 errors caused by C++17 std::pmr alias templates.
19 * config/locale/gnu/monetary_members.cc
20 (moneypunct<char, true>::_M_initialize_moneypunct): Use
21 __narrow_multibyte_chars to convert multibyte thousands separators
23 * config/locale/gnu/numeric_members.cc
24 (numpunct<char>::_M_initialize_numpunct): Likewise.
25 (__narrow_multibyte_chars): New function.
28 * include/bits/valarray_array.h (__valarray_sum): Use first element
29 to initialize accumulator instead of value-initializing it.
30 (__valarray_product<_Tp>): Move to ...
31 * src/c++98/valarray.cc (__valarray_product<_Tp>): Here. Use first
32 element to initialize accumulator.
33 (__valarray_product(const valarray<size_t>&)): Remove const_cast made
34 unnecessary by LWG 389.
35 * testsuite/26_numerics/valarray/87641.cc: New test.
37 2018-10-18 François Dumont <fdumont@gcc.gnu.org>
40 2018-10-08 François Dumont <fdumont@gcc.gnu.org>
42 * include/debug/list (list<>::cbegin()): Use C++11 direct
44 (list<>::cend()): Likewise.
45 (list<>::erase(const_iterator, const_iterator)): Ensure consistent
47 (list<>::splice(const_iterator, list&&, const_iterator,
48 const_iterator)): Likewise.
51 2018-10-15 François Dumont <fdumont@gcc.gnu.org>
53 * include/debug/vector (vector<>::cbegin()): Use C++11 direct
55 (vector<>::cend()): Likewise.
56 (vector<>::insert(const_iterator, const _Tp&)): Use consistent
58 (vector<>::erase(const_iterator)): Likewise.
59 (vector<>::erase(const_iterator, const_iterator)): Likewise.
61 2018-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
64 * include/std/variant (__select_index): Fix an off-by-one.
65 * testsuite/20_util/variant/87619.cc: New.
67 2018-10-16 Jonathan Wakely <jwakely@redhat.com>
69 * include/bits/random.h (random_device) [!_GLIBCXX_USE_DEV_RANDOM]:
70 Fix default constructor to call correct function.
72 * testsuite/experimental/net/internet/address/v4/creation.cc: Do not
73 declare ip in global namespace, to avoid collision with struct ip
74 defined in <netinet/ip.h>.
76 * include/experimental/bits/net.h: Move versioned namespace macros
78 * include/experimental/buffer: Likewise.
79 * include/experimental/executor: Likewise.
80 * include/experimental/internet: Likewise.
81 * include/experimental/io_context: Likewise.
82 * include/experimental/netfwd: Likewise.
83 * include/experimental/socket: Likewise.
84 * include/experimental/timer: Likewise.
86 * config.h.in: Regenerate.
87 * configure: Regenerate.
88 * configure.ac: Check for headers used by Networking TS.
89 * include/experimental/executor: Include <condition_variable>
91 * include/experimental/internet: Use autoconf macros for available
92 headers. Include <sys/socket.h> for. Remove <cstring> and use
93 __builtin_memcpy and __builtin_strchr.
94 (resolver_errc) [!_GLIBCXX_HAVE_NETDB_H]: Do not define.
95 (address_v4::to_string, address_v6::to_string)
96 [!_GLIBCXX_HAVE_ARPA_INET_H]: Likewise.
97 (basic_resolver_results) [!_GLIBCXX_HAVE_NETDB_H]: Make private
98 constructors report errors.
99 [!_GLIBCXX_HAVE_NETINET_TCP_H] (tcp::no_delay): Do not define.
100 * include/experimental/io_context: Likewise.
101 * include/experimental/socket: Likewise.
102 [!_GLIBCXX_HAVE_SYS_SOCKET_H, !_GLIBCXX_HAVE_POLL_H] (socket_base): Do
103 not define nested types when relevant header not available.
104 (__socket_impl::native_non_blocking) [!_GLIBCXX_HAVE_FCNTL_H]: Report
106 (__basic_socket_impl::open, __basic_socket_impl::local_endpoint)
107 (__basic_socket_impl::bind) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
108 (__basic_socket_impl::io_control) [!_GLIBCXX_HAVE_SYS_IOCTL_H]:
110 (basic_socket::at_mark, basic_socket::shutdown)
111 (basic_socket::remote_endpoint, basic_socket::connect)
112 (basic_socket::async_connect) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
113 (basic_socket::available) [_GLIBCXX_HAVE_SYS_IOCTL_H]: Check macro
114 for <sys/ioctl.h> availability.
115 (basic_socket::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
116 (basic_datagram_socket::receive, basic_datagram_socket::async_receive)
117 (basic_datagram_socket::receive_from)
118 (basic_datagram_socket::async_receive_from)
119 (basic_datagram_socket::send, basic_datagram_socket::async_send)
120 (basic_datagram_socket::send_to, basic_datagram_socket::async_send_to)
121 [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
122 (basic_stream_socket::receive, basic_stream_socket::async_receive)
123 (basic_stream_socket::send, basic_stream_socket::async_send)
124 [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
125 (basic_socket_acceptor::listen, basic_socket_acceptor::accept)
126 (basic_socket_acceptor::async_accept) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
128 (basic_socket_acceptor::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
130 * testsuite/experimental/net/headers.cc: Remove dg-options.
131 * testsuite/experimental/net/buffer/arithmetic.cc: Replace dg-options
132 with dg-do using effective target.
133 * testsuite/experimental/net/buffer/const.cc: Likewise.
134 * testsuite/experimental/net/buffer/creation.cc: Likewise.
135 * testsuite/experimental/net/buffer/mutable.cc: Likewise.
136 * testsuite/experimental/net/buffer/size.cc: Likewise.
137 * testsuite/experimental/net/buffer/traits.cc: Likewise.
138 * testsuite/experimental/net/execution_context/use_service.cc:
140 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
142 * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
143 * testsuite/experimental/net/internet/address/v4/creation.cc:
145 * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
146 * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
147 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
149 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
151 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
152 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
153 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
155 * include/experimental/socket (basic_socket::at_mark): Add missing
158 * acinclude.m4 (GLIBCXX_CHECK_RANDOM_TR1): Replace with ...
159 (GLIBCXX_CHECK_DEV_RANDOM): New macro with more descriptive name.
160 Define _GLIBCXX_USE_DEV_RANDOM as well as _GLIBCXX_USE_RANDOM_TR1.
161 * config.h.in: Regenerate.
162 * configure: Regenerate.
163 * configure.ac: Use GLIBCXX_CHECK_DEV_RANDOM instead of
164 GLIBCXX_CHECK_RANDOM_TR1.
165 crossconfig.m4: Likewise.
166 * include/bits/random.h (random_device): Use _GLIBCXX_USE_DEV_RANDOM
167 instead of _GLIBCXX_USE_RANDOM_TR1.
168 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
170 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
172 * testsuite/lib/dg-options.exp (add_options_for_net_ts): New proc.
173 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
174 Add dg-add-options net_ts.
175 * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
176 * testsuite/experimental/net/internet/address/v4/creation.cc: Likewise.
177 * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
178 * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
179 * testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise.
180 * testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise.
182 2018-10-16 Jonathan Wakely <jwakely@redhat.com>
184 * testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned
185 diagnostic to account for quotes around 'constexpr'.
186 * testsuite/23_containers/deque/capacity/max_size.cc: Define static
188 * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
191 * config/abi/pre/gnu.ver: Fix typos in patterns for basic_stringbuf.
192 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: Disable
193 optimisation to check constructor definition can be linked to.
194 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: Likewise.
196 2018-10-15 Jonathan Wakely <jwakely@redhat.com>
198 * testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
199 account for change to glibc it_IT localedata (glibc bz#10797).
202 * src/c++11/cxx11-shim_facets.cc: Suppress -Wabi warnings.
204 2018-10-15 François Dumont <fdumont@gcc.gnu.org>
206 * include/debug/vector (vector<>::cbegin()): Use C++11 direct
208 (vector<>::cend()): Likewise.
209 (vector<>::emplace(const_iterator, _Args&&...)): Likewise and use
210 consistent iterator comparison.
211 (vector<>::insert(const_iterator, size_type, const _Tp&)): Likewise.
212 (vector<>::insert(const_iterator, _InputIterator, _InputIterator)):
214 (vector<>::erase(const_iterator)): Likewise.
215 (vector<>::erase(const_iterator, const_iterator)): Likewise.
217 2018-10-12 Jonathan Wakely <jwakely@redhat.com>
219 Initial commit of Networking TS implementation.
220 * include/Makefile.am: Add new headers.
221 * include/Makefile.in: Regenerate.
222 * include/experimental/bits/net.h: New header for common
223 implementation details of Networking TS.
224 * include/experimental/buffer: New header.
225 * include/experimental/executor: New header.
226 * include/experimental/internet: New header.
227 * include/experimental/io_context: New header.
228 * include/experimental/net: New header.
229 * include/experimental/netfwd: New header.
230 * include/experimental/socket: New header.
231 * include/experimental/timer: New header.
232 * testsuite/experimental/net/buffer/arithmetic.cc: New test.
233 * testsuite/experimental/net/buffer/const.cc: New test.
234 * testsuite/experimental/net/buffer/creation.cc: New test.
235 * testsuite/experimental/net/buffer/mutable.cc: New test.
236 * testsuite/experimental/net/buffer/size.cc: New test.
237 * testsuite/experimental/net/buffer/traits.cc: New test.
238 * testsuite/experimental/net/execution_context/use_service.cc: New
240 * testsuite/experimental/net/headers.cc: New test.
241 * testsuite/experimental/net/internet/address/v4/comparisons.cc: New
243 * testsuite/experimental/net/internet/address/v4/cons.cc: New test.
244 * testsuite/experimental/net/internet/address/v4/creation.cc: New
246 * testsuite/experimental/net/internet/address/v4/members.cc: New
248 * testsuite/experimental/net/internet/resolver/base.cc: New test.
249 * testsuite/experimental/net/internet/resolver/ops/lookup.cc: New
251 * testsuite/experimental/net/internet/resolver/ops/reverse.cc: New
253 * testsuite/experimental/net/timer/waitable/cons.cc: New test.
254 * testsuite/experimental/net/timer/waitable/dest.cc: New test.
255 * testsuite/experimental/net/timer/waitable/ops.cc: New test.
258 * include/experimental/memory_resource (__resource_adaptor_imp): Do
259 not allocate sizes smaller than alignment when relying on guaranteed
261 * testsuite/experimental/memory_resource/new_delete_resource.cc:
262 Adjust expected number of bytes allocated for alignof(max_align_t).
264 2018-10-11 François Dumont <fdumont@gcc.gnu.org>
266 * include/debug/forward_list
267 (forward_list<>::before_begin()): Use C++11 direct initialization.
268 (forward_list<>::begin()): Likewise.
269 (forward_list<>::end()): Likewise.
270 (forward_list<>::cbefore_begin()): Likewise.
271 (forward_list<>::cbegin()): Likewise.
272 (forward_list<>::cend()): Likewise.
273 (forward_list<>::emplace_after<>(const_iterator, _Args&&...)): Likewise.
274 (forward_list<>::insert_after(const_iterator, const _Tp&)): Likewise.
275 (forward_list<>::insert_after(const_iterator, _Tp&&)): Likewise.
276 (forward_list<>::insert_after(const_iterator, size_type, const _Tp&)):
278 (forward_list<>::insert_after(const_iterator, initializer_list<>)):
280 (forward_list<>::erase_after(const_iterator)): Likewise.
281 (forward_list<>::erase_after(const_iterator, const_iterator)): Likewise
282 and ensure consistent iterator comparison.
284 * include/bits/forward_list.h
285 (_Fwd_list_iterator<>::operator==): Replace member function with inline
287 (_Fwd_list_iterator<>::operator!=): Likewise.
288 (_Fwd_list_const_iterator<>::operator==): Likewise.
289 (_Fwd_list_const_iterator<>::operator!=): Likewise.
290 (operator==(const _Fwd_list_iterator<>&,
291 const _Fwd_list_const_iterator<>&)): Remove.
292 (operator!=(const _Fwd_list_iterator<>&,
293 const _Fwd_list_const_iterator<>&)): Remove.
294 (forward_list<>::_Node): Take typedef from base type.
295 (forward_list<>::iterator): Likewise.
296 (forward_list<>::const_iterator): Likewise.
298 2018-10-11 Jonathan Wakely <jwakely@redhat.com>
301 * src/c++11/thread.cc (this_thread::__sleep_for)
302 [_GLIBCXX_HAVE_SLEEP]: Only call sleep for non-zero values.
303 Loop while sleep call is interrupted and until steady_clock
304 shows requested duration has elapsed.
305 (!_GLIBCXX_HAVE_USLEEP]: Use the _GLIBCXX_HAVE_SLEEP code path, but
306 avoiding the usleep call.
307 * testsuite/30_threads/this_thread/60421.cc: Test repeated
308 signal interruptions.
310 * include/bits/allocator.h
311 (operator==(const allocator<_Tp>&, const allocator<_Tp>))
312 (operator!=(const allocator<_Tp>&, const allocator<_Tp>)): Replace
314 * include/ext/debug_allocator.h (operator==, operator!=): Replace
315 with inline friend functions that compare to rebound allocators.
316 * include/ext/malloc_allocator.h (operator==, operator!=): Likewise.
317 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
318 * testsuite/ext/debug_allocator/eq.cc: New test.
319 * testsuite/ext/ext_pointer/alloc_eq.cc: New test.
320 * testsuite/ext/malloc_allocator/eq.cc: New test.
321 * testsuite/ext/new_allocator/eq.cc: New test.
323 2018-10-10 Jonathan Wakely <jwakely@redhat.com>
326 * include/bits/stl_vector.h (vector::_S_max_size): Limit size to
327 PTRDIFF_MAX / sizeof(value_type).
328 * include/ext/malloc_allocator.h (malloc_allocator::max_size):
330 * include/ext/new_allocator.h (new_allocator::max_size): Likewise.
331 * testsuite/23_containers/vector/allocator/minimal.cc: Adjust
332 expected value for max_size().
333 * testsuite/23_containers/vector/capacity/87544.cc: New test.
335 2018-10-09 François Dumont <fdumont@gcc.gnu.org>
337 * include/bits/stl_list.h
338 (_List_operator<>::operator==): Replace member function with inline
340 (_List_operator<>::operator!=): Likewise.
341 (_List_const_operator<>::operator==): Likewise.
342 (_List_const_operator<>::operator!=): Likewise.
343 (operator==(const _List_iterator<>&, const _List_const_iterator<>&)):
345 (operator!=(const _List_iterator<>&, const _List_const_iterator<>&)):
348 2018-10-09 Jonathan Wakely <jwakely@redhat.com>
350 * include/bits/stringfwd.h (string, wstring, u16string, u32string):
351 Define typedefs outside of __cxx11 inline namespace.
352 * python/libstdcxx/v6/printers.py (register_type_printers): Also
353 register printers for typedefs in new location.
355 2018-10-08 Jonathan Wakely <jwakely@redhat.com>
358 * testsuite/experimental/functional/87538.cc: New test.
361 * include/std/functional (_Not_fn::operator()): Check value of
362 __is_nothrow_invocable as well.
363 * testsuite/20_util/function_objects/not_fn/87538.cc: New test.
365 2018-10-08 François Dumont <fdumont@gcc.gnu.org>
367 * include/debug/list (list<>::cbegin()): Use C++11 direct
369 (list<>::cend()): Likewise.
370 (list<>::emplace<>(const_iterator, _Args&&...)): Likewise.
371 (list<>::insert(const_iterator, initializer_list<>)): Likewise.
372 (list<>::insert(const_iterator, size_type, const _Tp&)): Likewise.
373 (list<>::erase(const_iterator, const_iterator)): Ensure consistent
374 iterator comparisons.
375 (list<>::splice(const_iterator, list&&, const_iterator,
376 const_iterator)): Likewise.
378 2018-10-05 François Dumont <fdumont@gcc.gnu.org>
380 * include/bits/stl_tree.h
381 (_Rb_tree_iterator<>::operator==): Make inline friend.
382 (_Rb_tree_iterator<>::operator!=): Likewise.
383 (_Rb_tree_const_iterator<>::operator==): Likewise.
384 (_Rb_tree_const_iterator<>::operator!=): Likewise.
385 (operator==(const _Rb_tree_iterator<>&,
386 const _Rb_tree_const_iterator&)): Remove.
387 (operator!=(const _Rb_tree_iterator<>&,
388 const _Rb_tree_const_iterator&)): Remove.
389 (operator==(const _Rb_tree<>&, const _Rb_tree<>&)): Make inline friend.
390 (operator<(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
391 (operator!=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise and
393 (operator>(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
394 (operator<=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
395 (operator>=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
396 * include/debug/map.h (map<>::erase(const_iterator, const_iterator)):
397 Compare __victim with _Base::cend().
398 * include/debug/multimap.h
399 (multimap<>::erase(const_iterator, const_iterator)): Likewise.
400 * include/debug/set.h (set<>::erase(const_iterator, const_iterator)):
401 Compare __victim with _Base::cend().
402 * include/debug/multiset.h
403 (multiset<>::erase(const_iterator, const_iterator)): Likewise.
405 2018-10-03 Jonathan Wakely <jwakely@redhat.com>
408 * src/c++98/locale.cc (locale::locale(const locale&)): Bypass
409 reference count updates for the classic locale.
410 (locale::~locale()): Likewise.
411 (locale::operator=(const locale&)): Likewise.
412 * src/c++98/locale_init.cc (locale::locale()): Likewise.
413 (locale::global(const locale&)): Likewise.
415 2018-10-03 François Dumont <fdumont@gcc.gnu.org>
417 * include/debug/map.h
418 (map<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
419 (map<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
420 (map<>::insert(value_type&&)): Likewise.
421 (map<>::insert<>(_Pair&&)): Likewise.
422 (map<>::insert<>(const_iterator, _Pair&&)): Likewise.
423 (map<>::try_emplace): Likewise.
424 (map<>::insert_or_assign): Likewise.
425 (map<>::insert(node_type&&)): Likewise.
426 (map<>::insert(const_iterator, node_type&&)): Likewise.
427 (map<>::erase(const_iterator)): Likewise.
428 (map<>::erase(const_iterator, const_iterator)): Likewise.
429 * include/debug/multimap.h
430 (multimap<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
431 (multimap<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
432 (multimap<>::insert<>(_Pair&&)): Likewise.
433 (multimap<>::insert<>(const_iterator, _Pair&&)): Likewise.
434 (multimap<>::insert(node_type&&)): Likewise.
435 (multimap<>::insert(const_iterator, node_type&&)): Likewise.
436 (multimap<>::erase(const_iterator)): Likewise.
437 (multimap<>::erase(const_iterator, const_iterator)): Likewise.
438 * include/debug/set.h
439 (set<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
440 (set<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
441 (set<>::insert(value_type&&)): Likewise.
442 (set<>::insert<>(const_iterator, value_type&&)): Likewise.
443 (set<>::insert(const_iterator, node_type&&)): Likewise.
444 (set<>::erase(const_iterator)): Likewise.
445 (set<>::erase(const_iterator, const_iterator)): Likewise.
446 * include/debug/multiset.h
447 (multiset<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
448 (multiset<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
449 (multiset<>::insert<>(value_type&&)): Likewise.
450 (multiset<>::insert<>(const_iterator, value_type&&)): Likewise.
451 (multiset<>::insert(node_type&&)): Likewise.
452 (multiset<>::insert(const_iterator, node_type&&)): Likewise.
453 (multiset<>::erase(const_iterator)): Likewise.
454 (multiset<>::erase(const_iterator, const_iterator)): Likewise.
456 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
459 * include/bits/stl_bvector.h (vector::begin(), vector::cbegin()):
460 Rebuild _M_start with an explicit 0 offset.
462 2018-10-02 Jonathan Wakely <jwakely@redhat.com>
464 * include/std/variant (__gen_vtable_impl::__visit_invoke): Call __get
465 directly instead of get, as caller ensures correct index is used.
466 (holds_alternative, get, get_if): Remove redundant inline specifiers.
467 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Likewise.
469 2018-10-02 Joseph Myers <joseph@codesourcery.com>
471 * testsuite/lib/libstdc++.exp (libstdc++_init): Use
472 -fno-show-column in default cxxflags.
474 2018-10-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
476 * config/os/uclibc/os_defines.h (__NO_STRING_INLINES): Delete.
478 2018-10-01 Gerald Pfeifer <gerald@pfeifer.com>
480 * doc/xml/manual/allocator.xml: Adjust link to "Reconsidering
481 Custom Memory Allocation".
483 2018-10-01 Jonathan Wakely <jwakely@redhat.com>
485 * doc/html/*: Regenerate.
487 2018-09-30 Gerald Pfeifer <gerald@pfeifer.com>
489 * doc/xml/manual/messages.xml: Switch link to www.oracle.com
492 2018-09-30 Gerald Pfeifer <gerald@pfeifer.com>
494 * doc/xml/manual/policy_data_structures_biblio.xml: Update
495 link to Microsoft Component Model Object Technologies.
497 2018-09-29 Gerald Pfeifer <gerald@pfeifer.com>
499 * doc/xml/gnu/fdl-1.3.xml: The Free Software Foundation web
500 site now uses https. Also omit the unnecessary trailing slash.
501 * doc/xml/gnu/gpl-3.0.xml: Ditto.
503 2018-09-28 François Dumont <fdumont@gcc.gnu.org>
505 * include/debug/functions.h
506 (__foreign_iterator_aux3(const _Safe_iterator<>&, const _InputeIter&,
507 const _InputIter&, __true_type)): Use empty() rather than begin() ==
510 2018-09-25 Mike Crowe <mac@mcrowe.com>
512 * include/std/condition_variable (condition_variable::wait_for): Use
513 steady clock in overload that uses a predicate.
515 2018-09-25 Jonathan Wakely <jwakely@redhat.com>
518 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
519 Avoid runtime test when all alternatives are scalars and so cannot
520 throw during initialization.
522 2018-09-25 Gerald Pfeifer <gerald@pfeifer.com>
524 * doc/xml/manual/codecvt.xml: Move link to "UTF-8 and Unicode FAQ"
527 2018-09-24 Gerald Pfeifer <gerald@pfeifer.com>
529 * doc/xml/manual/policy_data_structures_biblio.xml: Update link
530 to "Priority Queues and the STL".
532 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
534 * doc/xml/manual/using_exceptions.xml: Move boost.orgs link to
537 2018-09-21 François Dumont <fdumont@gcc.gnu.org>
540 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
541 Use __builtin_floor to compute _M_next_resize.
542 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt.
543 * testsuite/23_containers/unordered_set/hash_policy/prime_rehash.cc:
546 2018-09-21 Jonathan Wakely <jwakely@redhat.com>
548 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Remove.
549 * testsuite/26_numerics/headers/cmath/hypot.cc: Restore test for
550 long double unconditionally, but use lower tolerance when
551 sizeof(long double) == sizeof(double).
553 2018-09-20 Christophe Lyon <christophe.lyon@linaro.org>
555 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Skip
558 2018-09-19 Jonathan Wakely <jwakely@redhat.com>
560 * include/bits/regex_automaton.tcc (_StateSeq<_TraitsT>::_M_clone()):
561 Remove __glibcxx_assert statements and use map::find instead of
564 2018-09-18 François Dumont <fdumont@gcc.gnu.org>
567 * src/c++11/hashtable_c++0x.cc:
568 (_Prime_rehash_policy::_M_next_bkt): Return a prime no smaller than
569 requested size, but not necessarily greater.
570 (_Prime_rehash_policy::_M_need_rehash): Rehash only if target size is
571 strictly greater than next resize threshold.
572 * testsuite/23_containers/unordered_map/modifiers/reserve.cc: Adapt test
573 to validate that there is no rehash as long as number of insertion is
574 lower or equal to the reserved number of elements.
576 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
578 * include/bits/unique_ptr.h (__uniq_ptr_impl): Remove static assertion
579 checking invocable condition.
580 (unique_ptr::~unique_ptr, unique_ptr::reset): Restore static assertion
581 here, where types must be complete. Pass pointer to deleter as an
583 * testsuite/20_util/unique_ptr/requirements/incomplete.cc: New test.
585 2018-09-13 Jonathan Wakely <jwakely@redhat.com>
587 * include/std/variant (variant) [__clang__]: Limit workaround to
590 2018-09-11 Jonathan Wakely <jwakely@redhat.com>
593 * include/bits/shared_ptr.h (make_shared): Use remove_cv instead of
595 * testsuite/20_util/shared_ptr/creation/87278.cc: New test.
597 Implement LWG 2905 changes to constrain unique_ptr constructors
598 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add assertions to
600 (unique_ptr::unique_ptr(pointer, const deleter_type&)): Add copy
601 constructible constraint.
602 (unique_ptr::unique_ptr(pointer, deleter_type&&)): Disable for
603 deleters of reference type and add move constructible constraint.
604 (unique_ptr::unique_ptr(pointer, remove_reference_t<deleter_type>&&)):
605 Disable for deleters of non-reference type. Define as deleted.
606 (unique_ptr<T[], D>): Likewise.
607 * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Replace dg-error
608 directives with unstable line numbers with dg-prune-output.
609 * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
610 * testsuite/20_util/unique_ptr/cons/lwg2905.cc: New test.
611 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
612 Make deleter types invocable.
614 2018-09-05 Jonathan Wakely <jwakely@redhat.com>
616 * libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment.
618 2018-09-03 Jonathan Wakely <jwakely@redhat.com>
621 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
622 that runs the long double part of hypot.cc.
623 * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
624 tests unless TEST_HYPOT_LONG_DOUBLE is defined.
626 * include/bits/stl_vector.h (vector::_Temporary_value::_M_ptr):
627 Return raw pointer not allocator's pointer type.
628 (vector::_Temporary_value::_M_val): Use _M_ptr.
631 * include/bits/stl_map.h
632 (map::map(initializer_list<value_type>, const Compare&, const Alloc&))
633 (map::map(initializer_list<value_type>, const Alloc&))
634 (map::map(InputIterator, InputIterator, const Alloc&))
635 (map::map(InputIterator, InputIterator))
636 (map::map(InputIterator, InputIterator, const Compare&, const Alloc&))
637 (map::insert(InputIterator, InputIterator)):
638 Call _M_insert_range_unique instead of _M_insert_unique.
639 * include/bits/stl_multimap.h
640 (multimap::multimap(initializer_list<value_type>, const C&, const A&))
641 (multimap::multimap(initializer_list<value_type>, const A&))
642 (multimap::multimap(InputIterator, InputIterator, const A&))
643 (multimap::multimap(InputIterator, InputIterator))
644 (multimap::multimap(InputIterator, InputIterator, const C&, const A&))
645 (multimap::insert(InputIterator, InputIterator)): Call
646 _M_insert_range_equal instead of _M_insert_equal.
647 * include/bits/stl_multiset.h
648 (multiset::multiset(InputIterator, InputIterator))
649 (multiset::multiset(InputIterator, InputIterator, const C&, const A&))
650 (multiset::multiset(initializer_list<value_type>, const C&, const A&))
651 (multiset::multiset(initializer_list<value_type>, const A&))
652 (multiset::multiset(InputIterator, InputIterator, const A&))
653 (multiset::insert(InputIterator, InputIterator)): Call
654 _M_insert_range_equal instead of _M_insert_equal.
655 * include/bits/stl_set.h
656 (set::set(InputIterator, InputIterator))
657 (set::set(InputIterator, InputIterator, const Compare&, const Alloc&))
658 (set::set(initializer_list<value_type>, const Compare&, const Alloc&))
659 (set::set(initializer_list<value_type>, const Alloc&))
660 (set::set(InputIterator, InputIterator, const Alloc&))
661 (set::insert(InputIterator, InputIterator)):
662 Call _M_insert_range_unique instead of _M_insert_unique.
663 * include/bits/stl_tree.h
664 [__cplusplus >= 201103L] (_Rb_tree::__same_value_type): New alias
665 template for SFINAE constraints.
666 [__cplusplus >= 201103L] (_Rb_tree::_M_insert_range_unique): Pair of
667 constrained overloads that either insert or emplace, depending on
668 iterator's value_type.
669 [__cplusplus >= 201103L] (_Rb_tree::_M_insert_range_equal): Likewise.
670 [__cplusplus < 201103L] (_Rb_tree::_M_insert_range_unique)
671 (_Rb_tree::_M_insert_range_equal): New functions replacing range
672 versions of _M_insert_unique and _M_insert_equal.
673 (_Rb_tree::_M_insert_unique(_InputIterator, _InputIterator))
674 (_Rb_tree::_M_insert_equal(_InputIterator, _InputIterator)): Remove.
675 * testsuite/23_containers/map/modifiers/insert/87194.cc: New test.
676 * testsuite/23_containers/multimap/modifiers/insert/87194.cc: New test.
677 * testsuite/23_containers/multiset/modifiers/insert/87194.cc: New test.
678 * testsuite/23_containers/set/modifiers/insert/87194.cc: New test.
681 * include/bits/stl_map.h (map::insert(_Pair&&))
682 (map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
683 * include/bits/stl_multimap.h (multimap::insert(_Pair&&))
684 (multimap::insert(const_iterator, _Pair&&)): Likewise.
685 * include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
686 (unordered_map::insert(const_iterator, _Pair&&))
687 (unordered_multimap::insert(_Pair&&))
688 (unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
689 * testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
690 * testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
691 * testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
692 * testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
695 2018-09-02 François Dumont <fdumont@gcc.gnu.org>
697 * include/debug/safe_iterator.h
698 (_Safe_iterator<_It, _Seq, _Cat>::_Self): New.
699 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>::_Self):
701 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
703 (_GLIBCXX_DEBUG_VERIFY_OPERANDS, _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS)
704 (_GLIBCXX_DEBUG_VERIFY_REL_OPERANDS)
705 (_GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS): Define macros.
706 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
707 ::operator+(difference_type)): Use latters, inline as friend.
708 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
709 ::operator-(difference_type)): Likewise.
710 (operator==(const _Safe_iterator<>&, const _Safe_iterator<>&)):
712 (operator!=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
714 (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
715 (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
717 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
718 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
720 (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
721 (operator+(difference_type, const _Safe_iterator<>&)): Likewise.
722 (operator-(const _Safe_iterator<>&, difference_type)): Likewise.
723 * include/debug/safe_iterator.tcc
724 (_Safe_iterator<>::_M_can_advance(difference_type)): Take parameter by
726 * include/debug/safe_local_iterator.h
727 (_Safe_local_iterator<_It, _Seq>::_Self): New.
728 (_Safe_local_iterator<_It, _Seq>::_OtherSelf): New.
729 (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Define macro.
730 (operator==(const _Safe_local_iterator<>&,
731 const _Safe_local_iterator<>&)): Use latter, inline as friend.
732 (operator!=(const _Safe_local_iterator<>&,
733 const _Safe_local_iterator<>&)): Likewise.
734 * testsuite/util/testsuite_containers.h: Include utility.
735 (struct forward_members_unordered<_Tp, bool>): Remove 2nd template
737 (forward_members_unordered<>::forward_members_unordered(value_type&)):
738 Add using namespace std::rel_ops.
739 Add iterator_concept_checks on local_iterator and const_local_iterator.
740 Add asserts on comparison between const_local_iterator and
742 (struct forward_members_unordered<_Tp, false>): Remove partial
744 * testsuite/23_containers/forward_list/types/1.cc: New.
745 * testsuite/23_containers/list/types/1.cc: New.
747 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
749 * doc/xml/manual/profile_mode.xml: Update three ieeexplore.ieee.org
752 2018-08-31 Sandra Loosemore <sandra@codesourcery.com>
754 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
755 Add dg-require-fileio.
756 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
758 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
760 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
762 * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc:
764 * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc:
766 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-1.cc: Likewise.
767 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-2.cc: Likewise.
768 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc: Likewise.
769 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-4.cc: Likewise.
770 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: Likewise.
771 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-1.cc:
773 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc:
775 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc:
777 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc:
779 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc:
781 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc:
783 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc:
785 * testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc: Likewise.
786 * testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc: Likewise.
787 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: Likewise.
788 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: Likewise.
789 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
791 * testsuite/27_io/basic_istream/extractors_other/wchar_t/2.cc:
793 * testsuite/27_io/basic_istream/get/wchar_t/2.cc: Likewise.
794 * testsuite/27_io/basic_istream/getline/wchar_t/5.cc: Likewise.
795 * testsuite/27_io/basic_istream/ignore/wchar_t/2.cc: Likewise.
796 * testsuite/27_io/basic_istream/ignore/wchar_t/3.cc: Likewise.
797 * testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc: Likewise.
798 * testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc: Likewise.
799 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: Likewise.
800 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: Likewise.
801 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc:
803 * testsuite/27_io/objects/wchar_t/10.cc: Likewise.
804 * testsuite/27_io/objects/wchar_t/12048-1.cc: Likewise.
805 * testsuite/27_io/objects/wchar_t/12048-2.cc: Likewise.
806 * testsuite/27_io/objects/wchar_t/12048-3.cc: Likewise.
807 * testsuite/27_io/objects/wchar_t/12048-4.cc: Likewise.
808 * testsuite/27_io/objects/wchar_t/12048-5.cc: Likewise.
809 * testsuite/experimental/string_view/inserters/wchar_t/2.cc:
811 * testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
813 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
815 * testsuite/experimental/propagate_const/observers/1.cc: Make
816 dependence on -fdelete-null-pointer-checks explicit.
818 2018-08-30 Jonathan Wakely <jwakely@redhat.com>
820 * include/bits/hashtable_policy.h (__clp2): Fix calculation for LLP64
821 targets where sizeof(size_t) > sizeof(long). Avoid undefined shifts
822 of the number of bits in the type.
823 * include/std/bit (__ceil2): Avoid undefined shifts.
824 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Test values with
825 the most signifiant bit set.
827 * config/abi/pre/gnu.ver: Add missing exports for mingw.
829 * include/ext/pointer.h (_Pointer_adapter): Define operators for
830 pointer arithmetic using long long offsets.
831 * testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using
834 2018-08-29 Jonathan Wakely <jwakely@redhat.com>
837 * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Check D_FMT
838 string for alternative format.
840 2018-08-28 Jonathan Wakely <jwakely@redhat.com>
843 * src/filesystem/std-path.cc (path::lexically_normal): When handling
844 a dot-dot filename, preserve an empty final component in the iteration
846 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
848 * testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests
849 for more than two adjacent dot-dot filenames.
850 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with
851 preferred-separator in expected normalized strings.
853 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
856 * configure.host (OPT_LDFLAGS): Don't append
857 -fvisibility-inlines-hidden for newer Darwin.
859 2018-08-24 Marc Glisse <marc.glisse@inria.fr>
862 * libsupc++/new (operator new(size_t, nothrow_t), operator
863 new[](size_t, nothrow_t), operator new(size_t, align_val_t, nothrow_t),
864 operator new[](size_t, align_val_t, nothrow_t)): Add malloc attribute.
866 2018-08-24 Jonathan Wakely <jwakely@redhat.com>
868 * include/debug/deque (std::__debug::deque): Declare.
869 * include/debug/forward_list (std::__debug::forward_list): Declare.
870 * include/debug/list (std::__debug::list): Declare.
871 * include/debug/map (std::__debug::map): Declare.
872 * include/debug/set (std::__debug::set): Declare.
873 * include/debug/unordered_map (std::__debug::unordered_map): Declare.
874 * include/debug/unordered_set (std::__debug::unordered_set): Declare.
875 * include/debug/vector (std::__debug::vector): Declare.
876 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: New test.
877 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: New
879 * testsuite/23_containers/list/pmr_typedefs_debug.cc: New test.
880 * testsuite/23_containers/map/pmr_typedefs_debug.cc: New test.
881 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: New test.
882 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: New test.
883 * testsuite/23_containers/set/pmr_typedefs_debug.cc: New test.
884 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc: New
886 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
888 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
890 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc: New
892 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
893 Adjust dg-error lineno.
894 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: New
897 2018-08-23 Jonathan Wakely <jwakely@redhat.com>
899 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
900 Only define when RTTI is enabled.
902 * include/debug/vector (__niter_base): Define for C++98.
904 * testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
905 Fix C++98 test to not use C++11 features.
906 * testsuite/25_algorithms/fill_n/2.cc: Likewise.
908 * scripts/check_compile: Fix comments.
910 * include/debug/string (insert(__const_iterator, _InIter, _InIter)):
911 [!_GLIBCXX_USE_CXX11_ABI]: Replace use of C++11-only cbegin() with
912 begin(), for C++98 compatibility.
914 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
915 (basic_string::__const_iterator): Change access to protected.
916 [!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define
917 as typedef for iterator.
918 * include/debug/string (__const_iterator): Use typedef from base.
919 (insert(const_iterator, _CharT))
920 (replace(const_iterator, const_iterator, const basic_string&))
921 (replace(const_iterator, const_iterator, const _CharT*, size_type))
922 (replace(const_iterator, const_iterator, const CharT*))
923 (replace(const_iterator, const_iterator, size_type, _CharT))
924 (replace(const_iterator, const_iterator, _InputIter, _InputIter))
925 (replace(const_iterator, const_iterator, initializer_list<_CharT>)):
926 Change const_iterator parameters to __const_iterator.
927 (insert(iterator, size_type, _CharT)): Add C++98 overload.
928 (insert(const_iterator, _InputIterator, _InputIterator)): Change
929 const_iterator parameter to __const_iterator.
930 [!_GLIBCXX_USE_CXX11_ABI]: Add workaround for incorrect return type
931 of base's member function.
932 (insert(const_iterator, size_type, _CharT)) [!_GLIBCXX_USE_CXX11_ABI]:
934 (insert(const_iterator, initializer_list<_CharT>))
935 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
936 * testsuite/21_strings/basic_string/init-list.cc: Remove effective
939 * testsuite/20_util/reference_wrapper/lwg2993.cc: Fix C++11 test to
940 not use C++14 feature.
941 * testsuite/23_containers/list/68222_neg.cc: Likewise.
943 * testsuite/21_strings/basic_string/init-list.cc:
945 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
947 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
950 * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for
952 * testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise.
953 * testsuite/23_containers/list/modifiers/assign/1.cc: Likewise.
954 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: Likewise.
955 * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
956 * testsuite/23_containers/vector/modifiers/assign/1.cc: Likewise.
958 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
961 * include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
962 (experimental::pmr::match_results, experimental::pmr::cmatch)
963 (experimental::pmr::smatch, experimental::pmr::wcmatch)
964 (experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
965 because COW strings don't support C++11 allocator model.
966 * include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
967 (experimental::pmr::basic_string, experimental::pmr::string)
968 (experimental::pmr::u16string, experimental::pmr::u32string)
969 (experimental::pmr::wstring): Likewise.
970 * include/std/regex [!_GLIBCXX_USE_CXX11_ABI] (pmr::match_results)
971 (pmr::cmatch, pmr::smatch, pmr::wcmatch, pmr::wsmatch): Likewise.
972 * include/std/string [!_GLIBCXX_USE_CXX11_ABI] (pmr::basic_string)
973 (pmr::string, pmr::u16string, pmr::u32string, pmr::wstring): Likewise.
974 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Require
976 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
979 * include/bits/deque.tcc (deque::_M_range_initialize): Use
980 _S_check_init_len to check size.
981 (deque::_M_push_back_aux, deque::_M_push_front_aux): Throw length
982 error if size would exceed max_size().
983 * include/bits/stl_deque.h (_Deque_base::size_type): Remove typedef.
984 (_Deque_base(_Deque_base&&, const allocator_type&, size_t)): Use
985 size_t instead of size_type.
986 (deq(size_type, const allocator_type&)
987 (deq(size_type, const value_type&, const allocator_type&)
988 (deque::_M_initialize_dispatch): Use _S_check_init_len to check size.
989 (deque::max_size): Call _S_max_size.
990 (deque::_S_check_init_len, deque::_S_max_size): New functions.
991 * include/bits/stl_vector.h (vector(size_type, const allocator_type&))
992 (vector(size_type, const value_type&, const allocator_type&))
993 (vector::_M_initialize_dispatch, vector::_M_range_initialize): Use
994 _S_check_init_len to check size.
995 (vector::max_size): Call _S_max_size.
996 (vector::_M_check_len): Prevent max from being expanded as a
998 (vector::_S_check_init_len, vector::_S_max_size): New functions.
999 * include/bits/vector.tcc (vector::_M_assign_aux): Use
1000 _S_check_init_len to check size.
1001 * testsuite/23_containers/deque/capacity/max_size.cc: New test.
1002 * testsuite/23_containers/vector/capacity/max_size.cc: New test.
1004 2018-08-22 François Dumont <fdumont@gcc.gnu.org>
1007 * include/debug/safe_iterator.h
1008 (_Safe_iterator<_It, _Sq, _Cat>): Add category template parameter.
1009 (_Safe_iterator<>::_Const_iterator): Remove.
1010 (_Safe_iterator<>::_IsConstant): New.
1011 (_Safe_iterator<>::_OtherIterator): New.
1012 (_Safe_iterator<_It, _Sq, _Cat>::_Safe_iterator<_MutIte>(
1013 const _Safe_iterator<_MutIte, _Sq, _Cat>&)): Add _IsConstant::__value in
1014 __gnu_cxx::__enable_if condition.
1015 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to): New.
1016 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_from_begin): New.
1017 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to_end): New.
1018 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>): New.
1019 (_Safe_iterator<_It, _Sq, _Cat>::operator--()): Move...
1020 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1021 ::operator--()): ...here.
1022 (_Safe_iterator<_It, _Sq, _Cat>::operator--(int)): Move...
1023 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1024 ::operator--(int)): ...here.
1025 (_Safe_iterator<_It, _Sq, _Cat>::_M_decrementable()): Move...
1026 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1027 ::_M_decrementable()): ...here.
1028 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>): New.
1029 (_Safe_iterator<_It, _Sq, _Cat>::operator[](const difference_type&)):
1031 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1032 ::operator[](const difference_type&)): ...here.
1033 (_Safe_iterator<_It, _Sq, _Cat>::operator+=(const difference_type&)):
1035 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1036 ::operator+=(const difference_type&)): ...here.
1037 (_Safe_iterator<_It, _Sq, _Cat>::operator+(const difference_type&)):
1039 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1040 ::operator+(const difference_type&)): ...here.
1041 (_Safe_iterator<_It, _Sq, _Cat>::operator-=(const difference_type&)):
1043 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1044 ::operator-=(const difference_type&)): ...here.
1045 (_Safe_iterator<_It, _Sq, _Cat>::operator-(const difference_type&)):
1047 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1048 ::operator-(const difference_type&)): ...here.
1049 (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1050 Constraint to random access iterators.
1051 (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1053 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1054 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1056 (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1057 (operator+(const difference_type&, const _Safe_iterator<>&)): Likewise.
1058 (__check_dereferenceable(const _Safe_iterator<>&)): Remove.
1059 (__get_distance): Remove.
1060 (__get_distance_from_begin): Remove.
1061 (__get_distance_to_end): Remove.
1062 (struct __is_safe_random_iterator<_Safe_iterator<>>): Remove partial
1064 (__base(const _Safe_iterator<>&, std::input_iterator_tag)): Remove.
1065 (__base(const _Safe_iterator<>&, std::random_access_iterator_tag)): Remove.
1066 (__base(const _Safe_iterator<>&)): Constraint to random access iterator.
1067 * include/debug/safe_iterator.tcc
1068 (_Safe_iterator<>::_M_get_distance_from_begin()): New.
1069 (_Safe_iterator<>::_M_get_distance_to_end()): New.
1070 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator<>&)): New.
1071 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1072 ::_M_valid_range): New.
1073 * include/debug/safe_local_iterator.h
1074 (_Safe_local_iterator<>::_Const_local_iterator): Remove.
1075 (_Safe_local_iterator<>::_IsConstant): New.
1076 (_Safe_local_iterator<>::_OtherIterator): New.
1077 (_Safe_local_iterator<_It, _Cont>::_Safe_local_iterator<_MutIte, _Cont>(
1078 const _Safe_local_iterator<_MutIte, _Seq>&)): Add _IsConstant::__value
1079 in __gnu_cxx::__enable_if condition. If singular compare base iterator
1080 with _MutIte rather than _It.
1081 (_Safe_local_iterator<>::_S_constant): Make constexpr.
1082 (_Safe_local_iterator<>::_M_get_distance_to): New.
1083 (__check_dereferenceable(const _Safe_local_iterator<>&)): Remove.
1084 (__get_distance(const _Safe_local_iterator<>&,
1085 const _Safe_local_iterator<>&, std::input_iterator_tag)): Remove.
1086 (__valid_range(const _Safe_local_iterator<>&,
1087 const _Safe_local_iterator<>&)): New.
1088 * include/debug/safe_local_iterator.tcc
1089 (_Safe_local_iterator<>::_M_get_distance_to): New.
1090 * include/debug/deque (std::__debug::deque<>): Add
1091 ::__gnu_debug::_Safe_iterator<> friend declaration.
1092 * include/debug/forward_list (std::__debug::forward_list<>): Likewise.
1093 * include/debug/list (std::__debug::list<>): Likewise.
1094 * include/debug/map.h (std::__debug::map<>): Likewise.
1095 * include/debug/multimap.h (std::__debug::multimap<>): Likewise.
1096 * include/debug/set.h (std::__debug::set<>): Likewise.
1097 * include/debug/multiset.h (std::__debug::multiset<>): Likewise.
1098 * include/debug/string (std::__debug::basic_string<>): Likewise.
1099 * include/debug/unordered_map (std::__debug::unordered_map<>): Likewise
1100 and add ::__gnu_debug::_Safe_local_iterator<> friend declaration.
1101 (std::__debug::unordered_multimap<>): Likewise.
1102 * include/debug/unordered_set (std::__debug::unordered_set<>): Likewise.
1103 (std::__debug::unordered_multiset<>): Likewise.
1104 * include/debug/formatter.h: Adapt.
1105 * include/debug/helper_functions.h
1106 (__gnu_debug::_Safe_local_iterator<>): Add declaration.
1107 (__get_distance<_Ite>(_Ite, _Ite, std::random_access_iterator_tag):
1108 Pass parameter by copy.
1109 (__get_distance<_Ite>(_Ite, _Ite, std::input_iterator_tag): Likewise.
1110 (__get_distance<_Ite>(_Ite, _Ite): Likewise.
1111 (__valid_range_aux<_Integral>): Pass _Integral by copy.
1112 (__valid_range<_InputIterator>): Pass _InputIterator by copy.
1113 (__valid_range<>(const _Safe_iterator<>&,
1114 const _Safe_iterator<>&, typename _Distance_traits<>::__type&)):
1116 (__valid_range(const _Safe_local_iterator<>&,
1117 const _Safe_local_iterator<>&, typename _Distance_traits<>::__type&)):
1119 (__valid_range<>(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1121 (__valid_range(const _Safe_local_iterator<>&, const _Safe_local_iterator<>&)):
1123 (__can_advance): Adapt.
1124 (struct __is_safe_random_iterator<>): Remove.
1125 (struct _SIter_base<>): Remove.
1126 * include/debug/functions.h: Include <bits/stl_iterator.h>.
1127 (__check_dereferenceable): Remove.
1128 (__foreign_iterator_aux4, __foreign_iterator_aux3): Adapt.
1129 (__foreign_iterator_aux2, __foreign_iterator_aux): Adapt.
1130 (__foreign_iterator): Adapt.
1131 * include/debug/stl_iterator.h
1132 (__is_safe_random_iterator<std::reverse_iterator<>>): Remove.
1133 (__base(const std::reverse_iterator<_Safe_iterator<_It, _Sq>)):
1134 Constraint for random access iterators.
1135 (__niter_base): Adapt.
1136 * testsuite/util/testsuite_containers.h:
1137 Include <bits/boost_concept_check.h>.
1138 (iterator_concept_checks<_It, _Mutable, _Category>): New.
1139 (citerator<_Cont>::forward_members::forward_members()): Instantiate
1140 latter for container iterator and const_iterator.
1141 * testsuite/23_containers/list/68222_neg.cc: New.
1142 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: Adapt
1144 * testsuite/23_containers/unordered_set/debug/debug_functions.cc:
1146 * testsuite/23_containers/vector/debug/debug_functions.cc (test01):
1149 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
1152 * doc/xml/manual/status_cxx1998.xml: Document size_type and
1153 difference_type for containers.
1154 * doc/html/*: Regenerate.
1156 2018-08-21 François Dumont <fdumont@gcc.gnu.org>
1158 P0646R1 Improving the Return Value of Erase-Like Algorithms I
1159 * include/debug/forward_list (forward_list::__remove_return_type):
1160 Define typedef as size_type or void, according to __cplusplus value.
1161 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1162 empty, according to __cplusplus value.
1163 (_GLIBCXX20_ONLY): Define macro.
1164 (forward_list::remove, forward_list::unique): Use typedef and macro
1165 to change return type and add abi-tag for C++2a. Return number of
1166 removed elements for C++2a.
1167 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
1168 typedef to change return type for C++2a. Return number of removed
1170 * include/debug/list (list::__remove_return_type): Define typedef as
1171 size_type or void, according to __cplusplus value.
1172 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1173 empty, according to __cplusplus value.
1174 (_GLIBCXX20_ONLY): Define macro.
1175 (list::remove, list::unique): Use typedef and macro to change return
1176 type and add abi-tag for C++2a. Return number of removed elements for
1178 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use typedef
1179 to change return type for C++2a. Return number of removed elements for
1182 2018-08-21 David Edelsohn <dje.gcc@gmail.com>
1184 * testsuite/18_support/new_nothrow.cc: XFAIL on AIX.
1186 2018-08-21 Jonathan Wakely <jwakely@redhat.com>
1188 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Remove
1189 redundant dg-do directive.
1190 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1191 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1192 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1193 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1195 2018-08-20 Jonathan Wakely <jwakely@redhat.com>
1198 * include/std/tuple (_Tuple_impl::operator=): Define as deleted.
1199 (_Tuple_impl::_M_assign): New functions to perform assignment instead
1200 of assignment operators.
1201 (_Tuple_impl::_M_swap): Remove exception specification.
1202 (_Tuple_impl<_Idx, _Head>): Likewise.
1203 (_TC::_NonNestedTuple, _TC::_NotSameTuple): Use __remove_cvref_t.
1204 (__tuple_base): Remove.
1205 (tuple, tuple<_T1, _T2>): Remove inheritance from __tuple_base.
1206 (tuple::operator=, tuple<_T1, _T2>::operator=): Call _M_assign.
1207 (tuple::swap, tuple<_T1, _T2>::swap): Define exception specification
1208 using __is_nothrow_swappable.
1209 (tuple<_T1, _T2>::tuple(_U1&&, _U2&&)): Use __remove_cvref_t.
1211 * include/std/optional (_Optional_payload): Use variable templates
1212 for conditions in default template arguments and exception
1214 (optional): Likewise. Adjust indentation.
1215 (optional::__not_self, optional::__not_tag, optional::_Requires): New
1217 (optional::optional): Use new helpers in constructor constraints.
1218 * include/std/type_traits (__or_v, __and_v): New variable templates.
1219 * testsuite/20_util/optional/cons/value_neg.cc: Change dg-error to
1220 dg-prune-output. Remove unused header.
1222 2018-08-18 François Dumont <fdumont@gcc.gnu.org>
1224 * testsuite/25_algorithms/copy/86658.cc: Use dg-options to define
1227 2018-08-17 Jonathan Wakely <jwakely@redhat.com>
1230 * include/std/tuple (__tuple_base): New class template with deleted
1231 copy assignment operator.
1232 (tuple, tuple<_T1, _T2>): Derive from __tuple_base<tuple> so that
1233 implicit copy/move assignment operator will be deleted/suppressed.
1234 (tuple::__assignable, tuple<_T1, _T2>::__assignable): New helper
1235 functions for SFINAE constraints on assignment operators.
1236 (tuple::__nothrow_assignable, tuple<_T1, _T2>::__nothrow_assignable):
1237 New helper functions for exception specifications.
1238 (tuple::operator=(const tuple&), tuple::operator=(tuple&&))
1239 (tuple<_T1, _T2>::operator=(const tuple&))
1240 (tuple<_T1, _T2>::operator=(tuple&&)): Change parameter types to
1241 __nonesuch_no_braces when the operator should be defined implicitly.
1242 Use __nothrow_assignable for exception specifications.
1243 (tuple::operator=(const tuple<_UElements...>&))
1244 (tuple::operator=(tuple<_UElements...>&&))
1245 (tuple<_T1, _T2>::operator=(const tuple<_U1, _U2>&))
1246 (tuple<_T1, _T2>::operator=(tuple<_U1, _U2>&&))
1247 (tuple<_T1, _T2>::operator=(const pair<_U1, _U2>&))
1248 (tuple<_T1, _T2>::operator=(pair<_U1, _U2>&&)): Constrain using
1249 __assignable and use __nothrow_assignable for exception
1251 * python/libstdcxx/v6/printers.py (is_specialization_of): Accept
1252 gdb.Type as first argument, instead of a string.
1253 (StdTuplePrinter._iterator._is_nonempty_tuple): New method to check
1254 tuple for expected structure.
1255 (StdTuplePrinter._iterator.__init__): Use _is_nonempty_tuple.
1256 * testsuite/20_util/tuple/dr2729.cc: New test.
1257 * testsuite/20_util/tuple/element_access/get_neg.cc: Change dg-error
1260 2018-08-16 Jonathan Wakely <jwakely@redhat.com>
1262 * include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning
1263 about signed/unsigned comparison.
1265 * include/std/ostream (basic_ostream::sentry::~sentry): Suppress
1266 deprecation warnings for using uncaught_exception().
1269 * src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING]
1270 (logic_error::logic_error(logic_error&&))
1271 (logic_error::operator=(logic_error&&))
1272 (runtime_error::runtime_error(runtime_error&&))
1273 (runtime_error::operator=(runtime_error&&)): Copy strings instead of
1274 moving, to avoid allocating empty reps for moved-from strings.
1276 2018-08-15 Jonathan Wakely <jwakely@redhat.com>
1278 * include/experimental/regex: Remove begin/end macros for namespace.
1279 * include/experimental/string: Likewise.
1280 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
1282 * testsuite/experimental/polymorphic_allocator/
1283 pmr_typedefs_forward_list.cc: New test.
1284 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
1286 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
1288 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
1290 * testsuite/experimental/polymorphic_allocator/
1291 pmr_typedefs_multimap.cc: New test.
1292 * testsuite/experimental/polymorphic_allocator/
1293 pmr_typedefs_multiset.cc: New test.
1294 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc:
1296 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1298 * testsuite/experimental/polymorphic_allocator/
1299 pmr_typedefs_unordered_map.cc: New test.
1300 * testsuite/experimental/polymorphic_allocator/
1301 pmr_typedefs_unordered_multimap.cc: New test.
1302 * testsuite/experimental/polymorphic_allocator/
1303 pmr_typedefs_unordered_multiset.cc: New test.
1304 * testsuite/experimental/polymorphic_allocator/
1305 pmr_typedefs_unordered_set.cc: New test.
1306 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc:
1309 * include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
1310 calls to __uses_allocator_construct_impl and __use_alloc.
1311 * include/experimental/memory_resource
1312 (polymorphic_allocator::_M_construct): Remove.
1313 (polymorphic_allocator::construct): Call __uses_allocator_construct.
1314 Qualify calls to __use_alloc.
1315 * include/std/memory_resource (polymorphic_allocator::construct): Fix
1316 type in SFINAE constraint. Use constexpr if instead of tag dispatching
1317 to _S_construct overloads.
1318 (polymorphic_allocator::construct(pair<T1, T2>*, ...)): Fix order of
1319 arguments to _S_construct_p.
1320 (polymorphic_allocator::_S_construct): Remove.
1321 (polymorphic_allocator::_S_construct_p): Return allocators by value
1323 * include/std/scoped_allocator (scoped_allocator_adaptor::construct):
1324 Qualify calls to __use_alloc.
1325 * testsuite/20_util/polymorphic_allocator/construct_pair.cc: New test,
1326 copied from testsuite/20_util/scoped_allocator/construct_pair.cc.
1327 * testsuite/experimental/polymorphic_allocator/1.cc: New test.
1328 * testsuite/experimental/polymorphic_allocator/construct_pair.cc:
1331 * src/c++17/memory_resource.cc [!_GLIBCXX_HAS_GTHREADS]
1332 (atomic_mem_res): Add unsynchronized definition for single-threaded.
1334 2018-08-14 Jonathan Wakely <jwakely@redhat.com>
1337 * include/bits/stl_tempbuf.h (return_temporary_buffer): Use
1338 non-placement delete.
1340 * include/std/chrono (__check_overflow): Simplify definition.
1341 (_Checked_integral_constant): Remove.
1344 * src/c++17/default_resource.h: New file, defining default_res.
1345 * src/c++17/memory_resource.cc [ATOMIC_POINTER_LOCK_FREE != 2]
1346 (atomic_mem_res): Define alternative for atomic<memory_resource*>
1347 using a mutex instead of atomics.
1350 * config/abi/pre/gnu.ver: Export new symbol.
1351 * doc/xml/manual/abi.xml: Document new versions.
1352 * include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
1353 (basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
1354 * include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
1355 Declare new overload.
1356 * src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
1357 and static member function.
1358 (__throw_ios_failure(const char*, int)): Define.
1359 * src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
1360 (__throw_ios_failure(const char*, int)): Define.
1362 2018-08-14 Jeremy Sawicki <jeremy-gcc@sawicki.us>
1364 * include/ext/rope (_Rope_iterator_base(const _Rope_iterator_base&))
1365 (_Rope_const_iterator::operator=(const _Rope_const_iterator&))
1366 (_Rope_iterator::operator=(const _Rope_iterator&)): Ensure
1367 copied/assigned rope iterators don't retain pointers to the iterator
1368 they were copied/assigned from.
1369 * testsuite/ext/rope/7.cc: New.
1371 2018-08-13 Jonathan Wakely <jwakely@redhat.com>
1374 * include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
1375 Combine definitions to avoid --detect-odr-violations warning.
1377 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
1378 __is_pow2 to check for valid alignment. Avoid branching when rounding
1379 size to multiple of alignment.
1381 * include/Makefile.am: Install <bit> and <version> for freestanding.
1382 * include/Makefile.in: Regenerate.
1383 * testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.
1386 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
1389 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
1391 * configure: Regenerate.
1393 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
1396 * doc/xml/manual/intro.xml: Document LWG 206 change.
1397 * libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
1398 * libsupc++/del_opa.cc: Likewise.
1399 * libsupc++/del_opant.cc: Likewise.
1400 * libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead
1402 * libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
1403 * libsupc++/del_opsa.cc: Likewise.
1404 * libsupc++/del_opva.cc: Likewise.
1405 * libsupc++/del_opvant.cc: Likewise.
1406 * libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr)
1407 instead of operator delete(ptr).
1408 * libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
1409 * libsupc++/del_opvsa.cc: Likewise.
1410 * libsupc++/new_op.cc: Use __builtin_expect in check for zero size.
1411 * libsupc++/new_opa.cc: Use nullptr instead of literal 0.
1412 * libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT
1414 * libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
1416 * libsupc++/new_opvant.cc: Use nullptr and noexcept.
1417 * libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of
1418 operator new(sz, nothrow).
1419 * testsuite/18_support/new_nothrow.cc: New test.
1421 2018-08-10 Martin Liska <mliska@suse.cz>
1423 * libsupc++/new_op.cc (new): Remove __builtin_expect as malloc
1424 predictor can handle that.
1425 * libsupc++/new_opa.cc: Likewise.
1426 * libsupc++/new_opnt.cc (new): Likewise.
1428 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
1431 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
1433 * configure: Regenerate.
1435 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
1437 * include/std/deque (std::pmr::deque): Declare alias.
1438 * include/std/forward_list (std::pmr::forward_list): Likewise.
1439 * include/std/list (std::pmr::list): Likewise.
1440 * include/std/map (std::pmr::map, std::pmr::multimap): Likewise.
1441 * include/std/regex (std::pmr::match_results, std::pmr::cmatch)
1442 (std::pmr::smatch, std::pmr::wcmatch, std::pmr::wsmatch): Likewise.
1443 * include/std/set (std::pmr::set, std::pmr::multiset): Likewise.
1444 * include/std/string (std::pmr::basic_string, std::pmr::string)
1445 (std::pmr::u16string, std::pmr::u32string, std::pmr::wstring):
1447 * include/std/unordered_map (std::pmr::unordered_map)
1448 (std::pmr::unordered_multimap): Likewise.
1449 * include/std/unordered_set (std::pmr::unordered_set)
1450 (std::pmr::unordered_multiset): Likewise.
1451 * include/std/vector (std::pmr::vector): Likewise.
1452 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: New test.
1453 * testsuite/23_containers/deque/types/pmr_typedefs.cc: New test.
1454 * testsuite/23_containers/forward_list/pmr_typedefs.cc: New test.
1455 * testsuite/23_containers/list/pmr_typedefs.cc: New test.
1456 * testsuite/23_containers/map/pmr_typedefs.cc: New test.
1457 * testsuite/23_containers/multimap/pmr_typedefs.cc: New test.
1458 * testsuite/23_containers/multiset/pmr_typedefs.cc: New test.
1459 * testsuite/23_containers/set/pmr_typedefs.cc: New test.
1460 * testsuite/23_containers/unordered_map/pmr_typedefs.cc: New test.
1461 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc: New
1463 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New
1465 * testsuite/23_containers/unordered_set/pmr_typedefs.cc: New test.
1466 * testsuite/23_containers/vector/pmr_typedefs.cc: New test.
1467 * testsuite/28_regex/match_results/pmr_typedefs.cc: New test.
1469 2018-08-08 François Dumont <fdumont@gcc.gnu.org>
1471 * include/bits/stl_algo.h
1472 (__rotate(_Ite, _Ite, _Ite, forward_iterator_tag))
1473 (__rotate(_Ite, _Ite, _Ite, bidirectional_iterator_tag))
1474 (__rotate(_Ite, _Ite, _Ite, random_access_iterator_tag)): Move code
1476 (rotate(_Ite, _Ite, _Ite)): ...here.
1477 (__stable_partition_adaptive(_FIt, _FIt, _Pred, _Dist, _Pointer, _Dist)):
1478 Simplify rotate call.
1479 (__rotate_adaptive(_BIt1, _BIt1, _BIt1, _Dist, _Dist, _Bit2, _Dist)):
1481 (__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)):
1484 2018-08-08 Jonathan Wakely <jwakely@redhat.com>
1486 * libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
1487 avoid clashing with an ::aligned_alloc function that was not detected
1490 * doc/xml/manual/using.xml: Fix markup for empty table entry.
1491 * doc/html/*: Regenerate.
1493 * doc/xml/manual/using.xml: Add missing header to table and fix typo.
1494 * doc/html/*: Regenerate.
1497 * include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
1498 Clear error_code when cached type is used.
1499 * testsuite/27_io/filesystem/directory_entry/86597.cc: New test.
1501 2018-08-07 Jonathan Wakely <jwakely@redhat.com>
1504 * include/std/variant (_Copy_ctor_base::_M_destructive_move): Define
1505 here instead of in _Move_assign_base.
1506 (_Copy_ctor_base<true, _Types...>::_M_destructive_move): Define.
1507 (_Copy_assign_base::operator=): Use _M_destructive_move when changing
1508 the contained value to another alternative.
1509 (_Move_assign_base::operator=): Likewise.
1510 (_Move_assign_base::_M_destructive_move): Remove.
1511 * testsuite/20_util/variant/86874.cc: New test.
1514 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] (aligned_alloc):
1515 Replace macro with inline function.
1516 [__sun]: Increase alignment to meet memalign precondition.
1517 [!HAVE__ALIGNED_MALLOC && !HAVE_POSIX_MEMALIGN && !HAVE_MEMALIGN]
1518 (aligned_alloc): Move check for valid alignment to operator new.
1519 Remove redundant check for non-zero size, it's enforced by the caller.
1520 (operator new): Move check for valid alignment here. Use
1521 __builtin_expect on check for zero size.
1523 * config/abi/pre/gnu.ver: Export monotonic_buffer_resource members.
1524 * include/std/memory_resource (monotonic_buffer_resource::release):
1525 Call _M_release_buffers to free buffers.
1526 (monotonic_buffer_resource::do_allocate): Call _M_new_buffer to
1527 allocate a new buffer from upstream.
1528 (monotonic_buffer_resource::_M_new_buffer): Declare.
1529 (monotonic_buffer_resource::_M_release_buffers): Declare.
1530 (monotonic_buffer_resource::_Chunk): Replace definition with
1531 declaration as opaque type.
1532 * src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk):
1534 (monotonic_buffer_resource::_M_new_buffer): Define.
1535 (monotonic_buffer_resource::_M_release_buffers): Define.
1537 2018-08-05 François Dumont <fdumont@gcc.gnu.org>
1539 * include/bits/stl_iterator.h: Fix comment.
1541 2018-08-03 Jonathan Wakely <jwakely@redhat.com>
1543 * src/c++11/system_error.cc
1544 (system_error_category::default_error_condition): Add workaround for
1545 ENOTEMPTY and EEXIST having the same value on AIX.
1546 * testsuite/19_diagnostics/error_category/system_category.cc: Add
1547 extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
1549 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
1551 * configure: Regenerate.
1552 * configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS.
1553 * src/c++11/futex.cc: Use __glibcxx_assert instead of
1554 _GLIBCXX_DEBUG_ASSERT.
1556 2018-08-01 Mike Crowe <mac@mcrowe.com>
1558 * include/std/condition_variable (wait_for): Use steady_clock.
1560 2018-08-01 Mike Crowe <mac@mcrowe.com>
1562 * include/std/condition_variable (wait_until): Only report timeout
1563 if we really have timed out when measured against the
1564 caller-supplied clock.
1565 * testsuite/30_threads/condition_variable/members/2.cc: Add test
1566 case to confirm above behaviour.
1568 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
1571 * src/c++11/system_error.cc
1572 (system_error_category::default_error_condition): New override to
1573 check for POSIX errno values.
1574 * testsuite/19_diagnostics/error_category/generic_category.cc: New
1575 * testsuite/19_diagnostics/error_category/system_category.cc: New
1578 2018-07-31 Jonathan Wakely <jwakely@redhat.com>
1581 * include/bits/stl_pair.h (__pair_base): New class with deleted copy
1582 assignment operator.
1583 (pair): Derive from __pair_base.
1584 (pair::operator=): Remove deleted overload.
1585 * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
1586 so that new base class isn't shown in GDB.
1587 * testsuite/20_util/pair/86751.cc: New test.
1588 * testsuite/20_util/pair/ref_assign.cc: New test.
1590 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
1591 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Move definitions here.
1592 (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Likewise. Use !__is_identifier
1593 instead of __has_builtin.
1594 * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
1595 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Remove definitions from here.
1596 * include/std/version [!_GLIBCXX_HAS_GTHREADS]
1597 (__cpp_lib_shared_timed_mutex, __cpp_lib_scoped_lock)
1598 (__cpp_lib_shared_mutex): Don't define when Gthreads not in use.
1599 [!_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP]
1600 (__cpp_lib_has_unique_object_representations): Don't define when
1601 builtin not available.
1602 [!_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE] (__cpp_lib_is_aggregate):
1604 [!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
1605 * libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
1608 * doc/xml/manual/test.xml: Improve documentation on writing tests for
1610 * doc/xml/manual/using.xml: Document all headers for C++11 and later.
1611 * doc/html/*: Regenerate.
1613 * include/ext/pointer.h [__cplusplus >= 201103L]
1614 (_Pointer_adapter::operator bool): Add explicit conversion operator
1615 to replace safe bool idiom.
1617 2018-07-30 Jonathan Wakely <jwakely@redhat.com>
1620 * include/bits/stl_iterator.h (reverse_iterator::operator->): Call
1621 _S_to_pointer (LWG 1052, LWG 2118).
1622 (reverse_iterator::_S_to_pointer): Define overloaded helper functions.
1623 * testsuite/24_iterators/reverse_iterator/dr1052.cc: New test.
1624 * testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.
1626 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
1627 workaround for aligned_alloc bug on AIX.
1628 * testsuite/18_support/new_aligned.cc: New test.
1630 2018-07-26 Marek Polacek <polacek@redhat.com>
1632 * testsuite/30_threads/condition_variable_any/cond.cc: New.
1634 2018-07-26 Marek Polacek <polacek@redhat.com>
1636 * src/c++98/locale_init.cc: Fix #ifdef condition.
1638 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
1640 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Add
1641 dg-require-cstdint directive.
1642 * testsuite/20_util/allocator/overaligned.cc: Likewise.
1643 * testsuite/20_util/any/cons/aligned.cc: Likewise.
1644 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Likewise.
1645 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: Likewise.
1646 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
1648 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1649 * testsuite/23_containers/list/modifiers/insert/25288.cc: Likewise.
1650 * testsuite/23_containers/set/allocator/move_assign.cc: Likewise.
1651 * testsuite/25_algorithms/make_heap/complexity.cc: Likewise.
1652 * testsuite/25_algorithms/pop_heap/complexity.cc: Require cstdint and
1653 random_device effective-target.
1654 * testsuite/25_algorithms/push_heap/complexity.cc: Likewise.
1655 * testsuite/25_algorithms/sample/1.cc: Require cstdint.
1656 * testsuite/25_algorithms/sample/2.cc: Likewise.
1657 * testsuite/25_algorithms/sort_heap/complexity.cc: Require cstdint
1659 * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Require
1661 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1663 * testsuite/26_numerics/random/discard_block_engine/requirements/
1664 constexpr_data.cc: Likewise.
1665 * testsuite/26_numerics/random/discard_block_engine/requirements/
1666 constexpr_functions.cc: Likewise.
1667 * testsuite/26_numerics/random/independent_bits_engine/requirements/
1668 constexpr_functions.cc: Likewise.
1669 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
1670 constexpr_data.cc: Likewise.
1671 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
1672 constexpr_functions.cc: Likewise.
1673 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
1674 constexpr_data.cc: Likewise.
1675 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
1676 constexpr_functions.cc: Likewise.
1677 * testsuite/26_numerics/random/pr60037-neg.cc: Likewise.
1678 * testsuite/26_numerics/random/seed_seq/cons/65631.cc: Likewise.
1679 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
1680 constexpr_data.cc: Add dg-require-cstdint directive.
1681 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
1682 constexpr_functions.cc: Likewise.
1683 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
1684 constexpr_data.cc: Likewise.
1685 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
1686 constexpr_functions.cc: Likewise.
1687 * testsuite/26_numerics/random/uniform_real_distribution/operators/
1689 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Likewise.
1690 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
1691 * testsuite/experimental/algorithm/sample.cc: Likewise.
1692 * testsuite/experimental/algorithm/search.cc: Likewise.
1693 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
1694 * testsuite/experimental/any/cons/aligned.cc: Likewise.
1695 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1697 * testsuite/experimental/memory_resource/resource_adaptor.cc: Likewise.
1698 * testsuite/experimental/random/randint.cc: Likewise.
1699 * testsuite/experimental/source_location/1.cc: Likewise.
1700 * testsuite/ext/bitmap_allocator/overaligned.cc: Likewise.
1701 * testsuite/ext/malloc_allocator/overaligned.cc: Likewise.
1702 * testsuite/ext/mt_allocator/overaligned.cc: Likewise.
1703 * testsuite/ext/new_allocator/overaligned.cc: Likewise.
1704 * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Likewise.
1705 * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
1706 * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
1707 * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
1708 * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
1709 * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
1710 * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
1711 * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
1712 * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
1713 * testsuite/ext/pool_allocator/overaligned.cc: Likewise.
1714 * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Likewise.
1715 * testsuite/ext/throw_allocator/check_deallocate_null.cc: Likewise.
1716 * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
1717 * testsuite/ext/throw_allocator/check_new.cc: Likewise.
1718 * testsuite/ext/throw_allocator/deallocate_global.cc: Likewise.
1719 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1720 * testsuite/ext/throw_allocator/explicit_instantiation.cc: Likewise.
1721 * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise.
1722 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
1724 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
1725 * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
1726 * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
1727 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
1729 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
1730 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
1731 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
1733 * testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc:
1735 * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
1737 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
1738 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
1739 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
1740 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
1741 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
1742 * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
1744 * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
1746 * testsuite/30_threads/recursive_timed_mutex/dest/
1747 destructor_locked.cc: Likewise.
1748 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
1749 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
1750 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
1752 * testsuite/30_threads/recursive_timed_mutex/native_handle/
1753 typesizes.cc: Likewise.
1754 * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
1756 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
1758 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
1760 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
1762 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
1764 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
1766 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
1768 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
1770 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
1771 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
1772 * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
1773 * testsuite/30_threads/scoped_lock/requirements/
1774 explicit_instantiation.cc: Likewise.
1775 * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise.
1776 * testsuite/30_threads/shared_future/cons/assign.cc: Likewise.
1777 * testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.
1778 * testsuite/30_threads/shared_future/cons/copy.cc: Likewise.
1779 * testsuite/30_threads/shared_future/cons/default.cc: Likewise.
1780 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
1781 * testsuite/30_threads/shared_future/cons/move_assign.cc: Likewise.
1782 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
1783 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
1784 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
1785 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
1786 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
1787 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
1788 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
1789 * testsuite/30_threads/shared_future/requirements/
1790 explicit_instantiation.cc: Likewise.
1791 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
1792 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
1793 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
1794 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
1795 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
1796 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
1797 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
1798 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
1799 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
1800 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
1801 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
1802 * testsuite/30_threads/shared_lock/requirements/
1803 explicit_instantiation.cc: Likewise.
1804 * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Likewise.
1805 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
1806 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Likewise.
1807 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
1808 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
1810 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
1811 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
1812 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
1813 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
1814 * testsuite/30_threads/shared_timed_mutex/cons/assign_neg.cc: Likewise.
1815 * testsuite/30_threads/shared_timed_mutex/cons/copy_neg.cc: Likewise.
1816 * testsuite/30_threads/shared_timed_mutex/requirements/
1817 standard_layout.cc: Likewise.
1818 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
1819 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
1820 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
1821 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
1822 * testsuite/30_threads/this_thread/1.cc: Likewise.
1823 * testsuite/30_threads/this_thread/2.cc: Likewise.
1824 * testsuite/30_threads/this_thread/3.cc: Likewise.
1825 * testsuite/30_threads/this_thread/4.cc: Likewise.
1826 * testsuite/30_threads/this_thread/58038.cc: Likewise.
1827 * testsuite/30_threads/thread/70503.cc: Likewise.
1828 * testsuite/30_threads/thread/84532.cc: Likewise.
1829 * testsuite/30_threads/thread/adl.cc: Likewise.
1830 * testsuite/30_threads/thread/cons/1.cc: Likewise.
1831 * testsuite/30_threads/thread/cons/2.cc: Likewise.
1832 * testsuite/30_threads/thread/cons/3.cc: Likewise.
1833 * testsuite/30_threads/thread/cons/4.cc: Likewise.
1834 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
1835 * testsuite/30_threads/thread/cons/5.cc: Likewise.
1836 * testsuite/30_threads/thread/cons/6.cc: Likewise.
1837 * testsuite/30_threads/thread/cons/7.cc: Likewise.
1838 * testsuite/30_threads/thread/cons/8.cc: Likewise.
1839 * testsuite/30_threads/thread/cons/84535.cc: Likewise.
1840 * testsuite/30_threads/thread/cons/9.cc: Likewise.
1841 * testsuite/30_threads/thread/cons/assign_neg.cc: Likewise.
1842 * testsuite/30_threads/thread/cons/copy_neg.cc: Likewise.
1843 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
1844 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
1845 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
1846 * testsuite/30_threads/thread/id/operators.cc: Likewise.
1847 * testsuite/30_threads/thread/members/1.cc: Likewise.
1848 * testsuite/30_threads/thread/members/2.cc: Likewise.
1849 * testsuite/30_threads/thread/members/3.cc: Likewise.
1850 * testsuite/30_threads/thread/members/4.cc: Likewise.
1851 * testsuite/30_threads/thread/members/5.cc: Likewise.
1852 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
1854 * testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
1855 * testsuite/30_threads/thread/swap/1.cc: Likewise.
1856 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
1857 * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
1858 * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
1859 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
1860 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
1861 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
1862 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
1864 * testsuite/30_threads/timed_mutex/requirements/
1865 standard_layout.cc: Likewise.
1866 * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
1867 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
1868 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
1869 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
1870 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
1871 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
1872 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
1873 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
1874 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
1875 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
1876 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
1877 * testsuite/30_threads/try_lock/1.cc: Likewise.
1878 * testsuite/30_threads/try_lock/2.cc: Likewise.
1879 * testsuite/30_threads/try_lock/3.cc: Likewise.
1880 * testsuite/30_threads/try_lock/4.cc: Likewise.
1881 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
1882 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
1883 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
1884 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
1885 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
1886 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
1887 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
1888 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
1889 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
1890 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
1891 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
1892 * testsuite/30_threads/unique_lock/requirements/
1893 explicit_instantiation.cc: Likewise.
1894 * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise.
1896 * testsuite/30_threads/async/42819.cc: Remove dg-require-cstdint
1898 * testsuite/30_threads/async/49668.cc: Likewise.
1899 * testsuite/30_threads/async/54297.cc: Likewise.
1900 * testsuite/30_threads/async/84532.cc: Likewise.
1901 * testsuite/30_threads/async/any.cc: Likewise.
1902 * testsuite/30_threads/async/async.cc: Likewise.
1903 * testsuite/30_threads/async/except.cc: Likewise.
1904 * testsuite/30_threads/async/forced_unwind.cc: Likewise.
1905 * testsuite/30_threads/async/launch.cc: Likewise.
1906 * testsuite/30_threads/async/lwg2021.cc: Likewise.
1907 * testsuite/30_threads/async/sync.cc: Likewise.
1908 * testsuite/30_threads/call_once/39909.cc: Likewise.
1909 * testsuite/30_threads/call_once/49668.cc: Likewise.
1910 * testsuite/30_threads/call_once/60497.cc: Likewise.
1911 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1912 * testsuite/30_threads/call_once/constexpr.cc: Likewise.
1913 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1914 * testsuite/30_threads/call_once/once_flag.cc: Likewise.
1915 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
1916 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
1917 * testsuite/30_threads/condition_variable/cons/assign_neg.cc:
1919 * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise.
1920 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
1921 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
1922 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
1923 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
1924 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
1925 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
1927 * testsuite/30_threads/condition_variable/requirements/
1928 standard_layout.cc: Likewise.
1929 * testsuite/30_threads/condition_variable/requirements/typedefs.cc:
1931 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
1932 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
1933 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
1934 * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc:
1936 * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
1938 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
1939 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1940 * testsuite/30_threads/future/cons/assign_neg.cc: Likewise.
1941 * testsuite/30_threads/future/cons/constexpr.cc: Likewise.
1942 * testsuite/30_threads/future/cons/copy_neg.cc: Likewise.
1943 * testsuite/30_threads/future/cons/default.cc: Likewise.
1944 * testsuite/30_threads/future/cons/move.cc: Likewise.
1945 * testsuite/30_threads/future/cons/move_assign.cc: Likewise.
1946 * testsuite/30_threads/future/members/45133.cc: Likewise.
1947 * testsuite/30_threads/future/members/get.cc: Likewise.
1948 * testsuite/30_threads/future/members/get2.cc: Likewise.
1949 * testsuite/30_threads/future/members/share.cc: Likewise.
1950 * testsuite/30_threads/future/members/valid.cc: Likewise.
1951 * testsuite/30_threads/future/members/wait.cc: Likewise.
1952 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
1953 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
1954 * testsuite/30_threads/future/requirements/explicit_instantiation.cc:
1956 * testsuite/30_threads/headers/condition_variable/types_std_c++0x.cc:
1958 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
1959 * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: Likewise.
1960 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
1961 * testsuite/30_threads/headers/thread/types_std_c++0x.cc: Likewise.
1962 * testsuite/30_threads/lock/1.cc: Likewise.
1963 * testsuite/30_threads/lock/2.cc: Likewise.
1964 * testsuite/30_threads/lock/3.cc: Likewise.
1965 * testsuite/30_threads/lock/4.cc: Likewise.
1966 * testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
1967 * testsuite/30_threads/lock_guard/requirements/
1968 explicit_instantiation.cc: Likewise.
1969 * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Likewise.
1970 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
1971 * testsuite/30_threads/mutex/cons/assign_neg.cc: Likewise.
1972 * testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
1973 * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise.
1974 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
1975 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
1976 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
1977 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
1978 * testsuite/30_threads/mutex/requirements/standard_layout.cc::
1980 * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise.
1981 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
1982 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
1983 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
1984 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
1985 * testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.
1986 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
1987 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
1988 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
1989 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
1990 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
1991 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
1992 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
1993 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1994 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1995 * testsuite/30_threads/packaged_task/cons/assign_neg.cc: Likewise.
1996 * testsuite/30_threads/packaged_task/cons/copy_neg.cc: Likewise.
1997 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
1998 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
1999 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
2001 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
2002 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
2003 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
2004 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
2005 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
2006 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
2007 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
2008 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
2009 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
2010 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
2011 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
2012 * testsuite/30_threads/packaged_task/requirements/
2013 explicit_instantiation.cc: Likewise.
2014 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2015 * testsuite/30_threads/promise/60966.cc: Likewise.
2016 * testsuite/30_threads/promise/69106.cc: Likewise.
2017 * testsuite/30_threads/promise/cons/1.cc: Likewise.
2018 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
2019 * testsuite/30_threads/promise/cons/alloc2.cc: Likewise.
2020 * testsuite/30_threads/promise/cons/alloc_min.cc: Likewise.
2021 * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
2022 * testsuite/30_threads/promise/cons/copy_neg.cc: Likewise.
2023 * testsuite/30_threads/promise/cons/move.cc: Likewise.
2024 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
2025 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
2026 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
2027 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
2028 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
2029 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
2030 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
2031 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
2032 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
2033 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
2034 * testsuite/30_threads/promise/members/swap.cc: Likewise.
2035 * testsuite/30_threads/promise/requirements/explicit_instantiation.cc:
2037 * testsuite/30_threads/promise/uses_allocator.cc: Likewise.
2039 * testsuite/18_support/numeric_limits/char16_32_t.cc: Qualify names
2041 * testsuite/20_util/align/2.cc: Remove dg-require-cstdint directive.
2042 * testsuite/20_util/duration/arithmetic/1.cc: Likewise.
2043 * testsuite/20_util/duration/arithmetic/2.cc: Likewise.
2044 * testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
2045 * testsuite/20_util/duration/arithmetic/dr934-1.cc: Likewise.
2046 * testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
2047 * testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
2048 * testsuite/20_util/duration/cons/1.cc: Likewise.
2049 * testsuite/20_util/duration/cons/1_neg.cc: Likewise.
2050 * testsuite/20_util/duration/cons/2.cc: Likewise.
2051 * testsuite/20_util/duration/cons/54025.cc: Likewise.
2052 * testsuite/20_util/duration/cons/dr974_neg.cc: Likewise.
2053 * testsuite/20_util/duration/requirements/explicit_instantiation/
2054 explicit_instantiation.cc: Likewise.
2055 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2056 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2057 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2058 * testsuite/20_util/make_signed/requirements/typedefs-4.cc: Likewise.
2059 * testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
2060 * testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
2061 * testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
2062 * testsuite/20_util/ratio/cons/cons1.cc: Likewise.
2063 * testsuite/20_util/ratio/operations/45866.cc: Likewise.
2064 * testsuite/20_util/ratio/operations/47913.cc: Likewise.
2065 * testsuite/20_util/ratio/operations/53840.cc: Likewise.
2066 * testsuite/20_util/ratio/operations/ops1.cc: Likewise.
2067 * testsuite/20_util/shared_ptr/atomic/3.cc: Likewise.
2068 * testsuite/20_util/system_clock/1.cc: Likewise.
2069 * testsuite/20_util/time_point/1.cc: Likewise.
2070 * testsuite/20_util/time_point/2.cc: Likewise.
2071 * testsuite/20_util/time_point/3.cc: Likewise.
2072 * testsuite/20_util/time_point/requirements/explicit_instantiation/
2073 explicit_instantiation.cc: Likewise.
2074 * testsuite/21_strings/basic_string/requirements/
2075 explicit_instantiation/char16_t/1.cc: Likewise.
2076 * testsuite/21_strings/basic_string/requirements/
2077 explicit_instantiation/char32_t/1.cc: Likewise.
2078 * testsuite/21_strings/basic_string_view/requirements/
2079 explicit_instantiation/char16_t/1.cc: Likewise.
2080 * testsuite/21_strings/basic_string_view/requirements/
2081 explicit_instantiation/char32_t/1.cc: Likewise.
2082 * testsuite/21_strings/char_traits/requirements/
2083 explicit_instantiation/char16_t/1.cc: Likewise.
2084 * testsuite/21_strings/char_traits/requirements/
2085 explicit_instantiation/char32_t/1.cc: Likewise.
2086 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Likewise.
2087 * testsuite/22_locale/codecvt/char16_t.cc: Likewise.
2088 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2089 * testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
2091 * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
2093 * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
2095 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2096 * testsuite/23_containers/vector/bool/72847.cc: Likewise.
2097 * testsuite/23_containers/vector/debug/multithreaded_swap.cc:
2099 * testsuite/experimental/string_view/requirements/
2100 explicit_instantiation/char16_t/1.cc: Likewise.
2101 * testsuite/experimental/string_view/requirements/
2102 explicit_instantiation/char32_t/1.cc: Likewise.
2103 * testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/
2105 * testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/
2108 * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2109 (random_condition, throw_value_random, throw_allocator_random)
2110 (std::hash<throw_value_random>): Do not define when <tr1/random> is
2112 * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
2113 define transactional memory support when <stdint.h> is not usable.
2115 * include/bits/hashtable_policy.h (__detail::__clp2): Use faster
2116 implementation that doesn't depend on <stdint.h> types.
2117 * include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
2118 std::size_t when std::uintptr_t is not usable.
2119 [!_GLIBCXX_USE_C99_STDINT_TR1] (pointer_safety, declare_reachable)
2120 (undeclare_reachable, declare_no_pointers, undeclare_no_pointers):
2121 Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
2123 * include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2124 (hash<u16string>, hash<u32string>): Remove dependency on
2125 _GLIBCXX_USE_C99_STDINT_TR1.
2126 * include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2127 (char_traits<char16_t>, char_traits<char32_t>): Remove dependency on
2128 _GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and
2129 __UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable.
2130 * include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2131 (codecvt<char16_t, char, mbstate_t>)
2132 (codecvt<char32_t, char, mbstate_t>)
2133 (codecvt_byname<char16_t, char, mbstate_t>)
2134 (codecvt_byname<char32_t, char, mbstate_t>): Remove dependency
2135 on _GLIBCXX_USE_C99_STDINT_TR1.
2136 * include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2137 (_GLIBCXX_NUM_UNICODE_FACETS): Likewise.
2138 * include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2139 (char_traits<char16_t>, char_traits<char32_t>)
2140 (basic_string<char16_t>, basic_string<char32_t>): Remove dependency
2141 on _GLIBCXX_USE_C99_STDINT_TR1.
2142 * include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
2143 (u16string_view, u32string_view, hash<u16string_view>)
2144 (hash<u32string_view>, operator""sv(const char16_t, size_t))
2145 (operator""sv(const char32_t, size_t)): Likewise.
2146 * include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2147 (hash<__u16vstring>, hash<__u32vstring>): Likewise.
2148 * include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2149 (__u16vstring, __u16sso_string, __u16rc_string, __u32vstring)
2150 (__u32sso_string, __u32rc_string): Likewise.
2151 * include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode)
2152 (codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise.
2153 * include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
2154 (u16string_view, u32string_view, hash<u16string_view>)
2155 (hash<u32string_view>, operator""sv(const char16_t, size_t))
2156 (operator""sv(const char32_t, size_t)): Likewise.
2157 * src/c++11/codecvt.cc: Likewise.
2158 * src/c++98/locale_init.cc: Likewise.
2159 * src/c++98/localename.cc: Likewise.
2161 * include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2162 (__atomic_futex_unsigned_base): Remove dependency on
2163 _GLIBCXX_USE_C99_STDINT_TR1 macro.
2164 * include/bits/unique_lock.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2165 (unique_lock): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1.
2166 * include/c_global/cstdint [!_GLIBCXX_USE_C99_STDINT_TR1] (intmax_t)
2167 (uintmax_t): Define using predefined macros.
2168 * include/std/chrono [!_GLIBCXX_USE_C99_STDINT_TR1] (duration)
2169 (time_point, system_clock, high_resolution_clock, steady_clock): Remove
2170 dependency on _GLIBCXX_USE_C99_STDINT_TR1 macro.
2171 (nanoseconds, microseconds, milliseconds, seconds, minutes, hours):
2172 [!_GLIBCXX_USE_C99_STDINT_TR1]: Define using __INT64_TYPE__ or
2173 long long when <stdint.h> is not usable.
2174 * include/std/condition_variable [!_GLIBCXX_USE_C99_STDINT_TR1]
2175 (condition_variable, condition_variable_any): Remove dependency on
2176 _GLIBCXX_USE_C99_STDINT_TR1.
2177 * include/std/future [!_GLIBCXX_USE_C99_STDINT_TR1] (future, promise)
2178 (packaged_task, async): Likewise.
2179 * include/std/mutex [!_GLIBCXX_USE_C99_STDINT_TR1] (recursive_mutex)
2180 (timed_mutex, recursive_timed_mutex, try_lock, lock, scoped_lock)
2181 (once_flag, call_once): Likewise.
2182 * include/std/ratio [!_GLIBCXX_USE_C99_STDINT_TR1] (ratio): Likewise.
2183 * include/std/shared_mutex [!_GLIBCXX_USE_C99_STDINT_TR1]
2184 (shared_mutex, shared_timed_mutex, shared_lock): Likewise.
2185 * include/std/thread [!_GLIBCXX_USE_C99_STDINT_TR1] (thread)
2186 (this_thread::get_id, this_thread::yield, this_thread::sleep_for)
2187 (this_thread::sleep_until): Likewise.
2188 * src/c++11/chrono.cc: Remove dependency on
2189 _GLIBCXX_USE_C99_STDINT_TR1 macro.
2190 * src/c++11/condition_variable.cc: Likewise.
2191 * src/c++11/futex.cc: Likewise.
2192 * src/c++11/future.cc: Likewise.
2193 * src/c++11/mutex.cc: Likewise.
2194 * src/c++11/thread.cc: Likewise.
2195 * testsuite/20_util/duration/literals/range_neg.cc: Adjust dg-error.
2196 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2197 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2198 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2199 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.
2200 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2202 2018-07-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2205 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2206 xfail execution on 32-bit Solaris/x86.
2208 2018-07-26 Marc Glisse <marc.glisse@inria.fr>
2210 * include/bits/stl_vector.h (_Vector_impl_data::_M_copy_data): New.
2211 (_Vector_impl_data::_M_swap_data): Use _M_copy_data.
2212 (vector::_M_move_assign): Reorder the swaps.
2214 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
2217 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
2218 same alignment for post-release allocation.
2220 2018-07-25 Jonathan Wakely <jwakely@redhat.com>
2223 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
2224 buffer being misaligned and so returned pointer not being at start.
2226 * include/experimental/memory_resource: Include <cstddef> header.
2228 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
2229 * src/Makefile.am: Add comment.
2230 * src/c++17/Makefile.in: Regenerate.
2232 * include/Makefile.am: Add new <bits/unique_lock.h> header.
2233 * include/Makefile.in: Regenerate.
2234 * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex)
2235 (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
2236 (unique_lock): Move definition to ...
2237 * include/bits/unique_lock.h: New header.
2238 [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally.
2239 [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point))
2240 (unique_lock(mutex_type&, duration), unique_lock::try_lock_until)
2241 (unique_lock::try_lock_for): Define only when <chrono> is usable.
2242 * include/std/condition_variable: Include <bits/unique_lock.h>.
2243 * include/std/mutex: Likewise.
2245 2018-07-24 Jonathan Wakely <jwakely@redhat.com>
2247 * config/abi/pre/gnu.ver: Export new symbols.
2248 * configure: Regenerate.
2249 * include/Makefile.am: Add new <memory_resource> header.
2250 * include/Makefile.in: Regenerate.
2251 * include/precompiled/stdc++.h: Include <memory_resource> for C++17.
2252 * include/std/memory_resource: New header.
2253 (memory_resource, polymorphic_allocator, new_delete_resource)
2254 (null_memory_resource, set_default_resource, get_default_resource)
2255 (pool_options, monotonic_buffer_resource): Define.
2256 * src/Makefile.am: Add c++17 directory.
2257 * src/Makefile.in: Regenerate.
2258 * src/c++11/Makefile.am: Fix comment.
2259 * src/c++17/Makefile.am: Add makefile for new sub-directory.
2260 * src/c++17/Makefile.in: Generate.
2261 * src/c++17/memory_resource.cc: New.
2262 (newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
2263 (default_res, new_delete_resource, null_memory_resource)
2264 (set_default_resource, get_default_resource): Define.
2265 * testsuite/20_util/memory_resource/1.cc: New test.
2266 * testsuite/20_util/memory_resource/2.cc: New test.
2267 * testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
2268 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
2269 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
2270 * testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
2271 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
2273 * testsuite/20_util/polymorphic_allocator/1.cc: New test.
2274 * testsuite/20_util/polymorphic_allocator/resource.cc: New test.
2275 * testsuite/20_util/polymorphic_allocator/select.cc: New test.
2276 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
2277 Define concrete memory resource for testing.
2278 (__gnu_test::default_resource_mgr): Define RAII helper for changing
2282 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
2283 parameter by reference, to avoid copying invalid iterators.
2284 * testsuite/25_algorithms/copy/86658.cc: New test.
2286 * include/std/bit (__countl_zero, __countr_zero, __popcount): Use
2287 local variables for number of digits instead of type aliases.
2288 (__log2p1): Remove redundant branch also checked in __countl_zero.
2290 * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
2291 conditions. Add comments.
2292 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
2293 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2294 * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
2296 * include/bits/uses_allocator.h (__is_erased_or_convertible): Remove.
2297 (__uses_allocator_helper): Check conditions directly instead of
2298 using __is_erased_or_convertible.
2300 * include/experimental/memory_resource: Adjust comments and
2302 (__resource_adaptor_imp): Add second template parameter for type of
2303 memory resource base class.
2304 (memory_resource): Define default constructor, destructor, copy
2305 constructor and copy assignment operator as defaulted.
2308 * include/experimental/memory_resource (__get_default_resource): Use
2309 placement new to create an object with dynamic storage duration.
2311 2018-07-23 Jonathan Wakely <jwakely@redhat.com>
2314 * include/experimental/memory_resource
2315 (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
2316 (__resource_adaptor_common::__guaranteed_alignment): New helper to
2317 give maximum alignment an allocator guarantees. Specialize for known
2318 allocators using new and malloc.
2319 (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
2320 (__resource_adaptor_imp::do_deallocate): Likewise.
2321 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2322 Check that new and delete are called with expected sizes.
2324 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
2327 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
2330 2018-07-20 Fangrui Song <maskray@google.com>
2332 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
2333 _GLIBCXX_VISIBILITY(default).
2335 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
2338 * include/std/version: Move __cpp_lib_list_remove_return_type macro.
2340 2018-07-19 Jonathan Wakely <jwakely@redhat.com>
2342 * include/std/type_traits (__is_member_object_pointer_helper): Use
2343 __not_<is_function<_Tp>>::type instead of integral_constant.
2344 (__is_member_function_pointer_helper): Likewise for
2345 is_function<_Tp>::type.
2346 (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
2347 (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
2348 (is_trivially_constructible): Remove redundant use of
2350 (__is_trivially_copy_assignable_impl): Remove redundant use of
2352 (__is_trivially_move_assignable_impl): Remove redundant use of
2354 (is_trivially_destructible): Use __bool_constant.
2355 * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
2356 tests for scalar types.
2358 2018-07-19 Glen Joseph Fernandes <glenjofe@gmail.com>
2360 * include/bits/stl_algobase.h (__copy_move_a): Used
2361 __is_trivially_copyable.
2362 (__copy_move_backward_a): Likewise.
2363 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
2366 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
2369 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
2370 (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
2371 * configure: Regenerate.
2372 * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
2373 * doc/Makefile.in: Regenerate.
2374 * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
2375 * include/Makefile.in: Regenerate.
2376 * libsupc++/Makefile.in: Regenerate.
2377 * po/Makefile.in: Regenerate.
2378 * python/Makefile.in: Regenerate.
2379 * src/Makefile.in: Regenerate.
2380 * src/c++11/Makefile.in: Regenerate.
2381 * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
2382 from -Wabi=2 that don't affect exported symbols.
2383 * src/c++98/Makefile.in: Regenerate.
2384 * src/filesystem/Makefile.in: Regenerate.
2385 * testsuite/Makefile.in: Regenerate.
2387 * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
2388 (_Async_state_common::_M_join): Simplify use of std::call_once and
2389 corresponding explicit instantiation.
2390 (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
2391 (__bind_simple): Remove definitions and explicit instantiation that
2392 are not required by exported symbols.
2394 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
2396 * scripts/create_testsuite_files: Fix typo in comment.
2399 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
2400 non-standard partial specialization.
2401 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
2402 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
2403 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
2405 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
2407 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2408 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2409 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2411 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
2413 * include/debug/functions.h (__gnu_debug::__check_string): Move...
2414 * include/debug/string (__gnu_debug::__check_string): ... here.
2415 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
2416 (__glibcxx_check_string_n_constructor): New.
2417 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
2419 (__glibcxx_check_string_constructor): New.
2420 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
2422 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
2423 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
2425 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
2427 PR libstdc++/84928 use std::move in <numeric> algorithms
2428 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
2429 conditionally move, according to __cplusplus value.
2430 (accumulate, inner_product, partial_sum, adjacent_difference): Use
2431 _GLIBCXX_MOVE_IF_20.
2432 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
2433 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
2434 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
2435 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
2437 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
2439 P0935R0 Eradicating unnecessarily explicit default constructors
2440 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
2441 default constructor symbols.
2442 * include/std/sstream (basic_stringbuf, basic_istringstream)
2443 (basic_ostringstream, basic_stringstream): Remove default arguments
2444 from explicit constructors taking ios_base::openmode and add separate
2445 non-explicit default constructors.
2446 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
2447 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
2448 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
2449 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
2450 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
2452 * include/std/variant (__accepted_index): Use void_t.
2454 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
2457 * config/abi/pre/gnu.ver: Export move constructors and move
2458 assignment operators for std::logic_error and std::runtime_error.
2459 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
2460 _GLIBCXX_USE_NOEXCEPT.
2461 (logic_error, runtime_error): Declare move constructors and move
2462 assignment operators. When not declared already, define copy
2463 constructors and copy assignment operators as explicit-defaulted.
2464 (domain_error, invalid_argument, length_error, out_of_range)
2465 (overflow_error, underflow_error): Define move constructors and move
2466 assignment operators as explicitly-defaulted.
2467 * libsupc++/exception.h (exception): Likewise.
2468 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
2469 move constructors and move assignment operators as defaulted.
2470 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
2471 assignment operators are defined.
2473 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
2475 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2477 * testsuite/21_strings/basic_string/requirements/
2478 explicit_instantiation/debug.cc: Likewise.
2481 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2482 (basic_string::assign(basic_string&&)): Add conditional noexcept
2483 depending on the allocator's is_always_equal property (LWG 2063).
2484 * testsuite/21_strings/basic_string/modifiers/assign/char/
2485 move_assign.cc: Check for non-throwing exception specification.
2486 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2487 move_assign.cc: Likewise.
2490 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2491 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
2492 Add GLIBCXX_NOEXCEPT.
2493 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
2494 to depend on the allocator's is_always_equal property (LWG 2063).
2495 (basic_string::swap(basic_string&)): Likewise.
2496 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
2497 (basic_string::swap(basic_string&)): Likewise.
2498 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
2499 Check is_nothrow_move_assignable.
2500 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
2501 Check is_nothrow_move_assignable.
2502 * testsuite/21_strings/basic_string/cons/char/
2503 noexcept_move_construct.cc: Likewise.
2504 * testsuite/21_strings/basic_string/cons/wchar_t/
2505 noexcept_move_construct.cc: Likewise.
2507 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2509 P0646R1 Improving the Return Value of Erase-Like Algorithms I
2510 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
2512 (forward_list::__remove_return_type): Define typedef as size_type or
2513 void, according to __cplusplus value.
2514 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
2515 empty, according to __cplusplus value.
2516 (forward_list::remove, forward_list::unique): Use typedef and macro
2517 to change return type and add abi-tag for C++2a.
2518 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
2519 typedef to change return type for C++2a.
2520 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
2521 (forward_list::remove, forward_list::remove_if<Pred>)
2522 (forward_list::unique<BinPred>): Return number of removed elements
2524 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
2525 (list::remove, list::unique, list::remove_if<Predicate>)
2526 (list::unique<BinaryPredicate>): Return number of removed elements
2528 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
2529 (list::__remove_return_type): Define typedef as size_type or
2530 void, according to __cplusplus value.
2531 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
2532 empty, according to __cplusplus value.
2533 (list::remove, list::unique): Use typedef and macro to change return
2534 type and add abi-tag for C++2a.
2535 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
2536 typedef to change return type for C++2a.
2537 * include/std/version (__cpp_lib_list_remove_return_type): Define.
2538 * testsuite/23_containers/forward_list/operations/
2539 remove_cxx20_return.cc: New.
2540 * testsuite/23_containers/forward_list/operations/
2541 unique_cxx20_return.cc: New.
2543 P0458R2 Checking for Existence of an Element in Associative Containers
2544 * include/bits/stl_map.h (map::contains): Add for C++2a.
2545 * include/bits/stl_multimap.h (multimap::contains): Likewise.
2546 * include/bits/stl_multiset.h (multiset::contains): Likewise.
2547 * include/bits/stl_set.h (set::contains): Likewise.
2548 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
2549 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
2550 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
2551 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
2552 * include/bits/unordered_map.h (unordered_map::contains)
2553 (unordered_multimap::contains): Add for C++2a.
2554 * include/bits/unordered_set.h (unordered_set::contains)
2555 (unordered_multiset::contains): Likewise.
2556 * testsuite/23_containers/map/operations/contains.cc: New.
2557 * testsuite/23_containers/multimap/operations/contains.cc: New.
2558 * testsuite/23_containers/multiset/operations/contains.cc: New.
2559 * testsuite/23_containers/set/operations/contains.cc: New.
2560 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
2561 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
2563 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
2565 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
2567 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
2570 * include/debug/string
2571 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
2572 Use __glibcxx_check_insert_range.
2573 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
2574 __gnu_debug::string when _GLIBCXX_DEBUG.
2575 * 21_strings/basic_string/init-list.cc: Likewise.
2576 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
2577 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
2578 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
2579 * 21_strings/basic_string/types/1.cc: Likewise.
2581 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2583 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
2584 target for std::random_device.
2585 * testsuite/26_numerics/random/random_device/cons/default.cc:
2587 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
2588 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
2589 * testsuite/experimental/random/randint.cc: Likewise.
2590 * testsuite/lib/libstdc++.exp
2591 (check_effective_target_random_device): New proc.
2593 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2594 Jakub Jelinek <jakub@redhat.com>
2596 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
2598 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2601 * include/std/type_traits (is_trivially_constructible): Check
2602 is_constructible before __is_trivially_constructible.
2603 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
2604 tests, including negative cases.
2605 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
2606 zero for dg-error lineno.
2607 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
2610 * include/std/bit (__rotl, __rotr): Avoid branch.
2611 (_If_is_unsigned_integer): Use remove_cv_t.
2612 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
2614 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
2616 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
2617 * include/Makefile.am: Add new header.
2618 * include/Makefile.in: Regenerate.
2619 * include/precompiled/stdc++.h: Include new header.
2620 * include/std/bit: New header.
2621 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
2622 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
2624 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
2625 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
2626 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
2627 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
2629 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
2630 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
2631 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
2632 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
2633 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
2634 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
2635 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
2636 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
2637 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
2638 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
2640 * include/bits/alloc_traits.h: Remove redundant preprocessor
2643 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
2645 * include/bits/stl_algobase.h (__niter_wrap): New.
2646 (__copy_move_a2(_II, _II, _OI)): Use latter.
2647 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
2648 (fill_n(_OI, _Size, const _Tp&)): Likewise.
2649 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
2650 * include/debug/stl_iterator.h
2651 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
2652 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
2653 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
2654 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
2656 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
2658 P0758R1 Implicit conversion traits
2659 * include/std/type_traits [__cplusplus > 201703]
2660 (__is_convertible_helper::__is_nothrow_type): Define new member.
2661 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
2663 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
2664 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
2666 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
2667 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
2668 * testsuite/20_util/is_nothrow_convertible/requirements/
2669 explicit_instantiation.cc: New.
2670 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
2673 P0887R1 The identity metafunction
2674 * include/std/type_traits (type_identity, type_identity_t): Define
2676 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
2677 * testsuite/20_util/type_identity/requirements/
2678 explicit_instantiation.cc:New.
2679 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
2681 * include/bits/regex.h (sub_match::operator string_type): Call str().
2682 (sub_match::compare): Use _M_str() instead of str().
2683 (sub_match::_M_compare): New public function.
2684 (sub_match::__string_view): New helper type.
2685 (sub_match::_M_str): New overloaded functions to avoid creating a
2686 string_type object when not needed.
2687 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
2688 Use sub_match::_M_compare instead of creating string_type objects.
2689 Fix Doxygen comments.
2690 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
2691 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
2693 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
2695 * include/std/type_traits (__enable_if_t): Define for C++11.
2696 * testsuite/28_regex/sub_match/compare.cc: New.
2697 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
2699 (input_iterator_wrapper): Use remove_cv for value_type argument of
2700 std::iterator base class.
2702 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
2704 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
2705 Add whitespace to dejagnu directive.
2706 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
2708 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
2710 * include/bits/stl_vector.h
2711 (struct _Vector_base<>::_Vector_impl_data): New.
2712 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
2713 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
2714 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
2715 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
2716 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
2717 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
2718 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
2719 (_Vector_base()): Default.
2720 (_Vector_base(_Vector_base&&)): Default.
2721 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
2722 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
2723 (_Vector_base::_M_create_storage(size_t)): Make protected.
2724 (vector()): Default.
2725 (vector(vector&&)): Default.
2726 (vector(vector&&, const allocator_type&, true_type)): New.
2727 (vector(vector&&, const allocator_type&, false_type)): New.
2728 (vector(vector&&, const allocator_type&)): Use latters.
2729 (vector(_InputIte, _InputIte, const allocator_type&)): Call
2730 _M_range_initialize directly.
2731 * include/debug/vector
2732 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
2733 * testsuite/23_containers/vector/allocator/default_init.cc: New.
2734 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
2737 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
2739 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
2740 (__is_byte<byte>): Define specialization for std::byte.
2743 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
2744 Declare explicit instantiations of COW empty reps and I/O functions.
2746 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
2748 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
2750 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
2752 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
2754 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
2757 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
2760 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2761 Replace dict comprehension.
2764 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2767 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
2768 Add try-catch block.
2769 * testsuite/23_containers/vector/cons/86292.cc: New.
2771 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
2773 * include/experimental/algorithm (sample, shuffle): Add new overloads
2774 using per-thread random number engine.
2775 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
2776 dependencies by using __gnu_test::test_container.
2777 * testsuite/experimental/algorithm/sample-2.cc: New.
2778 * testsuite/experimental/algorithm/shuffle.cc: New.
2780 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
2782 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
2783 different size_t mangling on 32-bit targets.
2786 * include/experimental/memory_resource
2787 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
2788 enough for result of left shift.
2791 * include/bits/basic_string.tcc:
2792 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
2793 (basic_string<char>::_Rep::_S_empty_rep_storage)
2794 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
2795 instantiation declarations.
2796 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
2797 explicit instantiation declarations.
2798 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
2799 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
2801 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
2804 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
2805 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
2806 * configure: Regenerate.
2807 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
2808 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
2809 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
2810 (basic_string::insert(iterator, initializer_list<C>)): Suppress
2812 * include/debug/string (basic_string::insert(iterator, C)): Change
2813 first parameter to const_iterator.
2814 (basic_string::insert(iterator, size_type, C)): Likewise. Change
2815 return type to iterator.
2816 (basic_string::insert(iterator, InputIterator, InputIterator)):
2818 (basic_string::insert(iterator, initializer_list<C>)): Change first
2819 parameter to const_iterator and return type to iterator.
2820 * src/c++11/string-inst.cc: Extend comment.
2821 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
2823 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
2825 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2827 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2830 * include/experimental/memory_resource
2831 (__resource_adaptor_imp::do_deallocate): Add missing return.
2832 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
2833 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
2834 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
2835 __gnu_cxx::malloc_allocator.
2838 * include/experimental/memory_resource (__resource_adaptor_common):
2840 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
2841 pointer from unaligned, and vice versa.
2842 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
2843 allocated pointer to meet alignment request.
2844 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
2845 original pointer for deallocation.
2846 (__resource_adaptor_imp::do_is_equal): Reformat.
2847 (__resource_adaptor_imp::_S_aligned_size): Remove.
2848 (__resource_adaptor_imp::_S_supported): Remove.
2849 (new_delete_resource): Use __gnu_cxx::new_allocator.
2850 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
2851 extended alignments and use debug_allocator to check for matching
2852 allocate/deallocate pairs.
2854 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
2856 * include/debug/safe_iterator.h
2857 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
2858 Compare __x base iterator with a value-initialized iterator of the
2861 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
2864 * include/experimental/memory_resource (__resource_adaptor_imp): Add
2865 static assertions to enforce requirements on pointer types.
2866 (__resource_adaptor_imp::get_allocator()): Add noexcept.
2867 (new_delete_resource, null_memory_resource): Return address of an
2868 object with dynamic storage duration.
2869 (__null_memory_resource): Remove.
2870 * testsuite/experimental/memory_resource/70966.cc: New.
2872 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
2873 missed from recent commit.
2875 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
2877 * include/std/utility: Remove unused <exception> header.
2879 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
2881 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
2882 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
2883 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
2884 a specialization of std::pair.
2885 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
2886 pair elements are constructed correctly.
2888 LWG 2989 hide path iostream operators from normal lookup
2889 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
2891 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
2893 LWG 3050 Fix cv-qualification of convertibility constraints
2894 * include/std/chrono (duration, operator*, operator/, operator%): Use
2895 const-qualified type as source type in is_convertible constraints.
2896 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
2897 * testsuite/20_util/duration/cons/dr3050.cc: New.
2898 * testsuite/20_util/duration/literals/range.cc: Rename to...
2899 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
2902 2018-06-18 Maya Rashish <coypu@sdf.org>
2904 * crossconfig.m4: Handle OpenBSD just like NetBSD.
2905 * configure: Rebuilt.
2907 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
2909 P0754R2 <version> header
2910 * include/Makefile.am: Add new header.
2911 * include/Makefile.in: Regenerate.
2912 * include/bits/c++config: Change doxygen comment to suggest <version>
2913 instead of <iosfwd>.
2914 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
2915 unconditionally. Add C++17 and C++20 headers.
2916 * include/std/version: New header.
2917 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
2918 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
2919 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
2920 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
2921 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
2922 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
2923 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
2925 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
2926 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
2927 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
2928 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
2929 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
2930 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
2931 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
2933 * testsuite/18_support/headers/version/macros.cc: New.
2934 * testsuite/18_support/headers/version/macros.cc: New.
2936 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
2937 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
2939 * config.h.in: Regenerate.
2940 * configure: Regenerate.
2941 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
2943 LWG 3035. std::allocator's constructors should be constexpr
2944 * include/bits/allocator.h (allocator): Add constexpr to constructors
2945 for C++2a. Replace dynamic exception specifications with NOTHROW
2947 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
2949 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
2950 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
2951 to constructors for C++2a.
2952 * include/ext/new_allocator.h (new_allocator): Likewise.
2954 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
2956 LWG 3076 basic_string CTAD ambiguity
2957 * doc/xml/manual/intro.xml: Document LWG 3076 change.
2958 * include/bits/basic_string.h
2959 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
2960 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
2961 template constrained by _RequireAllocator.
2962 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
2963 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
2965 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
2967 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2970 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
2973 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2974 (basic_string::data()): Unshare string.
2975 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
2978 * include/std/string_view (basic_string_view(const CharT*)): Remove
2979 check for null pointer and add nonnull attribute.
2980 (compare(const CharT*), compare(size_type, size_type, const CharT*))
2981 (find(const CharT*, size_type), rfind(const CharT*, size_type))
2982 (find_first_of(const CharT*, size_type))
2983 (find_last_of(const CharT*, size_type))
2984 (find_first_not_of(const CharT*, size_type))
2985 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
2986 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
2987 * testsuite/21_strings/basic_string_view/operations/compare/char/
2989 * testsuite/21_strings/basic_string_view/operations/find/char/
2991 * testsuite/21_strings/basic_string_view/operations/rfind/char/
2995 * include/bits/random.h (random_device(const string&)): Remove
2998 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
2999 define for C++17 and above.
3001 LWG 2993 reference_wrapper<T> conversion from T&&
3002 * doc/xml/manual/intro.xml: Document LWG 2993 change.
3003 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
3004 (reference_wrapper(_Tp&&)): Remove.
3005 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
3007 (reference_wrapper): Add deduction guide.
3008 * testsuite/20_util/reference_wrapper/deduction.cc: New.
3009 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
3011 LWG 3039 Unnecessary decay in thread and packaged_task
3012 * include/std/future (__constrain_pkgdtask): Replace with ...
3013 (packaged_task::__not_same): New alias template, using
3014 __remove_cvref_t instead of decay.
3015 * include/std/thread (thread::__not_same): Add comment.
3017 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
3019 LWG 3075 basic_string needs deduction guides from basic_string_view
3020 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
3021 deduction from string views.
3022 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3025 LWG 3074 make scalar types non-deduced in valarray non-member functions
3026 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
3027 scalar parameters to be a non-deduced context.
3028 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
3030 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
3031 * testsuite/26_numerics/valarray/transcend.cc: New.
3033 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
3034 Move back to <utility>.
3035 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
3038 P0935R0 Eradicating unnecessarily explicit default constructors
3039 * include/backward/strstream (strstreambuf): Add non-explicit default
3041 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
3043 * include/bits/regex.h (match_results): Likewise.
3044 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
3045 default constructor.
3046 * testsuite/22_locale/conversions/string/1.cc: Likewise.
3047 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
3048 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
3050 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
3051 macro from <utility> and change type to long.
3052 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
3053 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
3056 P0935R0 Eradicating unnecessarily explicit default constructors
3057 * include/bits/random.h (uniform_real_distribution::param_type)
3058 (normal_distribution::param_type, lognormal_distribution::param_type)
3059 (gamma_distribution::param_type, chi_squared_distribution::param_type)
3060 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
3061 (student_t_distribution::param_type)
3062 (bernoulli_distribution::param_type)
3063 (binomial_distribution::param_type)
3064 (geometric_distribution::param_type)
3065 (negative_binomial_distribution::param_type)
3066 (poisson_distribution::param_type)
3067 (exponential_distribution::param_type)
3068 (weibull_distribution::param_type)
3069 (extreme_value_distribution::param_type): Add non-explicit default
3070 constructors. Remove default argument for first parameter of explicit
3072 * include/bits/uniform_int_dist.h
3073 (uniform_int_distribution::param_type): Likewise.
3074 * include/ext/random
3075 (beta_distribution::param_type, rice_distribution::param_type)
3076 (nakagami_distribution::param_type, pareto_distribution::param_type)
3077 (k_distribution::param_type, arcsine_distribution::param_type)
3078 (hoyt_distribution::param_type, triangular_distribution::param_type)
3079 (von_mises_distribution::param_type)
3080 (hypergeometric_distribution::param_type)
3081 (logistic_distribution::param_type)
3082 (uniform_inside_sphere_distribution::param_type): Likewise.
3083 (uniform_on_sphere_distribution::param_type): Make default constructor
3085 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
3086 Test param_type for non-explicit default constructor.
3087 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
3089 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3091 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3093 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3095 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3097 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3099 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3101 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3103 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3105 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3107 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3109 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3111 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3113 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3115 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3117 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3119 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3121 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3123 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3125 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
3126 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
3127 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
3128 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
3130 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
3131 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
3132 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
3133 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
3135 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
3136 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
3137 * testsuite/ext/random/triangular_distribution/cons/default.cc:
3139 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3141 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3143 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3146 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
3147 Jonathan Wakely <jwakely@redhat.com>
3150 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
3151 Default-construct new elements before moving existing ones.
3152 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
3155 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
3158 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
3160 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
3161 Use node allocator to create and destroy elements.
3162 (forward_list::_Tp_alloc_type): Remove unused typedef.
3163 (forward_list::_Alloc_traits): Use allocator_traits instead of
3164 __gnu_cxx::__alloc_traits.
3166 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
3168 * include/debug/helper_functions.h
3169 (__gnu_debug::_Safe_iterator<>): Add declaration.
3170 (__can_advance(_Ite, _Size)): New.
3171 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
3172 * include/debug/functions.h
3173 (__gnu_debug::_Safe_iterator<>): Remove declaration.
3174 * include/debug/stl_iterator.h
3175 (__can_advance(const _Safe_iterator<>&)): New definition.
3176 * include/debug/stl_iterator.h
3177 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
3178 (__can_advance(const std::move_iterator<>&, _Size)): New.
3179 * include/debug/macros.h (__glibcxx_check_can_increment): New.
3180 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
3181 * include/bits/stl_algobase.h (fill_n): Use latter.
3182 * testsuite/25_algorithms/fill_n/2.cc: New.
3183 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
3184 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
3185 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
3186 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
3188 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
3189 (__glibcxx_requires_can_decrement_range): New.
3191 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
3193 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
3194 (__glibcxx_check_can_decrement_range): New.
3195 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
3196 __glibcxx_requires_can_increment_range.
3197 (std::move(_II, _II, _OI)): Likewise.
3198 (std::copy_backward(_BI, _BI, _BI2)): Use
3199 __glibcxx_requires_can_decrement_range.
3200 (std::move_backward(_BI, _BI, _BI2)): Likewise.
3201 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
3202 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
3203 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
3204 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
3205 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
3206 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
3208 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
3210 P0935R0 Eradicating unnecessarily explicit default constructors
3211 * include/bits/random.h (linear_congruential_engine)
3212 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
3213 (uniform_real_distribution, normal_distribution)
3214 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
3215 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
3216 (bernoulli_distribution, binomial_distribution,geometric_distribution)
3217 (negative_binomial_distribution, exponential_distribution)
3218 (weibull_distribution, extreme_value_distribution): Add non-explicit
3219 default constructors. Remove default argument for first parameter of
3220 explicit constructors.
3221 (piecewise_constant_distribution, piecewise_linear_distribution):
3222 Make default constructor non-explicit.
3223 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
3224 non-explicit default constructors. Remove default argument for first
3225 parameter of explicit constructor.
3226 * include/ext/random
3227 (simd_fast_mersenne_twister_engine, beta_distribution)
3228 (rice_distribution, nakagami_distribution, pareto_distribution)
3229 (k_distribution, arcsine_distribution, hoyt_distribution)
3230 (triangular_distribution, von_mises_distribution)
3231 (hypergeometric_distribution, logistic_distribution)
3232 (uniform_inside_sphere_distribution): Likewise.
3233 (uniform_on_sphere_distribution): Make default constructor
3235 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
3236 Test for non-explicit default constructor. Fix references to standard.
3237 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
3239 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3241 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3243 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3245 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3247 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3249 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3251 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3253 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3255 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3257 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3259 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3261 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3263 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3265 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3267 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3269 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3271 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3273 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3275 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
3276 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
3277 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
3278 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
3280 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
3281 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
3282 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
3283 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
3285 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
3286 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
3287 * testsuite/ext/random/triangular_distribution/cons/default.cc:
3289 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3291 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3293 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3295 * testsuite/util/testsuite_common_types.h
3296 (implicitly_default_constructible): New helper.
3298 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
3300 * include/bits/ios_base.h (ios::Init::Init(const Init&))
3301 (ios::Init::operator=): Define as defaulted.
3302 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
3304 * include/bits/stream_iterator.h (istream_iterator::operator=)
3305 (ostream_iterator::operator=): Likewise.
3306 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
3308 * include/std/bitset (bitset::reference::reference(const reference&)):
3310 * include/std/complex (complex<float>::complex(const complex&))
3311 (complex<double>::complex(const complex&))
3312 (complex<long double>::complex(const complex&)): Likewise.
3314 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
3316 * include/bits/regex.h (sub_match): Add noexcept to default
3317 constructor and length observer.
3318 (match_results): Add noexcept to default constructor and observers
3319 with no preconditions. Define destructor as defaulted.
3320 (operator==, operator!=, swap): Add noexcept.
3321 (regex_iterator): Add default member initializers and define default
3322 constructor and destructor as defaulted. Add noexcept to equality
3323 and dereference operators.
3325 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
3327 * src/c++11/debug.cc
3328 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
3329 (_Safe_iterator_base::_M_detach_single()): Likewise.
3330 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
3331 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
3333 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
3335 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
3336 move of const value.
3338 2018-06-06 Jakub Jelinek <jakub@redhat.com>
3341 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
3342 rather than __cpp_transactional_memory >= 201505L.
3344 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
3347 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
3348 Define new partial specialization.
3349 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
3351 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
3352 value not reference for iteration.
3353 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
3355 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
3356 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
3359 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
3361 * include/std/type_traits: Fix comment typos.
3363 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
3365 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3366 * testsuite/experimental/filesystem/operations/read_symlink.cc:
3369 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
3371 * include/bits/stl_tempbuf.h
3372 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
3373 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
3374 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
3375 * include/bits/stl_algo.h (__stable_partition): Adapt.
3376 (__inplace_merge): Adapt.
3377 (__stable_sort): Adapt.
3379 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
3382 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
3383 unconditionally. Remove redundant declaration.
3384 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
3385 alignment-specifier.
3387 * include/bits/postypes.h (fpos): Define special members as defaulted.
3390 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
3391 the static variable correctly.
3393 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
3395 PR libstdc++/78870 support std::filesystem on Windows
3396 * config.h.in: Regenerate.
3397 * configure: Regenerate.
3398 * configure.ac: Check for link, readlink and symlink.
3399 * include/bits/fs_path.h (path::operator/=(const path&)): Move
3400 definition out of class body.
3401 (path::is_absolute(), path::_M_append(path)): Likewise.
3402 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
3403 (operator>>(basic_istream, path&)): Likewise.
3404 (u8path): Reorder definitions and fix Windows implementation.
3405 (path::is_absolute()): Define inline and fix for Windows.
3406 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
3407 Define POSIX version inline.
3408 (path::_M_append(path)): Define inline.
3409 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
3410 definition out of class body.
3411 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
3413 (operator>>(basic_istream, path&)): Likewise.
3414 (path::is_absolute()): Define inline and fix for Windows.
3415 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
3416 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
3417 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
3418 Define as adaptors for Windows functions/types or as
3419 using-declarations for POSIX functions/types.
3420 (_Dir_base, get_file_type): Qualify names to use declarations from
3421 __gnu_posix namespace.
3422 (_Dir_base::is_dor_or_dotdot): New helper functions.
3423 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
3424 names to use declarations from __gnu_posix namespace.
3425 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
3426 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
3427 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
3428 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
3429 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
3430 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
3431 Define as adaptors for Windows functions/types or as
3432 using-declarations for POSIX functions/types.
3433 (stat_type, do_copy_file): Qualify names to use declarations from
3434 __gnu_posix namespace.
3435 (do_space): Declare new function.
3436 (make_file_type): Only use S_ISLNK if defined.
3437 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
3438 path::value_type not char.
3439 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
3440 names to use declarations from __gnu_posix namespace.
3441 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
3442 add implementation for Windows.
3443 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
3444 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
3445 [!_PC_PATH_MAX]: Don't use pathconf.
3446 [PATH_MAX]: Use if defined.
3447 (filesystem::current_path(const path&, error_code&))
3448 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
3449 (filesystem::last_write_time, filesystem::permissions): Use names
3451 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
3452 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
3453 implementation for Windows.
3454 (filesystem::rename, filesystem::resize_file): Use names from
3456 (filesystem::space): Use do_space.
3457 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
3458 (filesystem::status, filesystem::symlink_status): Use names from
3460 (filesystem::temp_directory_path): Add implementation for Windows.
3461 * src/filesystem/path.cc (dot): Define constant.
3462 (path::replace_extension): Use dot.
3463 (path::_M_find_extension): Likewise. Use path::string_type not
3465 (path::_M_split_cmpts): Use dot.
3466 (filesystem_error::_M_get_what): Use u8string() not native().
3467 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
3468 Qualify names to use declarations from __gnu_posix namespace.
3469 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
3471 (filesystem::absolute(const path&, error_code&)): Add implementation
3473 (char_ptr, filesystem::canonical): Use path::value_type not char.
3474 (do_copy_file): Use names from __gnu_posix.
3475 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
3477 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
3478 names to use declarations from __gnu_posix namespace.
3479 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
3480 add implementation for Windows.
3481 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
3482 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
3483 [!_PC_PATH_MAX]: Don't use pathconf.
3484 [PATH_MAX]: Use if defined.
3485 (filesystem::current_path(const path&, error_code&))
3486 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
3487 (filesystem::last_write_time, filesystem::permissions): Use names
3489 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
3490 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
3491 implementation for Windows.
3492 (filesystem::rename, filesystem::resize_file): Use names from
3495 (filesystem::space): Use do_space.
3496 (filesystem::status, filesystem::symlink_status): Use names from
3498 (filesystem::temp_directory_path): Add implementation for Windows.
3499 * src/filesystem/std-path.cc
3500 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
3502 (dot): Define constant.
3503 (path::replace_extension, is_dot): Use dot.
3504 (path::lexically_normal): Check _M_type instead of calling
3505 non-existent function.
3506 (path::_M_find_extension): Use dot. Use path::string_type not
3508 (path::_M_split_cmpts): Use dot.
3509 (filesystem_error::_M_get_what): Use u8string() not native().
3510 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
3512 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3514 * testsuite/27_io/filesystem/operations/absolute.cc: Use
3515 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
3516 * testsuite/27_io/filesystem/operations/canonical.cc: Use
3517 path::string() to get narrow string, not path::native().
3518 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
3519 with std::filesystem::path not std::basic_string.
3520 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3521 * testsuite/27_io/filesystem/operations/exists.cc: Use
3522 __gnu_test::root_path() instead of "/".
3523 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
3524 fstreams with std::filesystem::path not std::basic_string.
3525 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
3526 path::string() to get narrow string.
3527 * testsuite/27_io/filesystem/operations/space.cc: Check results for
3528 errors, expect sensible values otherwise.
3529 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
3530 helpers for adjusting the environment on Windows.
3531 * testsuite/27_io/filesystem/path/append/path.cc: Test
3532 Windows-specific behaviour.
3533 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
3534 of path::string_type objects.
3535 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
3536 string to wide string on Windows.
3537 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
3538 for backslash as root-directory.
3539 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
3540 path::string() to get narrow string.
3541 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
3543 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
3545 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
3546 different definintion of absolute paths on Windows.
3547 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3548 Do not use symlinks.
3549 * testsuite/experimental/filesystem/operations/absolute.cc: Test
3551 * testsuite/experimental/filesystem/operations/copy.cc: Construct
3552 fstreams with NTCTS not std::basic_string.
3553 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
3554 * testsuite/experimental/filesystem/operations/exists.cc: Use
3555 __gnu_test::root_path() instead of "/".
3556 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
3557 fstreams with NTCTS not std::basic_string.
3558 * testsuite/experimental/filesystem/operations/last_write_time.cc:
3559 Use path::string() to get narrow string.
3560 * testsuite/experimental/filesystem/operations/space.cc: Use
3561 __gnu_test::root_path() instead of "/".
3562 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3563 Add helpers for adjusting the environment on Windows.
3564 * testsuite/experimental/filesystem/path/append/path.cc: Use
3565 path::string() to get narrow strings for comparisons.
3566 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
3567 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
3569 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
3570 * testsuite/experimental/filesystem/path/native/string.cc: Use
3571 string_type not std::string.
3572 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
3573 Adjust for different definintion of absolute paths on Windows.
3574 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
3576 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
3579 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
3582 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
3583 uint_least16_t and uint_least32_t.
3584 (__make_unsigned<wchar_t>): Define unconditionally.
3585 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
3587 (__make_unsigned_selector_base): New type to provide helper templates.
3588 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
3589 __make_unsigned_selector_base helpers.
3590 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
3591 (__make_signed_selector<_Tp, true, false>): Remove intermediate
3593 (__make_signed<wchar_t>, __make_signed<char16_t>)
3594 (__make_signed<char32_t>)): Define unconditionally.
3595 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
3596 wchar_t, char16_t and char32_t are transformed correctly.
3597 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
3599 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
3600 wchar_t, char16_t and char32_t are transformed correctly.
3601 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
3604 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
3606 * include/std/variant (__erased_dtor): Qualify call to __get.
3608 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
3610 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
3611 (_Rb_tree(const allocator_type&)): Use latter.
3612 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
3613 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
3614 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
3615 * include/bits/stl_multimap.h
3616 (multimap(const allocator_type&)): Likewise.
3617 (multimap(initializer_list<value_type>, const allocator_type&)):
3619 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
3621 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
3622 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
3623 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
3624 * include/bits/stl_multiset.h
3625 (multiset(const allocator_type&)): Likewise.
3626 (multiset(initializer_list<value_type>, const allocator_type&)):
3628 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
3631 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
3634 * src/c++11/debug.cc: Remove backtrace usage.
3636 2018-05-24 Maya Rashish <coypu@sdf.org>
3639 * crossconfig.m4: Test for aligned_alloc on netbsd.
3640 * configure: Regenerate.
3642 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
3646 * include/bits/atomic_base.h (__atomic_base::value_type)
3647 (__atomic_base::difference_type): Add new typedefs.
3648 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
3649 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
3650 (atomic<T*>::operator++, atomic<T*>::operator--)
3651 (atomic<T*>::operator+=, atomic<T*>::operator-=)
3652 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
3653 to enforce C++17 requirement on pointer arithmetic.
3654 (__atomic_val_t, __atomic_diff_t): New alias templates.
3655 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
3656 (atomic_compare_exchange_weak_explicit)
3657 (atomic_compare_exchange_strong_explicit, atomic_store)
3658 (atomic_exchange, atomic_compare_exchange_weak)
3659 (atomic_compare_exchange_strong): Use __atomic_val_t to make
3660 scalar parameters be non-deduced contexts.
3661 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
3662 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
3663 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
3665 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
3666 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
3667 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
3668 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
3669 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
3671 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
3672 * testsuite/29_atomics/atomic/69769.cc: New test.
3673 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
3674 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
3675 Disable test for C++17 and later.
3676 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
3677 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
3678 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
3681 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
3683 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
3684 template to alias template.
3685 (path::__value_type_is_char): Use remove_const_t.
3686 (path:_S_string_from_iter): New helper function.
3687 (path::_S_convert(InputIter, __null_terminated))
3688 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
3689 Use _S_string_from_iter.
3690 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
3691 rep for COW strings.
3692 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3693 Change from class template to alias template.
3694 (path::__value_type_is_char): Use remove_const.
3695 (path:_S_string_from_iter): New helper function.
3696 (path::_S_convert(InputIter, __null_terminated))
3697 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
3698 Use _S_string_from_iter.
3699 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
3701 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
3702 string equality, not path equivalence.
3703 * testsuite/27_io/filesystem/path/construct/format.cc: Check
3704 construction from std::string and std::wstring and input iterators.
3705 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
3706 construction from iterators.
3707 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
3708 exact string equality, not path equivalence.
3709 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
3710 construction from iterators.
3712 * include/bits/fs_path.h (path::_M_type): Change default member
3713 initializer to _Filename.
3714 (path::begin): Create past-the-end iterator for empty path.
3715 * src/filesystem/std-path.cc (path::remove_filename()): Remove
3717 (path::has_relative_path()): Return false for empty filenames.
3718 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
3719 Fix offset of empty final component.
3720 * testsuite/27_io/filesystem/path/itr/components.cc: New.
3721 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
3723 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
3725 Add support for opening file streams from wide character strings.
3726 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
3727 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
3728 Define new overload.
3729 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
3730 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
3731 Declare new overload.
3732 * configure.ac: Check for _wfopen.
3733 * crossconfig.m4: Likewise.
3734 * configure: Regenerate.
3735 * config.h.in: Regenerate.
3736 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
3737 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
3738 Define new overload.
3739 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
3740 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
3741 Declare new overload.
3742 [_GLIBCXX_HAVE__WFOPEN]
3743 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
3744 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
3745 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
3746 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
3747 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
3748 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
3750 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
3751 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
3752 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
3753 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
3754 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
3755 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
3756 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
3758 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
3761 * include/bits/stl_tree.h
3762 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
3765 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
3767 * src/filesystem/std-ops.cc (absolute): Report an error for empty
3769 (weakly_canonical(const path&)): Do not call canonical on empty path.
3770 (weakly_canonical(const path&, error_code&)): Likewise.
3771 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
3774 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
3775 dg-require-filesystem-ts.
3778 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
3779 initialize base class to avoid warnings.
3781 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
3783 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
3784 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
3785 little_endian element in bitmask.
3786 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
3787 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
3789 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
3791 * include/bits/stl_tree.h
3792 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
3793 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
3794 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
3795 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
3796 * include/debug/map.h
3797 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
3798 * include/debug/multimap.h
3799 (multimap(multimap&&, const_allocator_type&)): Likewise.
3800 * include/debug/set.h
3801 (set(set&&, const_allocator_type&)): Likewise.
3802 * include/debug/multiset.h
3803 (multiset(multiset&&, const_allocator_type&)): Likewise.
3804 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
3806 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
3808 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
3810 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
3812 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
3814 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
3816 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
3818 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
3821 2018-05-18 Jason Merrill <jason@redhat.com>
3823 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
3824 for conversion to const_iterator. Add defaulted copy ops.
3825 * libsupc++/new (bad_alloc): Add defaulted copy ops.
3826 * libsupc++/exception.h (exception): Add defaulted copy ops.
3827 * include/std/system_error (system_error): Add defaulted copy ops.
3828 * include/std/stdexcept (domain_error, invalid_argument)
3829 (length_error, out_of_range, range_error, overflow_error)
3830 (underflow_error): Add defaulted copy ops.
3831 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
3833 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
3834 * include/ext/throw_allocator.h (condition_base): Add defaulted
3835 default and copy ctor and copy assignment.
3837 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
3840 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
3841 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
3842 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
3843 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
3845 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
3847 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
3848 braces around body of do-while.
3849 * testsuite/28_regex/basic_regex/85098.cc: New
3851 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
3854 * src/filesystem/path.cc (path::preferred_separator): Add used
3856 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
3859 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
3860 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
3861 Refactor to separate non-throwing and throwing implementations.
3862 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
3863 if constructing the object throws.
3865 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
3868 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
3869 (linear_congruential_engine, mersenne_twister_engine)
3870 (subtract_with_carry_engine, discard_block_engine)
3871 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
3872 constrain function templates taking seed sequences.
3873 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
3874 (mersenne_twister_engine::seed(_Sseq&))
3875 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
3877 * include/ext/random (simd_fast_mersenne_twister_engine): Use
3878 __is_seed_seq to constrain function templates taking seed sequences.
3879 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
3880 Change return type to match declaration.
3881 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
3883 * testsuite/26_numerics/random/independent_bits_engine/cons/
3885 * testsuite/26_numerics/random/linear_congruential_engine/cons/
3887 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
3889 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
3890 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
3892 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
3894 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
3898 * include/bits/fs_path.h (path::is_absolute()): Use same definition
3899 for all operating systems.
3900 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
3901 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
3902 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
3903 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
3905 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
3906 unused <vector> header.
3907 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3908 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3909 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3910 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3911 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
3913 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3915 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3916 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3917 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3918 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3919 * testsuite/experimental/filesystem/path/decompose/extension.cc:
3921 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
3922 * testsuite/experimental/filesystem/path/query/has_extension.cc:
3924 * testsuite/experimental/filesystem/path/query/has_filename.cc:
3926 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
3928 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
3930 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
3932 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
3934 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
3936 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
3937 * testsuite/experimental/filesystem/path/query/is_relative.cc:
3941 * include/bits/fs_path.h (path::operator/=, path::append): Construct
3942 temporary path before calling _M_append.
3943 (path::_M_append): Change parameter to path and implement C++17
3945 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
3946 and more examples from the standard.
3947 * testsuite/27_io/filesystem/path/append/source.cc: New.
3948 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
3949 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
3951 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
3952 __invoke to prevent ADL.
3954 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
3957 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
3958 exceptions from _M_terminate_output().
3959 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
3960 exceptions from close().
3961 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
3963 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
3964 (__valarray_get_storage): Call operator new directly. Remove ignored
3965 top-level restrict qualifier and add malloc attribute instead.
3966 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
3969 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
3970 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
3973 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
3975 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
3977 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
3980 * testsuite/20_util/variant/80165.cc: New.
3982 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
3984 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
3985 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
3986 of C++11 containers with Debug Mode support.
3987 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
3988 * doc/html/*: Regenerate.
3990 2018-05-10 Jason Merrill <jason@redhat.com>
3992 * include/bits/regex_compiler.h (_S_cache_size): Change from
3993 function to variable.
3995 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
3997 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
3998 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
3999 argument defaulted to +1. Doxy comments on same.
4000 * testsuite/special_functions/02_assoc_legendre/
4001 check_value.cc: Regen.
4002 * testsuite/tr1/5_numerical_facilities/special_functions/
4003 02_assoc_legendre/check_value.cc: Regen.
4005 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
4008 * include/bits/c++config.h (__replacement_assert): Add linkage
4010 * include/bits/std_abs.h: Add comment to closing brace of block.
4011 * include/c_global/cstddef: Add linkage specification.
4012 * include/c_global/cstring: Likewise.
4013 * include/c_global/cwchar: Likewise.
4015 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
4017 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
4019 (_Safe_iterator<>::_S_constant()): ...that.
4020 * include/debug/safe_local_iterator.h
4021 (_Safe_local_iterator<>::_M_constant()): Rename in...
4022 (_Safe_local_iterator<>::_S_constant()): ...that.
4023 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
4024 (_Iterator_state::__rbegin): New.
4025 (_Iterator_state::__rmiddle): New.
4026 (_Iterator_state::__rend): New.
4027 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
4028 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
4030 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
4031 _Is_iterator)): Likewise.
4032 (_Parameter::_S_reverse_state(_Iterator_state)): New.
4033 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
4034 _Is_iterator)): New.
4035 (_Parameter(std::reverse_iterator<> const&, const char*,
4036 _Is_iterator)): New.
4037 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
4038 const char*, _Is_iterator)): New.
4039 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
4041 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
4042 _Is_iterator)): New.
4043 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
4044 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
4045 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
4047 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
4049 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
4050 Use constexpr if in C++17 mode.
4051 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
4052 Copy from const object.
4053 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
4055 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
4057 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
4058 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
4061 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
4062 * include/debug/functions.h (__check_valid_range): Use latter.
4063 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
4065 * include/debug/deque
4066 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
4067 * include/debug/forward_list
4068 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
4070 * include/debug/list
4071 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4072 * include/debug/list
4073 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4074 * include/debug/map.h
4075 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4076 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
4078 * include/debug/multimap.h
4079 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4080 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
4081 const _Alloc&)): Likewise.
4082 * include/debug/set.h
4083 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4084 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
4086 * include/debug/multiset.h
4087 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4088 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
4089 const _Alloc&)): Likewise.
4090 * include/debug/string
4091 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
4093 * include/debug/unordered_map
4094 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
4096 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
4097 const _Alloc&)): Likewise.
4098 * include/debug/unordered_set
4099 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
4101 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
4102 const _Alloc&)): Likewise.
4103 * include/debug/vector
4104 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
4106 * include/debug/formatter.h (_Error_formatter::_M_function): New.
4107 (_Error_formatter(const char*, unsigned int)): Adapt.
4108 (_Error_formatter::_M_at): Rename in...
4109 (_Error_formatter::_S_at): ...that and adapt.
4110 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
4111 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
4112 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
4115 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
4117 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
4118 Use normal std::vector even in Debug Mode.
4121 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
4122 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
4123 * include/Makefile.in: Regenerate.
4124 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
4125 within conditional block.
4127 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
4129 * doc/xml/manual/using.xml (table.cmd_options): Document that the
4130 C++17 Filesystem implementation also needs -lstdc++fs.
4133 * include/bits/fs_path.h (operator/): Permit copy elision.
4134 * include/experimental/bits/fs_path.h (operator/): Likewise.
4136 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
4138 Moar PR libstdc++/80506
4139 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
4140 Fix magic number used in loop condition.
4142 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
4144 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
4145 * include/std/optional (_Optional_payload): Add noexcept to default
4146 constructor. Re-indent.
4147 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
4148 constructor for copying disengaged payloads.
4149 (_Optional_payload<_Tp, true, false, true>): Likewise.
4150 (_Optional_payload<_Tp, true, true, false>): Likewise.
4151 (_Optional_payload<_Tp, true, false, false>): Likewise.
4152 * testsuite/20_util/optional/cons/85642.cc: New.
4153 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
4155 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
4158 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
4159 inline definitions instead of using-declarations.
4160 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
4161 * testsuite/tr1/5_numerical_facilities/special_functions/
4162 07_conf_hyperg/compile_cxx17.cc: New.
4163 * testsuite/tr1/5_numerical_facilities/special_functions/
4164 17_hyperg/compile_cxx17.cc: New.
4167 * include/std/variant (visit): Qualify std::get call.
4169 PR libstdc++/85632 use uintmax_t for arithmetic
4170 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
4171 arithmetic in result type.
4172 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
4173 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
4174 is greater than free space.
4175 * testsuite/experimental/filesystem/operations/space.cc: New.
4177 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
4178 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
4180 * testsuite/20_util/remove_cvref/value.cc: New.
4181 * testsuite/20_util/remove_cvref/value_ext.cc: New.
4183 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
4184 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
4185 (append(const basic_string&, size_type, size_type)
4186 (assign(const basic_string&, size_type, size_type)
4187 (insert(size_type, const basic_string&, size_type, size_type)
4188 (replace(size_type,size_type,const basic_string&,size_type,size_type)
4189 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
4190 Add default arguments (LWG 2268).
4191 [_GLIBCXX_USE_CXX11_ABI=0]
4192 (append(const basic_string&, size_type, size_type)
4193 (assign(const basic_string&, size_type, size_type)
4194 (insert(size_type, const basic_string&, size_type, size_type)
4195 (replace(size_type,size_type,const basic_string&,size_type,size_type)
4196 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
4198 * testsuite/21_strings/basic_string/dr2268.cc: New test.
4201 * include/std/thread (thread::__not_same): New SFINAE helper.
4202 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
4203 first argument is not a std::thread. Add static assertion to check
4204 INVOKE expression is valid.
4205 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
4206 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
4207 __invoke_result for return types and remove exception specifications.
4208 * testsuite/30_threads/thread/cons/84535.cc: New.
4210 * include/std/future (__async_result_of): Use __invoke_result instead
4213 * include/std/any (any_cast): Use __remove_cvref_t.
4214 * include/std/tuple (__make_tuple): Likewise.
4215 * include/std/type_traits (__remove_cvref_t): Define.
4216 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
4217 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
4218 * include/std/variant (__erased_hash): Use __remove_cvref_t.
4220 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
4222 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
4223 ensure overloaded comma not used.
4224 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
4225 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
4226 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
4227 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
4228 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
4229 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
4230 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
4232 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
4235 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
4236 indices to unsigned.
4237 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
4238 as failure. Refactor error handling.
4239 * testsuite/27_io/ios_base/storage/68197.cc: New.
4243 * include/bits/gslice_array.h (gslice_array): Define default
4244 constructor as deleted, as per C++11 standard.
4245 * include/bits/mask_array.h (mask_array): Likewise.
4246 * include/bits/slice_array.h (slice_array): Likewise.
4247 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
4248 to namespace __detail.
4249 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
4251 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
4252 of data members in closure objects.
4253 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
4254 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
4256 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
4257 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
4258 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
4259 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
4260 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
4261 using-declarations to namespace std.
4262 * testsuite/26_numerics/valarray/83860.cc: New.
4264 * testsuite/backward/strstream_move.cc: Remove duplicate function
4268 * include/backward/strstream (strstreambuf): Define move constructor
4269 and move assignment operator.
4270 (istrstream, ostrstream, strstream): Likewise.
4271 * testsuite/backward/strstream_move.cc: New.
4273 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
4276 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
4277 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
4278 * configure: Regenerate.
4279 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
4280 based on ENABLE_FLOAT128.
4281 * include/Makefile.in: Regenerate.
4282 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
4283 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
4284 _GLIBCXX_USE_FLOAT128.
4286 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4288 * configure: Regenerated.
4290 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4292 * configure: Regenerated.
4294 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
4295 Jakub Jelinek <jakub@redhat.com>
4298 * src/c++11/Makefile.am: Don't generate debuginfo again for
4299 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
4300 * src/c++11/Makefile.in: Regenerate.
4302 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
4305 * testsuite/30_threads/thread/cons/terminate.cc
4306 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
4308 2018-04-18 David Malcolm <dmalcolm@redhat.com>
4311 * configure: Regenerate.
4313 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
4315 * testsuite/experimental/filesystem/file_status/1.cc: Add
4316 -DUSE_FILESYSTEM_TS to dg-options.
4317 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4319 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
4320 * testsuite/experimental/filesystem/iterators/
4321 recursive_directory_iterator.cc: Likewise.
4322 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
4323 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4324 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4325 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
4326 * testsuite/experimental/filesystem/operations/create_directories.cc:
4328 * testsuite/experimental/filesystem/operations/create_directory.cc:
4330 * testsuite/experimental/filesystem/operations/create_symlink.cc:
4332 * testsuite/experimental/filesystem/operations/current_path.cc:
4334 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
4335 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4336 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
4337 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4338 * testsuite/experimental/filesystem/operations/last_write_time.cc:
4340 * testsuite/experimental/filesystem/operations/permissions.cc:
4342 * testsuite/experimental/filesystem/operations/read_symlink.cc:
4344 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4345 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
4346 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
4347 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
4349 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
4350 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
4351 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
4352 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
4353 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
4354 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
4355 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
4356 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
4357 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
4358 * testsuite/experimental/filesystem/path/construct/default.cc:
4360 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
4361 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
4362 * testsuite/experimental/filesystem/path/construct/string_view.cc:
4364 * testsuite/experimental/filesystem/path/decompose/extension.cc:
4366 * testsuite/experimental/filesystem/path/decompose/filename.cc:
4368 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
4370 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
4372 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
4374 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
4376 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
4378 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
4379 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
4381 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
4382 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
4383 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
4385 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
4387 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
4389 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
4391 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
4392 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
4393 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
4395 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
4396 * testsuite/experimental/filesystem/path/query/has_extension.cc:
4398 * testsuite/experimental/filesystem/path/query/has_filename.cc:
4400 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
4402 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
4404 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
4406 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
4408 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
4410 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
4411 * testsuite/experimental/filesystem/path/query/is_relative.cc:
4414 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
4416 * src/c++11/Makefile.am: Fix sed command.
4417 * src/c++11/Makefile.in: Regenerate.
4419 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
4420 handle mangled names starting with double underscores on darwin.
4421 * src/c++11/Makefile.in: Regenerate.
4423 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
4425 * src/c++11/Makefile.am: Fix comment.
4426 * src/c++11/Makefile.in: Regenerate.
4427 * src/c++11/cxx11-ios_failure.cc: Fix comment.
4428 * src/c++98/ios_failure.cc: Likewise.
4430 * src/c++11/ios.cc: Remove redundant macro definition.
4432 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
4434 * doc/xml/manual/abi.xml: Document header locations in recent
4436 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
4437 * doc/xml/manual/spine.xml: Update copyright years.
4438 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
4439 undefined behaviour.
4440 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
4441 * doc/html/*: Regenerate.
4443 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
4445 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
4446 * doc/xml/manual/backwards_compatibility.xml: Likewise.
4447 * doc/xml/manual/containers.xml: Likewise.
4448 * doc/xml/manual/debug_mode.xml: Likewise.
4449 * doc/xml/manual/extensions.xml: Likewise.
4450 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
4451 * doc/xml/manual/using.xml: Likewise.
4452 * doc/xml/manual/utilities.xml: Likewise.
4455 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
4456 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
4457 * src/c++11/Makefile.in: Regenerate.
4458 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
4460 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
4461 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
4462 * src/c++98/ios_failure.cc (__construct_ios_failure)
4463 (__destroy_ios_failure, is_ios_failure_handler): New functions.
4464 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
4465 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
4466 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
4467 handler types, to always catch std::ios_base::failure.
4468 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
4469 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
4470 exceptions_failbit.cc: Likewise.
4471 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
4472 exceptions_failbit.cc: Likewise.
4473 * testsuite/27_io/basic_istream/extractors_other/char/
4474 exceptions_null.cc: Likewise.
4475 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
4476 exceptions_null.cc: Likewise.
4477 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
4478 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
4479 * testsuite/27_io/basic_ostream/inserters_other/char/
4480 exceptions_null.cc: Likewise.
4481 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
4482 exceptions_null.cc: Likewise.
4483 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
4485 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
4487 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
4488 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
4490 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
4493 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
4495 * testsuite/20_util/variant/85183.cc: New.
4497 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
4499 * include/std/variant (__get): Qualify calls to avoid ADL.
4500 (__select_index): Adjust whitespace.
4501 (variant): Add using-declaration to workaround Clang bug.
4503 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
4506 * include/bits/stl_function.h (greater::__not_overloaded)
4507 (less::__not_overloaded, greater_equal::__not_overloaded)
4508 (less_equal::__not_overloaded): Fix ambiguous specializations.
4509 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
4510 tests for type with overloaded operators.
4512 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4515 * testsuite/experimental/memory_resource/resource_adaptor.cc:
4516 xfail execution on 32-bit Solaris/x86.
4518 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
4520 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
4521 VERIFY instead of assert.
4522 * testsuite/20_util/hash/84998.cc: New test.
4523 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
4524 copy of test adjusted for Debug Mode.
4525 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
4528 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
4531 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
4532 * include/std/bitset: Likewise.
4533 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
4535 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
4536 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
4537 * include/bits/stl_set.h (std::set<>): Likewise.
4538 * include/bits/unordered_map.h (std::unordered_map<>): Fix
4539 _Hash_merge_helper friend declaration.
4540 (std::unordered_multimap<>): Likewise.
4541 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
4542 (std::unordered_multiset<>): Likewise.
4544 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
4546 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
4547 trailing slash for domain level link.
4548 * doc/xml/faq.xml: Ditto.
4549 * doc/xml/manual/appendix_free.xml (software): Ditto.
4550 * doc/xml/manual/intro.xml: Ditto.
4551 * doc/xml/manual/spine.xml: Ditto.
4552 * doc/xml/spine.xml: Ditto.
4554 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
4556 * doc/xml/manual/documentation_hacking.xml: Adjust link to
4559 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
4561 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
4562 to compile as C++98.
4564 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
4567 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
4568 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
4569 to ensure total order for pointers.
4570 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
4571 Add operator() overloads for pointer arguments and make generic
4572 overloads dispatch to new _S_cmp functions when comparisons would
4573 use built-in operators for pointers.
4574 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
4576 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
4580 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
4581 * configure: Regenerate.
4582 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
4583 (aligned_alloc): Add using-declaration.
4584 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
4586 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
4588 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
4589 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
4592 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
4595 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
4596 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
4598 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
4599 src/filesystem/std-ops.cc (create_dir): Likewise.
4601 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
4603 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
4604 (StdListIteratorPrinter): Inherit from latter.
4605 (StdFwdListIteratorPrinter): New, inherit from latter.
4606 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
4607 when iterator has no associated container.
4608 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
4609 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
4611 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
4612 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
4614 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4617 * include/std/optional (_Optional_payload): Split into multiple
4618 specializations that can handle different cases of trivial or
4619 non-trivial assignment operators.
4620 * testsuite/20_util/optional/84601.cc: New.
4621 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
4623 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
4626 * include/bits/parse_numbers.h (_Number_help): Add partial
4627 specialization to handle digit separators. Adjust partial
4628 specialization for recursion temrination to require _Pow == 1ULL.
4629 * testsuite/20_util/duration/literals/84671.cc: New
4631 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
4633 Implement the missing bits of LWG 2769
4634 * include/std/any (any_cast(const any&)): Add static_assert.
4635 (any_cast(any&)): Likewise.
4636 (any_cast(any&&)): Likewise, and remove the handling
4637 for copyable-but-not-movable type.
4638 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
4639 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
4642 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
4645 * include/std/thread (thread::__make_invoker): Construct tuple
4646 directly instead of using make_tuple.
4647 * testsuite/30_threads/async/84532.cc: New.
4648 * testsuite/30_threads/thread/84532.cc: New.
4650 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
4652 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
4653 (template<> __aligned_buffer): Define as __aligned_membuf alias.
4655 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
4658 * configure: Regenerate.
4660 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
4663 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
4664 * configure: Regenerate.
4665 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
4667 * include/Makefile.in: Regenerate.
4669 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
4672 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
4673 Add -ffloat-store to options for m68k and ia32.
4675 * doc/xml/faq.xml: Update copyright years.
4676 * doc/html/*: Regenerate.
4679 * include/std/any (any::__do_emplace): Only set _M_manager after
4680 constructing the contained object.
4681 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
4682 * testsuite/20_util/any/modifiers/83658.cc: New test.
4684 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
4687 * include/c_global/cstddef (__byte_operand): Define primary template.
4688 * testsuite/18_support/byte/81076.cc: New test.
4690 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
4692 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
4693 dg-options and dg-add-options order.
4694 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
4695 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
4697 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
4698 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
4700 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
4702 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
4703 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
4705 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
4707 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
4709 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
4711 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
4713 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
4715 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
4717 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
4719 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
4720 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
4721 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
4722 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
4723 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
4724 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
4725 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
4726 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
4727 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
4729 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
4731 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
4733 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
4736 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
4738 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
4739 include linux/types.h when checking linux/random.h header.
4740 * config.h.in: Regenerate.
4742 * src/c++11/random.cc: Conditionally include linux/types.h.
4744 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
4746 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
4748 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
4751 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
4752 pattern with exact match for std::cerr.
4754 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
4757 * include/bits/random.h (chi_squared_distribution::param): Update
4758 gamma distribution parameter.
4759 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
4763 * include/std/type_traits (has_unique_object_representations_v): Add
4765 * testsuite/20_util/has_unique_object_representations/value.cc: Check
4768 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
4770 Make optional conditionally
4771 trivially_{copy,move}_{constructible,assignable}
4772 * include/std/optional (_Optional_payload): Fix the comment in
4773 the class head and turn into a primary and one specialization.
4774 (_Optional_payload::_M_engaged): Strike the NSDMI.
4775 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
4777 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
4779 (_Optional_payload<_Tp, false>::_M_get): Likewise.
4780 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
4781 (_Optional_base_impl): Likewise.
4782 (_Optional_base): Turn into a primary and three specializations.
4783 (optional(nullopt)): Change the base init.
4784 * testsuite/20_util/optional/assignment/8.cc: New.
4785 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
4786 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
4788 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
4791 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
4792 (get_template_arg_list): New.
4793 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
4795 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
4796 of strings and regular expressions.
4797 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
4798 (FilteringTypePrinter): Add docstring. Match using startswith. Use
4799 strip_inline_namespaces instead of strip_versioned_namespace.
4800 (add_one_type_printer): Prepend namespace to match argument.
4801 (register_type_printers): Add type printers for char16_t and char32_t
4802 string types and for types using cxx11 ABI. Update calls to
4803 add_one_template_type_printer to provide default argument dicts.
4804 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
4805 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
4806 basic_string<unsigned char> and basic_string<signed char>.
4807 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
4808 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
4810 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
4813 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
4815 2018-01-13 Tim Shen <timshen@google.com>
4818 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
4819 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
4820 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
4822 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4825 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
4826 Remove dg-xfail-run-if.
4828 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
4830 * include/bits/forward_list.h
4831 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
4832 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
4833 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
4834 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
4835 (_Fwd_list_impl()): Add noexcept qualification.
4836 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
4837 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
4838 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
4839 (_Fwd_list_base()): Default.
4840 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
4841 (_Fwd_list_base(_Fwd_list_base&&)): Default.
4842 (forward_list<>()): Default.
4843 (forward_list<>(forward_list&&)): Default.
4844 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
4845 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
4846 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
4847 * include/bits/forward_list.tcc
4848 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
4849 _M_impl._M_head move assignment.
4850 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
4851 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
4853 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
4856 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
4857 (UniquePointerPrinter): Print correct template argument, not type of
4859 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
4861 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
4863 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
4864 weak_ptr of array types.
4866 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
4869 * include/bits/hashtable_policy.h
4870 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
4872 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
4873 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
4874 Add false_type parameter.
4875 (_Insert_base::insert): Adapt.
4876 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
4878 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
4879 Add __n_elt parameter, defaulted to 1.
4880 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
4881 policy _M_need_rehash.
4882 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
4883 produce only 1 rehash if necessary.
4884 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
4885 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
4887 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
4888 Jonathan Wakely <jwakely@redhat.com>
4890 PR libstdc++/59253 (partial)
4891 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
4892 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
4893 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
4895 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
4896 of unique_ptr printer.
4897 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
4898 output of shared_ptr printer.
4900 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
4903 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
4904 unnecessary symlink_status call.
4905 (remove_all(const path&, error_code&)): Use filesystem::remove.
4906 * src/filesystem/std-ops.cc: Likewise.
4909 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
4913 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
4914 report an error for ENOENT.
4915 (remove_all(const path&)): Fix type of result variable.
4916 (remove_all(const path&, error_code&)): Use non-throwing increment
4917 for directory iterator. Call POSIX remove directly to avoid redundant
4918 calls to symlink_status. Do not report errors for ENOENT.
4919 * src/filesystem/std-ops.cc: Likewise.
4920 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
4922 * testsuite/experimental/filesystem/operations/remove_all.cc:
4925 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
4928 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
4929 redundant call to ec.clear().
4930 (remove_all(const path&, error_code&))): Do not return an error for
4932 * src/filesystem/std-ops.cc: Likewise.
4933 * testsuite/27_io/filesystem/operations/remove.cc: New test.
4934 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
4935 results for non-existent paths.
4936 * testsuite/experimental/filesystem/operations/remove.cc: New test.
4937 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
4938 expected results for non-existent paths.
4940 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
4941 check status_known once.
4942 * include/experimental/bits/fs_ops.h: Likewise.
4945 * include/std/functional (__is_byte_like): New trait.
4946 (__is_std_equal_to): Remove.
4947 (__boyer_moore_base_t): Use __is_byte_like instead of
4949 * include/experimental/functional (__is_std_equal_to): Remove.
4950 (__boyer_moore_base_t): Use __is_byte_like instead of
4952 * testsuite/20_util/function_objects/83607.cc: New test.
4954 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
4956 Protect optional's deduction guide with the feature macro
4957 * include/std/optional: Use the feature macro.
4959 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4961 Update copyright years.
4963 Copyright (C) 2018 Free Software Foundation, Inc.
4965 Copying and distribution of this file, with or without modification,
4966 are permitted in any medium without royalty provided the copyright
4967 notice and this notice are preserved.