]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/ChangeLog
Fix testsuite failures in Debug Mode
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
1 2018-10-19 Jonathan Wakely <jwakely@redhat.com>
2
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.
10
11 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
12
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.
17
18 PR libstdc++/87642
19 * config/locale/gnu/monetary_members.cc
20 (moneypunct<char, true>::_M_initialize_moneypunct): Use
21 __narrow_multibyte_chars to convert multibyte thousands separators
22 to a single char.
23 * config/locale/gnu/numeric_members.cc
24 (numpunct<char>::_M_initialize_numpunct): Likewise.
25 (__narrow_multibyte_chars): New function.
26
27 PR libstdc++/87641
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.
36
37 2018-10-18 François Dumont <fdumont@gcc.gnu.org>
38
39 Partial revert.
40 2018-10-08 François Dumont <fdumont@gcc.gnu.org>
41
42 * include/debug/list (list<>::cbegin()): Use C++11 direct
43 initialization.
44 (list<>::cend()): Likewise.
45 (list<>::erase(const_iterator, const_iterator)): Ensure consistent
46 iterator comparisons.
47 (list<>::splice(const_iterator, list&&, const_iterator,
48 const_iterator)): Likewise.
49
50 Partial revert.
51 2018-10-15 François Dumont <fdumont@gcc.gnu.org>
52
53 * include/debug/vector (vector<>::cbegin()): Use C++11 direct
54 initialization.
55 (vector<>::cend()): Likewise.
56 (vector<>::insert(const_iterator, const _Tp&)): Use consistent
57 iterator comparison.
58 (vector<>::erase(const_iterator)): Likewise.
59 (vector<>::erase(const_iterator, const_iterator)): Likewise.
60
61 2018-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
62
63 PR libstdc++/87619
64 * include/std/variant (__select_index): Fix an off-by-one.
65 * testsuite/20_util/variant/87619.cc: New.
66
67 2018-10-16 Jonathan Wakely <jwakely@redhat.com>
68
69 * include/bits/random.h (random_device) [!_GLIBCXX_USE_DEV_RANDOM]:
70 Fix default constructor to call correct function.
71
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>.
75
76 * include/experimental/bits/net.h: Move versioned namespace macros
77 to correct location.
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.
85
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>
90 instead of <mutex>.
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
105 an error.
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]:
109 Likewise.
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]:
127 Likewise.
128 (basic_socket_acceptor::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
129
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:
139 Likewise.
140 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
141 Likewise.
142 * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
143 * testsuite/experimental/net/internet/address/v4/creation.cc:
144 Likewise.
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:
148 Likewise.
149 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
150 Likewise.
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.
154
155 * include/experimental/socket (basic_socket::at_mark): Add missing
156 return.
157
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.
169
170 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
171
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.
181
182 2018-10-16 Jonathan Wakely <jwakely@redhat.com>
183
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
187 variable.
188 * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
189
190 PR libstdc++/87618
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.
195
196 2018-10-15 Jonathan Wakely <jwakely@redhat.com>
197
198 * testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
199 account for change to glibc it_IT localedata (glibc bz#10797).
200
201 PR libstdc++/87587
202 * src/c++11/cxx11-shim_facets.cc: Suppress -Wabi warnings.
203
204 2018-10-15 François Dumont <fdumont@gcc.gnu.org>
205
206 * include/debug/vector (vector<>::cbegin()): Use C++11 direct
207 initialization.
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)):
213 Likewise.
214 (vector<>::erase(const_iterator)): Likewise.
215 (vector<>::erase(const_iterator, const_iterator)): Likewise.
216
217 2018-10-12 Jonathan Wakely <jwakely@redhat.com>
218
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
239 test.
240 * testsuite/experimental/net/headers.cc: New test.
241 * testsuite/experimental/net/internet/address/v4/comparisons.cc: New
242 test.
243 * testsuite/experimental/net/internet/address/v4/cons.cc: New test.
244 * testsuite/experimental/net/internet/address/v4/creation.cc: New
245 test.
246 * testsuite/experimental/net/internet/address/v4/members.cc: New
247 test.
248 * testsuite/experimental/net/internet/resolver/base.cc: New test.
249 * testsuite/experimental/net/internet/resolver/ops/lookup.cc: New
250 test.
251 * testsuite/experimental/net/internet/resolver/ops/reverse.cc: New
252 test.
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.
256
257 PR libstdc++/77691
258 * include/experimental/memory_resource (__resource_adaptor_imp): Do
259 not allocate sizes smaller than alignment when relying on guaranteed
260 alignment.
261 * testsuite/experimental/memory_resource/new_delete_resource.cc:
262 Adjust expected number of bytes allocated for alignof(max_align_t).
263
264 2018-10-11 François Dumont <fdumont@gcc.gnu.org>
265
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&)):
277 Likewise.
278 (forward_list<>::insert_after(const_iterator, initializer_list<>)):
279 Likewise.
280 (forward_list<>::erase_after(const_iterator)): Likewise.
281 (forward_list<>::erase_after(const_iterator, const_iterator)): Likewise
282 and ensure consistent iterator comparison.
283
284 * include/bits/forward_list.h
285 (_Fwd_list_iterator<>::operator==): Replace member function with inline
286 friend.
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.
297
298 2018-10-11 Jonathan Wakely <jwakely@redhat.com>
299
300 PR libstdc++/80538
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.
309
310 * include/bits/allocator.h
311 (operator==(const allocator<_Tp>&, const allocator<_Tp>))
312 (operator!=(const allocator<_Tp>&, const allocator<_Tp>)): Replace
313 with inline friends.
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.
322
323 2018-10-10 Jonathan Wakely <jwakely@redhat.com>
324
325 PR libstdc++/87544
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):
329 Likewise.
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.
334
335 2018-10-09 François Dumont <fdumont@gcc.gnu.org>
336
337 * include/bits/stl_list.h
338 (_List_operator<>::operator==): Replace member function with inline
339 friend.
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<>&)):
344 Remove.
345 (operator!=(const _List_iterator<>&, const _List_const_iterator<>&)):
346 Remove.
347
348 2018-10-09 Jonathan Wakely <jwakely@redhat.com>
349
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.
354
355 2018-10-08 Jonathan Wakely <jwakely@redhat.com>
356
357 PR libstdc++/87538
358 * testsuite/experimental/functional/87538.cc: New test.
359
360 PR libstdc++/87538
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.
364
365 2018-10-08 François Dumont <fdumont@gcc.gnu.org>
366
367 * include/debug/list (list<>::cbegin()): Use C++11 direct
368 initialization.
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.
377
378 2018-10-05 François Dumont <fdumont@gcc.gnu.org>
379
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
392 deprecate.
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.
404
405 2018-10-03 Jonathan Wakely <jwakely@redhat.com>
406
407 PR libstdc++/59439
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.
414
415 2018-10-03 François Dumont <fdumont@gcc.gnu.org>
416
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.
455
456 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
457
458 PR libstdc++/87258
459 * include/bits/stl_bvector.h (vector::begin(), vector::cbegin()):
460 Rebuild _M_start with an explicit 0 offset.
461
462 2018-10-02 Jonathan Wakely <jwakely@redhat.com>
463
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.
468
469 2018-10-02 Joseph Myers <joseph@codesourcery.com>
470
471 * testsuite/lib/libstdc++.exp (libstdc++_init): Use
472 -fno-show-column in default cxxflags.
473
474 2018-10-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
475
476 * config/os/uclibc/os_defines.h (__NO_STRING_INLINES): Delete.
477
478 2018-10-01 Gerald Pfeifer <gerald@pfeifer.com>
479
480 * doc/xml/manual/allocator.xml: Adjust link to "Reconsidering
481 Custom Memory Allocation".
482
483 2018-10-01 Jonathan Wakely <jwakely@redhat.com>
484
485 * doc/html/*: Regenerate.
486
487 2018-09-30 Gerald Pfeifer <gerald@pfeifer.com>
488
489 * doc/xml/manual/messages.xml: Switch link to www.oracle.com
490 to https.
491
492 2018-09-30 Gerald Pfeifer <gerald@pfeifer.com>
493
494 * doc/xml/manual/policy_data_structures_biblio.xml: Update
495 link to Microsoft Component Model Object Technologies.
496
497 2018-09-29 Gerald Pfeifer <gerald@pfeifer.com>
498
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.
502
503 2018-09-28 François Dumont <fdumont@gcc.gnu.org>
504
505 * include/debug/functions.h
506 (__foreign_iterator_aux3(const _Safe_iterator<>&, const _InputeIter&,
507 const _InputIter&, __true_type)): Use empty() rather than begin() ==
508 end().
509
510 2018-09-25 Mike Crowe <mac@mcrowe.com>
511
512 * include/std/condition_variable (condition_variable::wait_for): Use
513 steady clock in overload that uses a predicate.
514
515 2018-09-25 Jonathan Wakely <jwakely@redhat.com>
516
517 PR libstdc++/87431
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.
521
522 2018-09-25 Gerald Pfeifer <gerald@pfeifer.com>
523
524 * doc/xml/manual/codecvt.xml: Move link to "UTF-8 and Unicode FAQ"
525 to https.
526
527 2018-09-24 Gerald Pfeifer <gerald@pfeifer.com>
528
529 * doc/xml/manual/policy_data_structures_biblio.xml: Update link
530 to "Priority Queues and the STL".
531
532 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
533
534 * doc/xml/manual/using_exceptions.xml: Move boost.orgs link to
535 https.
536
537 2018-09-21 François Dumont <fdumont@gcc.gnu.org>
538
539 PR libstdc++/87135
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:
544 Adapt.
545
546 2018-09-21 Jonathan Wakely <jwakely@redhat.com>
547
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).
552
553 2018-09-20 Christophe Lyon <christophe.lyon@linaro.org>
554
555 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Skip
556 on arm*.
557
558 2018-09-19 Jonathan Wakely <jwakely@redhat.com>
559
560 * include/bits/regex_automaton.tcc (_StateSeq<_TraitsT>::_M_clone()):
561 Remove __glibcxx_assert statements and use map::find instead of
562 map::operator[].
563
564 2018-09-18 François Dumont <fdumont@gcc.gnu.org>
565
566 PR libstdc++/87135
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.
575
576 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
577
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
582 rvalue.
583 * testsuite/20_util/unique_ptr/requirements/incomplete.cc: New test.
584
585 2018-09-13 Jonathan Wakely <jwakely@redhat.com>
586
587 * include/std/variant (variant) [__clang__]: Limit workaround to
588 Clang 7 and older.
589
590 2018-09-11 Jonathan Wakely <jwakely@redhat.com>
591
592 PR libstdc++/87278
593 * include/bits/shared_ptr.h (make_shared): Use remove_cv instead of
594 remove_const.
595 * testsuite/20_util/shared_ptr/creation/87278.cc: New test.
596
597 Implement LWG 2905 changes to constrain unique_ptr constructors
598 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add assertions to
599 check deleter type.
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.
613
614 2018-09-05 Jonathan Wakely <jwakely@redhat.com>
615
616 * libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment.
617
618 2018-09-03 Jonathan Wakely <jwakely@redhat.com>
619
620 PR libstdc++/78179
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.
625
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.
629
630 PR libstdc++/87194
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.
679
680 PR libstdc++/78595
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
693 test.
694
695 2018-09-02 François Dumont <fdumont@gcc.gnu.org>
696
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):
700 New.
701 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
702 ::_OtherSelf): New.
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<>&)):
711 Likewise.
712 (operator!=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
713 Likewise.
714 (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
715 (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
716 Likewise.
717 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
718 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
719 Likewise.
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
725 copy.
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
736 parameter.
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
741 local_iterator.
742 (struct forward_members_unordered<_Tp, false>): Remove partial
743 specialization.
744 * testsuite/23_containers/forward_list/types/1.cc: New.
745 * testsuite/23_containers/list/types/1.cc: New.
746
747 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
748
749 * doc/xml/manual/profile_mode.xml: Update three ieeexplore.ieee.org
750 references.
751
752 2018-08-31 Sandra Loosemore <sandra@codesourcery.com>
753
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:
757 Likewise.
758 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
759 Likewise.
760 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
761 Likewise.
762 * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc:
763 Likewise.
764 * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc:
765 Likewise.
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:
772 Likewise.
773 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc:
774 Likewise.
775 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc:
776 Likewise.
777 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc:
778 Likewise.
779 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc:
780 Likewise.
781 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc:
782 Likewise.
783 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc:
784 Likewise.
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:
790 Likewise.
791 * testsuite/27_io/basic_istream/extractors_other/wchar_t/2.cc:
792 Likewise.
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:
802 Likewise.
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:
810 Likewise.
811 * testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
812
813 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
814
815 * testsuite/experimental/propagate_const/observers/1.cc: Make
816 dependence on -fdelete-null-pointer-checks explicit.
817
818 2018-08-30 Jonathan Wakely <jwakely@redhat.com>
819
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.
826
827 * config/abi/pre/gnu.ver: Add missing exports for mingw.
828
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
832 long long values.
833
834 2018-08-29 Jonathan Wakely <jwakely@redhat.com>
835
836 PR libstdc++/31413
837 * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Check D_FMT
838 string for alternative format.
839
840 2018-08-28 Jonathan Wakely <jwakely@redhat.com>
841
842 PR libstdc++/87116
843 * src/filesystem/std-path.cc (path::lexically_normal): When handling
844 a dot-dot filename, preserve an empty final component in the iteration
845 sequence.
846 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
847 root-directory.
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.
852
853 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
854
855 PR libstdc++/70694
856 * configure.host (OPT_LDFLAGS): Don't append
857 -fvisibility-inlines-hidden for newer Darwin.
858
859 2018-08-24 Marc Glisse <marc.glisse@inria.fr>
860
861 PR libstdc++/86822
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.
865
866 2018-08-24 Jonathan Wakely <jwakely@redhat.com>
867
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
878 test.
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
885 test.
886 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
887 New test.
888 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
889 New test.
890 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc: New
891 test.
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
895 test.
896
897 2018-08-23 Jonathan Wakely <jwakely@redhat.com>
898
899 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
900 Only define when RTTI is enabled.
901
902 * include/debug/vector (__niter_base): Define for C++98.
903
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.
907
908 * scripts/check_compile: Fix comments.
909
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.
913
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]:
933 Likewise.
934 (insert(const_iterator, initializer_list<_CharT>))
935 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
936 * testsuite/21_strings/basic_string/init-list.cc: Remove effective
937 target directive.
938
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.
942
943 * testsuite/21_strings/basic_string/init-list.cc:
944 Require cxx11-abi.
945 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
946 Likewise.
947 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
948 Likewise.
949
950 * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for
951 C++98 mode.
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.
957
958 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
959
960 PR libstdc++/87061
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
975 cxx11-abi.
976 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
977
978 PR libstdc++/78448
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
997 function-like macro.
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.
1003
1004 2018-08-22 François Dumont <fdumont@gcc.gnu.org>
1005
1006 PR libstdc++/68222
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&)):
1030 Move...
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&)):
1034 Move...
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&)):
1038 Move...
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&)):
1042 Move...
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&)):
1046 Move...
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<>&)):
1052 Likewise.
1053 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1054 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1055 Likewise.
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
1063 specialization.
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&)):
1115 Declare.
1116 (__valid_range(const _Safe_local_iterator<>&,
1117 const _Safe_local_iterator<>&, typename _Distance_traits<>::__type&)):
1118 Declare.
1119 (__valid_range<>(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1120 Declare.
1121 (__valid_range(const _Safe_local_iterator<>&, const _Safe_local_iterator<>&)):
1122 Declare.
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
1143 line number.
1144 * testsuite/23_containers/unordered_set/debug/debug_functions.cc:
1145 (test01): Remove.
1146 * testsuite/23_containers/vector/debug/debug_functions.cc (test01):
1147 Remove.
1148
1149 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
1150
1151 PR libstdc++/77854
1152 * doc/xml/manual/status_cxx1998.xml: Document size_type and
1153 difference_type for containers.
1154 * doc/html/*: Regenerate.
1155
1156 2018-08-21 François Dumont <fdumont@gcc.gnu.org>
1157
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
1169 elements for C++2a.
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
1177 C++2a.
1178 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use typedef
1179 to change return type for C++2a. Return number of removed elements for
1180 C++2a.
1181
1182 2018-08-21 David Edelsohn <dje.gcc@gmail.com>
1183
1184 * testsuite/18_support/new_nothrow.cc: XFAIL on AIX.
1185
1186 2018-08-21 Jonathan Wakely <jwakely@redhat.com>
1187
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.
1194
1195 2018-08-20 Jonathan Wakely <jwakely@redhat.com>
1196
1197 PR libstdc++/86963
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.
1210
1211 * include/std/optional (_Optional_payload): Use variable templates
1212 for conditions in default template arguments and exception
1213 specifications.
1214 (optional): Likewise. Adjust indentation.
1215 (optional::__not_self, optional::__not_tag, optional::_Requires): New
1216 SFINAE helpers.
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.
1221
1222 2018-08-18 François Dumont <fdumont@gcc.gnu.org>
1223
1224 * testsuite/25_algorithms/copy/86658.cc: Use dg-options to define
1225 _GLIBCXX_DEBUG.
1226
1227 2018-08-17 Jonathan Wakely <jwakely@redhat.com>
1228
1229 PR libstdc++/86963
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
1250 specifications.
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
1258 to dg-prune-output.
1259
1260 2018-08-16 Jonathan Wakely <jwakely@redhat.com>
1261
1262 * include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning
1263 about signed/unsigned comparison.
1264
1265 * include/std/ostream (basic_ostream::sentry::~sentry): Suppress
1266 deprecation warnings for using uncaught_exception().
1267
1268 PR libstdc++/86447
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.
1275
1276 2018-08-15 Jonathan Wakely <jwakely@redhat.com>
1277
1278 * include/experimental/regex: Remove begin/end macros for namespace.
1279 * include/experimental/string: Likewise.
1280 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
1281 New test.
1282 * testsuite/experimental/polymorphic_allocator/
1283 pmr_typedefs_forward_list.cc: New test.
1284 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
1285 New test.
1286 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
1287 New test.
1288 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
1289 New test.
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:
1295 New test.
1296 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1297 New test.
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:
1307 New test.
1308
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
1322 not by reference.
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:
1329 New test.
1330
1331 * src/c++17/memory_resource.cc [!_GLIBCXX_HAS_GTHREADS]
1332 (atomic_mem_res): Add unsynchronized definition for single-threaded.
1333
1334 2018-08-14 Jonathan Wakely <jwakely@redhat.com>
1335
1336 PR libstdc++/86954
1337 * include/bits/stl_tempbuf.h (return_temporary_buffer): Use
1338 non-placement delete.
1339
1340 * include/std/chrono (__check_overflow): Simplify definition.
1341 (_Checked_integral_constant): Remove.
1342
1343 PR libstdc++/86846
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.
1348
1349 PR libstdc++/85343
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.
1361
1362 2018-08-14 Jeremy Sawicki <jeremy-gcc@sawicki.us>
1363
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.
1370
1371 2018-08-13 Jonathan Wakely <jwakely@redhat.com>
1372
1373 PR libstdc++/45093
1374 * include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
1375 Combine definitions to avoid --detect-odr-violations warning.
1376
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.
1380
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>.
1384
1385 Revert
1386 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
1387
1388 PR target/85904
1389 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
1390 Newlib.
1391 * configure: Regenerate.
1392
1393 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
1394
1395 PR libstdc++/68210
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
1401 of free(ptr).
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
1413 with noexcept.
1414 * libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
1415 malloc(sz).
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.
1420
1421 2018-08-10 Martin Liska <mliska@suse.cz>
1422
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.
1427
1428 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
1429
1430 PR target/85904
1431 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
1432 Newlib.
1433 * configure: Regenerate.
1434
1435 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
1436
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):
1446 Likewise.
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
1462 test.
1463 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New
1464 test.
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.
1468
1469 2018-08-08 François Dumont <fdumont@gcc.gnu.org>
1470
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
1475 duplication...
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)):
1480 Likewise.
1481 (__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)):
1482 Likewise.
1483
1484 2018-08-08 Jonathan Wakely <jwakely@redhat.com>
1485
1486 * libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
1487 avoid clashing with an ::aligned_alloc function that was not detected
1488 by configure.
1489
1490 * doc/xml/manual/using.xml: Fix markup for empty table entry.
1491 * doc/html/*: Regenerate.
1492
1493 * doc/xml/manual/using.xml: Add missing header to table and fix typo.
1494 * doc/html/*: Regenerate.
1495
1496 PR libstdc++/86597
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.
1500
1501 2018-08-07 Jonathan Wakely <jwakely@redhat.com>
1502
1503 PR libstdc++/86874
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.
1512
1513 PR libstdc++/86861
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.
1522
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):
1533 Define.
1534 (monotonic_buffer_resource::_M_new_buffer): Define.
1535 (monotonic_buffer_resource::_M_release_buffers): Define.
1536
1537 2018-08-05 François Dumont <fdumont@gcc.gnu.org>
1538
1539 * include/bits/stl_iterator.h: Fix comment.
1540
1541 2018-08-03 Jonathan Wakely <jwakely@redhat.com>
1542
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.
1548
1549 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
1550
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.
1555
1556 2018-08-01 Mike Crowe <mac@mcrowe.com>
1557
1558 * include/std/condition_variable (wait_for): Use steady_clock.
1559
1560 2018-08-01 Mike Crowe <mac@mcrowe.com>
1561
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.
1567
1568 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
1569
1570 PR libstdc++/60555
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
1576 test.
1577
1578 2018-07-31 Jonathan Wakely <jwakely@redhat.com>
1579
1580 PR libstdc++/86751
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.
1589
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):
1603 Likewise.
1604 [!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
1605 * libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
1606 from here.
1607
1608 * doc/xml/manual/test.xml: Improve documentation on writing tests for
1609 newer standards.
1610 * doc/xml/manual/using.xml: Document all headers for C++11 and later.
1611 * doc/html/*: Regenerate.
1612
1613 * include/ext/pointer.h [__cplusplus >= 201103L]
1614 (_Pointer_adapter::operator bool): Add explicit conversion operator
1615 to replace safe bool idiom.
1616
1617 2018-07-30 Jonathan Wakely <jwakely@redhat.com>
1618
1619 PR libstdc++/86734
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.
1625
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.
1629
1630 2018-07-26 Marek Polacek <polacek@redhat.com>
1631
1632 * testsuite/30_threads/condition_variable_any/cond.cc: New.
1633
1634 2018-07-26 Marek Polacek <polacek@redhat.com>
1635
1636 * src/c++98/locale_init.cc: Fix #ifdef condition.
1637
1638 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
1639
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:
1647 Likewise.
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
1658 and random_device.
1659 * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Require
1660 cstdint.
1661 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1662 Likewise.
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/
1688 64351.cc: Likewise.
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:
1696 Likewise.
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.
1723
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:
1728 Likewise.
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:
1732 Likewise.
1733 * testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc:
1734 Likewise.
1735 * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
1736 Likewise.
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:
1743 Likewise.
1744 * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
1745 Likewise.
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:
1751 Likewise.
1752 * testsuite/30_threads/recursive_timed_mutex/native_handle/
1753 typesizes.cc: Likewise.
1754 * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
1755 Likewise.
1756 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
1757 Likewise.
1758 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
1759 Likewise.
1760 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
1761 Likewise.
1762 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
1763 Likewise.
1764 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
1765 Likewise.
1766 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
1767 Likewise.
1768 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
1769 Likewise.
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:
1809 Likewise.
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:
1853 Likewise.
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:
1863 Likewise.
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.
1895
1896 * testsuite/30_threads/async/42819.cc: Remove dg-require-cstdint
1897 directive.
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:
1918 Likewise.
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:
1926 Likewise.
1927 * testsuite/30_threads/condition_variable/requirements/
1928 standard_layout.cc: Likewise.
1929 * testsuite/30_threads/condition_variable/requirements/typedefs.cc:
1930 * Likewise.
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:
1935 Likewise.
1936 * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
1937 Likewise.
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:
1955 Likewise.
1956 * testsuite/30_threads/headers/condition_variable/types_std_c++0x.cc:
1957 Likewise.
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::
1979 Likewise.
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:
2000 Likewise.
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:
2036 * Likewise.
2037 * testsuite/30_threads/promise/uses_allocator.cc: Likewise.
2038
2039 * testsuite/18_support/numeric_limits/char16_32_t.cc: Qualify names
2040 from namespace std.
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:
2090 Likewise.
2091 * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
2092 Likewise.
2093 * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
2094 Likewise.
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:
2098 Likewise.
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/
2104 1.cc: Likewise.
2105 * testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/
2106 1.cc: Likewise.
2107
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
2111 not usable.
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.
2114
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.
2122
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.
2160
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.
2201
2202 2018-07-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2203
2204 PR libstdc++/77691
2205 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2206 xfail execution on 32-bit Solaris/x86.
2207
2208 2018-07-26 Marc Glisse <marc.glisse@inria.fr>
2209
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.
2213
2214 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
2215
2216 PR libstdc++/86676
2217 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
2218 same alignment for post-release allocation.
2219
2220 2018-07-25 Jonathan Wakely <jwakely@redhat.com>
2221
2222 PR libstdc++/86676
2223 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
2224 buffer being misaligned and so returned pointer not being at start.
2225
2226 * include/experimental/memory_resource: Include <cstddef> header.
2227
2228 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
2229 * src/Makefile.am: Add comment.
2230 * src/c++17/Makefile.in: Regenerate.
2231
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.
2244
2245 2018-07-24 Jonathan Wakely <jwakely@redhat.com>
2246
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:
2272 New test.
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
2279 default resource.
2280
2281 PR libstdc++/86658
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.
2285
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.
2289
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.
2295
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.
2299
2300 * include/experimental/memory_resource: Adjust comments and
2301 whitespace.
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.
2306
2307 PR libstdc++/70966
2308 * include/experimental/memory_resource (__get_default_resource): Use
2309 placement new to create an object with dynamic storage duration.
2310
2311 2018-07-23 Jonathan Wakely <jwakely@redhat.com>
2312
2313 PR libstdc++/70940
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.
2323
2324 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
2325
2326 PR libstdc++/86595
2327 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
2328 noexcept.
2329
2330 2018-07-20 Fangrui Song <maskray@google.com>
2331
2332 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
2333 _GLIBCXX_VISIBILITY(default).
2334
2335 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
2336
2337 PR libstdc++/86603
2338 * include/std/version: Move __cpp_lib_list_remove_return_type macro.
2339
2340 2018-07-19 Jonathan Wakely <jwakely@redhat.com>
2341
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
2349 is_constructible.
2350 (__is_trivially_copy_assignable_impl): Remove redundant use of
2351 is_copy_assignable.
2352 (__is_trivially_move_assignable_impl): Remove redundant use of
2353 is_move_assignable.
2354 (is_trivially_destructible): Use __bool_constant.
2355 * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
2356 tests for scalar types.
2357
2358 2018-07-19 Glen Joseph Fernandes <glenjofe@gmail.com>
2359
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:
2364 New test.
2365
2366 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
2367
2368 PR libstdc++/86450
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.
2386
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.
2393
2394 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
2395
2396 * scripts/create_testsuite_files: Fix typo in comment.
2397
2398 PR libstdc++/86537
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.
2404
2405 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
2406
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.
2410
2411 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
2412
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&)):
2418 Use latter.
2419 (__glibcxx_check_string_constructor): New.
2420 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
2421 Use latter.
2422 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
2423 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
2424
2425 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
2426
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.
2436
2437 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
2438
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.
2451
2452 * include/std/variant (__accepted_index): Use void_t.
2453
2454 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
2455
2456 PR libstdc++/85831
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.
2472
2473 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
2474 COW strings.
2475 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2476 Likewise.
2477 * testsuite/21_strings/basic_string/requirements/
2478 explicit_instantiation/debug.cc: Likewise.
2479
2480 PR libstdc++/58265
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.
2488
2489 PR libstdc++/58265
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.
2506
2507 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2508
2509 P0646R1 Improving the Return Value of Erase-Like Algorithms I
2510 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
2511 Define.
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
2523 for C++2a.
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
2527 for C++2a.
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.
2542
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:
2562 New.
2563 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
2564 New.
2565 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
2566
2567 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
2568
2569 PR libstdc++/86272
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.
2580
2581 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2582
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:
2586 Likewise.
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.
2592
2593 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2594 Jakub Jelinek <jakub@redhat.com>
2595
2596 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
2597
2598 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2599
2600 PR libstdc++/86398
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:
2608 Likewise.
2609
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.
2613
2614 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
2615
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):
2623 Define for C++14.
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
2628 std::byte.
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.
2639
2640 * include/bits/alloc_traits.h: Remove redundant preprocessor
2641 condition.
2642
2643 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
2644
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.
2655
2656 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
2657
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
2662 noexcept.
2663 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
2664 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
2665 new members.
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:
2671 New.
2672
2673 P0887R1 The identity metafunction
2674 * include/std/type_traits (type_identity, type_identity_t): Define
2675 for C++2a.
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.
2680
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
2692 simplify.
2693 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
2694 __enable_if_t.
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
2698 trait.
2699 (input_iterator_wrapper): Use remove_cv for value_type argument of
2700 std::iterator base class.
2701
2702 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
2703
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.
2707
2708 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
2709
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
2735 static assertions.
2736
2737 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
2738
2739 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
2740 (__is_byte<byte>): Define specialization for std::byte.
2741
2742 PR libstdc++/86138
2743 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
2744 Declare explicit instantiations of COW empty reps and I/O functions.
2745
2746 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
2747
2748 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
2749 directives.
2750 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
2751
2752 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
2753
2754 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
2755 noexcept.
2756
2757 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
2758
2759 PR libstdc++/86112
2760 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2761 Replace dict comprehension.
2762
2763 PR libstdc++/81092
2764 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2765
2766 PR libstdc++/86292
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.
2770
2771 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
2772
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.
2779
2780 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
2781
2782 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
2783 different size_t mangling on 32-bit targets.
2784
2785 PR libstdc++/86280
2786 * include/experimental/memory_resource
2787 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
2788 enough for result of left shift.
2789
2790 PR libstdc++/86138
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.
2800
2801 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
2802
2803 PR libstdc++/83328
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
2811 definition.
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)):
2817 Likewise.
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:
2822 New.
2823 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
2824 New.
2825 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2826
2827 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2828
2829 PR libstdc++/70940
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.
2836
2837 PR libstdc++/70940
2838 * include/experimental/memory_resource (__resource_adaptor_common):
2839 New base class.
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.
2853
2854 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
2855
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
2859 same type.
2860
2861 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
2862
2863 PR libstdc++/70966
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.
2871
2872 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
2873 missed from recent commit.
2874
2875 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
2876
2877 * include/std/utility: Remove unused <exception> header.
2878
2879 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
2880
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.
2887
2888 LWG 2989 hide path iostream operators from normal lookup
2889 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
2890 friends.
2891 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
2892
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
2900 dg-error lineno.
2901
2902 2018-06-18 Maya Rashish <coypu@sdf.org>
2903
2904 * crossconfig.m4: Handle OpenBSD just like NetBSD.
2905 * configure: Rebuilt.
2906
2907 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
2908
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:
2924 New.
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:
2932 New.
2933 * testsuite/18_support/headers/version/macros.cc: New.
2934 * testsuite/18_support/headers/version/macros.cc: New.
2935
2936 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
2937 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
2938 symlink.
2939 * config.h.in: Regenerate.
2940 * configure: Regenerate.
2941 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
2942
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
2946 macro.
2947 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
2948 NOTHROW.
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.
2953
2954 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
2955
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):
2964 Define.
2965 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
2966 deduction
2967 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2968 Likewise.
2969
2970 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
2971
2972 PR libstdc++/86169
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:
2976 New.
2977
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/
2988 nonnull.cc: New.
2989 * testsuite/21_strings/basic_string_view/operations/find/char/
2990 nonnull.cc: New.
2991 * testsuite/21_strings/basic_string_view/operations/rfind/char/
2992 nonnull.cc: New.
2993
2994 PR libstdc++/86168
2995 * include/bits/random.h (random_device(const string&)): Remove
2996 default argument.
2997
2998 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
2999 define for C++17 and above.
3000
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
3006 template.
3007 (reference_wrapper): Add deduction guide.
3008 * testsuite/20_util/reference_wrapper/deduction.cc: New.
3009 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
3010
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.
3016
3017 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
3018
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:
3023 Likewise.
3024
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
3029 whitespace.
3030 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
3031 * testsuite/26_numerics/valarray/transcend.cc: New.
3032
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):
3036 Restore to here.
3037
3038 P0935R0 Eradicating unnecessarily explicit default constructors
3039 * include/backward/strstream (strstreambuf): Add non-explicit default
3040 constructor.
3041 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
3042 Likewise.
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.
3049
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
3054 macro.
3055
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
3071 constructors.
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
3084 non-explicit.
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:
3088 Likewise.
3089 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3090 Likewise.
3091 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3092 Likewise.
3093 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3094 Likewise.
3095 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3096 Likewise.
3097 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3098 Likewise.
3099 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3100 Likewise.
3101 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3102 Likewise.
3103 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3104 Likewise.
3105 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3106 Likewise.
3107 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3108 Likewise.
3109 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3110 Likewise.
3111 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3112 Likewise.
3113 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3114 Likewise.
3115 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3116 Likewise.
3117 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3118 Likewise.
3119 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3120 Likewise.
3121 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3122 Likewise.
3123 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3124 Likewise.
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:
3129 Likewise.
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:
3134 Likewise.
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:
3138 Likewise.
3139 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3140 Likewise.
3141 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3142 Likewise.
3143 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3144 Likewise.
3145
3146 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
3147 Jonathan Wakely <jwakely@redhat.com>
3148
3149 PR libstdc++/83982
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:
3153 New.
3154
3155 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
3156
3157 PR libstdc++/86127
3158 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
3159 unused typedef.
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.
3165
3166 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
3167
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.
3187
3188 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
3189 (__glibcxx_requires_can_decrement_range): New.
3190
3191 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
3192
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.
3207
3208 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
3209
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
3234 non-explicit.
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:
3238 Likewise.
3239 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3240 Likewise.
3241 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3242 Likewise.
3243 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3244 Likewise.
3245 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3246 Likewise.
3247 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3248 Likewise.
3249 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3250 Likewise.
3251 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3252 Likewise.
3253 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3254 Likewise.
3255 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3256 Likewise.
3257 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3258 Likewise.
3259 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3260 Likewise.
3261 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3262 Likewise.
3263 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3264 Likewise.
3265 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3266 Likewise.
3267 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3268 Likewise.
3269 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3270 Likewise.
3271 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3272 Likewise.
3273 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3274 Likewise.
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:
3279 Likewise.
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:
3284 Likewise.
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:
3288 Likewise.
3289 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3290 Likewise.
3291 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3292 Likewise.
3293 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3294 Likewise.
3295 * testsuite/util/testsuite_common_types.h
3296 (implicitly_default_constructible): New helper.
3297
3298 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
3299
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&)):
3303 Likewise.
3304 * include/bits/stream_iterator.h (istream_iterator::operator=)
3305 (ostream_iterator::operator=): Likewise.
3306 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
3307 Likewise.
3308 * include/std/bitset (bitset::reference::reference(const reference&)):
3309 Likewise.
3310 * include/std/complex (complex<float>::complex(const complex&))
3311 (complex<double>::complex(const complex&))
3312 (complex<long double>::complex(const complex&)): Likewise.
3313
3314 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
3315
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.
3324
3325 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
3326
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.
3332
3333 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
3334
3335 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
3336 move of const value.
3337
3338 2018-06-06 Jakub Jelinek <jakub@redhat.com>
3339
3340 PR c++/86068
3341 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
3342 rather than __cpp_transactional_memory >= 201505L.
3343
3344 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
3345
3346 PR libstdc++/86008
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
3350 new overload.
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
3354 comment.
3355 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
3356 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
3357 comment.
3358
3359 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
3360
3361 * include/std/type_traits: Fix comment typos.
3362
3363 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
3364 mingw* targets.
3365 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3366 * testsuite/experimental/filesystem/operations/read_symlink.cc:
3367 Likewise.
3368
3369 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
3370
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.
3378
3379 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
3380
3381 PR libstdc++/85930
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.
3386
3387 * include/bits/postypes.h (fpos): Define special members as defaulted.
3388
3389 PR libstdc++/85930
3390 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
3391 the static variable correctly.
3392
3393 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
3394
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
3412 escape characters.
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
3450 from __gnu_posix.
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
3455 __gnu_posix.
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
3459 __gnu_posix.
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
3464 std::string.
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
3470 correct error_code.
3471 (filesystem::absolute(const path&, error_code&)): Add implementation
3472 for Windows.
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
3476 sendfile.
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
3488 from __gnu_posix.
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
3493 __gnu_posix.
3494 (do_space): Define.
3495 (filesystem::space): Use do_space.
3496 (filesystem::status, filesystem::symlink_status): Use names from
3497 __gnu_posix.
3498 (filesystem::temp_directory_path): Add implementation for Windows.
3499 * src/filesystem/std-path.cc
3500 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
3501 Define for Windows.
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
3507 std::string.
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
3511 use symlinks.
3512 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3513 Likewise.
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
3542 paths.
3543 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
3544 not std::string.
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
3550 Windows behaviour.
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:
3568 Likewise.
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
3575 function.
3576 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
3577 std::basic_string.
3578
3579 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
3580
3581 PR libstdc++/85951
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
3586 typedefs.
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
3592 typedefs.
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
3598 dg-error lineno.
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
3602 dg-error lineno.
3603
3604 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
3605
3606 * include/std/variant (__erased_dtor): Qualify call to __get.
3607
3608 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
3609
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&)):
3618 Likewise.
3619 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
3620 Likewise.
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&)):
3627 Likewise.
3628 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
3629 Likewise.
3630
3631 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
3632
3633 PR libstdc++/85768
3634 * src/c++11/debug.cc: Remove backtrace usage.
3635
3636 2018-05-24 Maya Rashish <coypu@sdf.org>
3637
3638 PR target/85904
3639 * crossconfig.m4: Test for aligned_alloc on netbsd.
3640 * configure: Regenerate.
3641
3642 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
3643
3644 PR libstdc++/69769
3645 PR libstdc++/85886
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
3664 parameters.
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
3670 address types.
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
3679 test.
3680
3681 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
3682
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
3700 wide strings.
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.
3711
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
3716 debugging check.
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.
3722
3723 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
3724
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
3749 new overloads.
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.
3757
3758 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
3759
3760 PR libstdc++/85845
3761 * include/bits/stl_tree.h
3762 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
3763 qualification.
3764
3765 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
3766
3767 * src/filesystem/std-ops.cc (absolute): Report an error for empty
3768 paths.
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.
3772
3773 PR libstdc++/85818
3774 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
3775 dg-require-filesystem-ts.
3776
3777 PR libstdc++/85843
3778 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
3779 initialize base class to avoid warnings.
3780
3781 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
3782
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.
3788
3789 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
3790
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:
3805 Add checks.
3806 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
3807 Add checks.
3808 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
3809 Add checks.
3810 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
3811 Add checks.
3812 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
3813 Add checks.
3814 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
3815 Add checks.
3816 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
3817 Add checks.
3818 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
3819 Add checks.
3820
3821 2018-05-18 Jason Merrill <jason@redhat.com>
3822
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
3832 copy assignment.
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.
3836
3837 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
3838
3839 PR libstdc++/85098
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
3844 definitions.
3845 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
3846 whitespace.
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
3850
3851 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
3852
3853 PR libstdc++/85818
3854 * src/filesystem/path.cc (path::preferred_separator): Add used
3855 attribute.
3856 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
3857
3858 PR libstdc++/85812
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.
3864
3865 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
3866
3867 PR libstdc++/85749
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
3876 match declarations.
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:
3882 New.
3883 * testsuite/26_numerics/random/independent_bits_engine/cons/
3884 seed_seq2.cc: New.
3885 * testsuite/26_numerics/random/linear_congruential_engine/cons/
3886 seed_seq2.cc: New.
3887 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
3888 seed_seq2.cc: New.
3889 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
3890 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
3891 New.
3892 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
3893 seed_seq2.cc: New.
3894 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
3895 seed_seq2.cc: New.
3896
3897 PR libstdc++/83891
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.
3904
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:
3912 Likewise.
3913 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3914 Likewise.
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:
3920 Likewise.
3921 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
3922 * testsuite/experimental/filesystem/path/query/has_extension.cc:
3923 Likewise.
3924 * testsuite/experimental/filesystem/path/query/has_filename.cc:
3925 Likewise.
3926 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
3927 Likewise.
3928 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
3929 Likewise.
3930 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
3931 Likewise.
3932 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
3933 Likewise.
3934 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
3935 Likewise.
3936 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
3937 * testsuite/experimental/filesystem/path/query/is_relative.cc:
3938 Likewise.
3939
3940 PR libstdc++/84159
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
3944 semantics.
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.
3950
3951 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
3952 __invoke to prevent ADL.
3953
3954 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
3955
3956 PR libstdc++/81256
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.
3962
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.
3967
3968 PR libstdc++/67554
3969 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
3970 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
3971
3972 PR libstdc++/82966
3973 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
3974 instead of type.
3975 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
3976
3977 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
3978
3979 PR libstdc++/80165
3980 * testsuite/20_util/variant/80165.cc: New.
3981
3982 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
3983
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.
3989
3990 2018-05-10 Jason Merrill <jason@redhat.com>
3991
3992 * include/bits/regex_compiler.h (_S_cache_size): Change from
3993 function to variable.
3994
3995 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
3996
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.
4004
4005 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
4006
4007 PR libstdc++/85729
4008 * include/bits/c++config.h (__replacement_assert): Add linkage
4009 specification.
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.
4014
4015 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
4016
4017 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
4018 Rename in...
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
4029 iterator type.
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):
4040 New.
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.
4046
4047 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
4048
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.
4054
4055 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
4056
4057 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
4058 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
4059 backtrace.
4060
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,
4064 use latter.
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&)):
4069 Likewise.
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&)):
4077 Likewise.
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&)):
4085 Likewise.
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&)):
4092 Likewise.
4093 * include/debug/unordered_map
4094 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
4095 Likewise.
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&)):
4100 Likewise.
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.
4105
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
4113 when available.
4114
4115 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
4116
4117 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
4118 Use normal std::vector even in Debug Mode.
4119
4120 PR libstdc++/85672
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.
4126
4127 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
4128
4129 * doc/xml/manual/using.xml (table.cmd_options): Document that the
4130 C++17 Filesystem implementation also needs -lstdc++fs.
4131
4132 PR libstdc++/85671
4133 * include/bits/fs_path.h (operator/): Permit copy elision.
4134 * include/experimental/bits/fs_path.h (operator/): Likewise.
4135
4136 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
4137
4138 Moar PR libstdc++/80506
4139 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
4140 Fix magic number used in loop condition.
4141
4142 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
4143
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.
4154
4155 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
4156
4157 PR libstdc++/82644
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.
4165
4166 PR libstdc++/84769
4167 * include/std/variant (visit): Qualify std::get call.
4168
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.
4176
4177 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
4178 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
4179 New.
4180 * testsuite/20_util/remove_cvref/value.cc: New.
4181 * testsuite/20_util/remove_cvref/value_ext.cc: New.
4182
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)):
4197 Likewise.
4198 * testsuite/21_strings/basic_string/dr2268.cc: New test.
4199
4200 PR libstdc++/84535
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.
4209
4210 * include/std/future (__async_result_of): Use __invoke_result instead
4211 of result_of.
4212
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.
4219
4220 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
4221
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.
4231
4232 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
4233
4234 PR libstdc++/68197
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.
4240
4241 PR libstdc++/57997
4242 PR libstdc++/83860
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
4250 members.
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
4255 __detail.
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.
4263
4264 * testsuite/backward/strstream_move.cc: Remove duplicate function
4265 call.
4266
4267 PR libstdc++/69608
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.
4272
4273 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
4274
4275 PR libstdc++/84654
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.
4285
4286 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4287
4288 * configure: Regenerated.
4289
4290 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4291
4292 * configure: Regenerated.
4293
4294 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
4295 Jakub Jelinek <jakub@redhat.com>
4296
4297 PR libstdc++/85442
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.
4301
4302 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
4303
4304 PR libstdc++/84442
4305 * testsuite/30_threads/thread/cons/terminate.cc
4306 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
4307
4308 2018-04-18 David Malcolm <dmalcolm@redhat.com>
4309
4310 PR jit/85384
4311 * configure: Regenerate.
4312
4313 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
4314
4315 * testsuite/experimental/filesystem/file_status/1.cc: Add
4316 -DUSE_FILESYSTEM_TS to dg-options.
4317 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4318 Likewise.
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:
4327 Likewise.
4328 * testsuite/experimental/filesystem/operations/create_directory.cc:
4329 Likewise.
4330 * testsuite/experimental/filesystem/operations/create_symlink.cc:
4331 Likewise.
4332 * testsuite/experimental/filesystem/operations/current_path.cc:
4333 Likewise.
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:
4339 Likewise.
4340 * testsuite/experimental/filesystem/operations/permissions.cc:
4341 Likewise.
4342 * testsuite/experimental/filesystem/operations/read_symlink.cc:
4343 Likewise.
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:
4348 Likewise.
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:
4359 Likewise.
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:
4363 Likewise.
4364 * testsuite/experimental/filesystem/path/decompose/extension.cc:
4365 Likewise.
4366 * testsuite/experimental/filesystem/path/decompose/filename.cc:
4367 Likewise.
4368 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
4369 Likewise.
4370 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
4371 Likewise.
4372 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
4373 Likewise.
4374 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
4375 Likewise.
4376 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
4377 Likewise.
4378 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
4379 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
4380 Likewise.
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:
4384 Likewise.
4385 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
4386 Likewise.
4387 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
4388 Likewise.
4389 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
4390 Likewise.
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:
4394 Likewise.
4395 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
4396 * testsuite/experimental/filesystem/path/query/has_extension.cc:
4397 Likewise.
4398 * testsuite/experimental/filesystem/path/query/has_filename.cc:
4399 Likewise.
4400 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
4401 Likewise.
4402 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
4403 Likewise.
4404 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
4405 Likewise.
4406 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
4407 Likewise.
4408 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
4409 Likewise.
4410 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
4411 * testsuite/experimental/filesystem/path/query/is_relative.cc:
4412 Likewise.
4413
4414 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
4415
4416 * src/c++11/Makefile.am: Fix sed command.
4417 * src/c++11/Makefile.in: Regenerate.
4418
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.
4422
4423 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
4424
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.
4429
4430 * src/c++11/ios.cc: Remove redundant macro definition.
4431
4432 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
4433
4434 * doc/xml/manual/abi.xml: Document header locations in recent
4435 releases.
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.
4442
4443 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
4444
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.
4453
4454 PR libstdc++/85222
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):
4459 New types.
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.
4484
4485 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
4486
4487 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
4488 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
4489
4490 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
4491
4492 PR libstdc++/85183
4493 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
4494 value categories.
4495 * testsuite/20_util/variant/85183.cc: New.
4496
4497 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
4498
4499 * include/std/variant (__get): Qualify calls to avoid ADL.
4500 (__select_index): Adjust whitespace.
4501 (variant): Add using-declaration to workaround Clang bug.
4502
4503 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
4504
4505 PR libstdc++/85040
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.
4511
4512 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4513
4514 PR libstdc++/77691
4515 * testsuite/experimental/memory_resource/resource_adaptor.cc:
4516 xfail execution on 32-bit Solaris/x86.
4517
4518 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
4519
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
4526 test in Debug Mode.
4527
4528 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
4529
4530 PR libstdc++/84998
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
4534 declaration.
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.
4543
4544 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
4545
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.
4553
4554 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
4555
4556 * doc/xml/manual/documentation_hacking.xml: Adjust link to
4557 docbook.org.
4558
4559 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
4560
4561 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
4562 to compile as C++98.
4563
4564 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
4565
4566 PR libstdc++/78420
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.
4575
4576 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
4577
4578 PR libstdc++/84773
4579 PR libstdc++/83662
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.
4585
4586 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
4587
4588 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
4589 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
4590 registration.
4591
4592 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
4593
4594 PR libstdc++/84769
4595 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
4596 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
4597
4598 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
4599 src/filesystem/std-ops.cc (create_dir): Likewise.
4600
4601 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
4602
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
4610 registrations.
4611 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
4612 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
4613
4614 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4615
4616 PR libstdc++/84601
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.
4622
4623 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
4624
4625 PR libstdc++/84671
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
4630
4631 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
4632
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
4640 add new tests.
4641
4642 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
4643
4644 PR libstdc++/84532
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.
4649
4650 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
4651
4652 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
4653 (template<> __aligned_buffer): Define as __aligned_membuf alias.
4654
4655 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
4656
4657 PR target/84148
4658 * configure: Regenerate.
4659
4660 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
4661
4662 PR libstdc++/81797
4663 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
4664 * configure: Regenerate.
4665 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
4666 defined.
4667 * include/Makefile.in: Regenerate.
4668
4669 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
4670
4671 PR libstdc++/83833
4672 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
4673 Add -ffloat-store to options for m68k and ia32.
4674
4675 * doc/xml/faq.xml: Update copyright years.
4676 * doc/html/*: Regenerate.
4677
4678 PR libstdc++/83658
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.
4683
4684 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
4685
4686 PR libstdc++/81076
4687 * include/c_global/cstddef (__byte_operand): Define primary template.
4688 * testsuite/18_support/byte/81076.cc: New test.
4689
4690 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
4691
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:
4696 Likewise.
4697 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
4698 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
4699 Likewise.
4700 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
4701 Likewise.
4702 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
4703 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
4704 Likewise.
4705 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
4706 Likewise.
4707 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
4708 Likewise.
4709 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
4710 Likewise.
4711 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
4712 Likewise.
4713 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
4714 Likewise.
4715 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
4716 Likewise.
4717 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
4718 Likewise.
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:
4728 Likewise.
4729 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
4730 Likewise.
4731 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
4732 Likewise.
4733 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
4734 Likewise.
4735
4736 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
4737
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.
4741 * configure: Ditto.
4742 * src/c++11/random.cc: Conditionally include linux/types.h.
4743
4744 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
4745
4746 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
4747
4748 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
4749
4750 PR libstdc++/83834
4751 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
4752 pattern with exact match for std::cerr.
4753
4754 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
4755
4756 PR libstdc++/83833
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
4760 test.
4761
4762 PR libstdc++/83830
4763 * include/std/type_traits (has_unique_object_representations_v): Add
4764 variable template.
4765 * testsuite/20_util/has_unique_object_representations/value.cc: Check
4766 variable template.
4767
4768 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
4769
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&)):
4776 New.
4777 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
4778 Likewise.
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.
4787
4788 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
4789
4790 PR libstdc++/80276
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
4794 instead.
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.
4809
4810 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
4811
4812 PR libstdc++/81092
4813 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
4814
4815 2018-01-13 Tim Shen <timshen@google.com>
4816
4817 PR libstdc++/83601
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.
4821
4822 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4823
4824 PR libstdc++/64054
4825 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
4826 Remove dg-xfail-run-if.
4827
4828 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
4829
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.
4852
4853 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
4854
4855 PR libstdc++/80276
4856 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
4857 (UniquePointerPrinter): Print correct template argument, not type of
4858 the pointer.
4859 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
4860 a type.
4861 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
4862 array type.
4863 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
4864 weak_ptr of array types.
4865
4866 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
4867
4868 PR libstdc++/83709
4869 * include/bits/hashtable_policy.h
4870 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
4871 __first != __last.
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<>)):
4877 Adapt.
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.
4886
4887 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
4888 Jonathan Wakely <jwakely@redhat.com>
4889
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
4894 children.
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.
4899
4900 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
4901
4902 PR libstdc++/83626
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.
4907
4908 PR libstdc++/83279
4909 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
4910 sendfile.
4911
4912 PR libstdc++/83626
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
4921 overload.
4922 * testsuite/experimental/filesystem/operations/remove_all.cc:
4923 Likewise.
4924
4925 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
4926
4927 PR libstdc++/83626
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
4931 non-existent paths.
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.
4939
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.
4943
4944 PR libstdc++/83607
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
4948 __is_std_equal_to.
4949 * include/experimental/functional (__is_std_equal_to): Remove.
4950 (__boyer_moore_base_t): Use __is_byte_like instead of
4951 __is_std_equal_to.
4952 * testsuite/20_util/function_objects/83607.cc: New test.
4953
4954 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
4955
4956 Protect optional's deduction guide with the feature macro
4957 * include/std/optional: Use the feature macro.
4958
4959 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4960
4961 Update copyright years.
4962 \f
4963 Copyright (C) 2018 Free Software Foundation, Inc.
4964
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.